Loading

Salesforce Opportunity Product Sales Price Value Adjusts When Process Updates the Quantity

Date de publication: Apr 2, 2026
Description

When the quantity field in the Opportunity Line Item object is updated by a Workflow rule or a Process builder, the sales price value adjusts automatically.

Example:
A process sets quantity value to 10 when the Product in the Opportunity Line Item is equal to "Pack Of Ten"
A user adds the "Pack Of Ten" Product to the Opportunity and sets the following values
Quantity = 100
Sales Price = $100

After Saving the record it will show the following values in the Opportunity Line Item record:
Quantity = 10
Sales Price = $1000

This is an expected behavior.

According to https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunitylineitem.htm

  • If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held

Although the user updated the sales price (API Name: UnitPrice), after saving, the process updates the record's quantity value but did not specify the sales price value. This meets the above condition which makes the sales price.

 

Note: As of 2025, Workflows and Process Builder will be depreciated: https://help.salesforce.com/s/articleView?id=001096524&type=1

Résolution
In the immediate action of the process where the quantity is being updated, update the sales price field with the following formula:

PRIORVALUE([OpportunityLineItem].UnitPrice)
Numéro d’article de la base de connaissances

000381172

 
Chargement
Salesforce Help | Article