Apply price overrides across multiple quote line items in a single asynchronous request, without editing each line item individually.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
Available in Flow Builder and Agentforce for flows running API version 67.0 and later, the action starts a bulk price update job and immediately returns an asynchronous job ID for tracking status. The Bulk Price Update service performs all business validation, including parent-child relationship checks, pricing field validation, and price range checks, after the job starts.
Input Values
| Parameter | Required | Description | Data Type |
|---|---|---|---|
| quoteId | Yes | The ID of the quote whose line-item prices are being updated. | String |
| updates | Yes | A JSON array of update objects. Each object requires rootQuoteLineItemId, quoteLineItemId, and a pricingData map of { <fieldApiName>: <absolutePrice> }. |
String (JSON array) |
| checkAsyncJobStatus | No | Optional. A Boolean value that indicates whether to check for running asynchronous jobs on the quote before starting the update. The default value is true. |
Boolean |
Output Values
| Parameter | Description | Data Type |
|---|---|---|
| status | The status of the request. Valid values are ACCEPTED when queued and FAILED on envelope-level rejection. |
String |
| success | A Boolean value that indicates whether the request was accepted and the asynchronous job was queued. | Boolean |
| quoteId | The ID of the quote. | String |
| asyncJobId | The batch job ID for status polling. | String |
| message | A human-readable status message. | String |
| error | An error message if the request was rejected. | String |
Usage
Use this action when you need to update pricing overrides across many quote line items without updating each line item individually.
After the request is accepted, the action immediately returns an asynchronous job ID. Use the Get Async Job Status action to monitor the processing status.
The action delegates all business processing to the Bulk Price Update service. The invocable action performs only payload validation before submitting the asynchronous request.
Extensibility
The Bulk Price Update service supports Apex hooks to trigger custom workflows during execution.
Pre-Hook
Execution & Availability: Supported via the preHook method defined in B2BCmexAPIHookInterface.
Behavior: If pre-flight validation fails during request kickoff (for example, malformed payload, invalid quote, or missing pricing field), the request is rejected synchronously before a job is enqueued. As a result, no batch fires and no post-hook runs.
Post-Hooks
Opt-in per org (configured via bulkPriceUpdateHook Setup > Custom Settings > Custom Class Implementation), post-hooks execute at two distinct fire points:
- Immediate Post-Hook (
executePostHook): Runs synchronously on request acceptance withphase=ACCEPTEDright after the batch job is enqueued. It fires strictly on the accepted path. - Batch-Finish Post-Hook (
executePostHookForBatch): Runs once from the batch finish handler upon completion withphase=COMPLETED. It receives an output payload containingsuccessCount,failureCount, and a per-entryresults[]array detailing the{rootQuoteLineItemId, quoteLineItemId, status}and failure message for each update entry.
Considerations
- This action supports asynchronous processing only.
- Only one asynchronous job can run for a quote at a time unless
checkAsyncJobStatusis set tofalse. - The
updatesinput must be a valid JSON array. - Each update object must contain
rootQuoteLineItemId,quoteLineItemId, andpricingData. - The
pricingDataobject maps pricing field API names to absolute override values. - Multiple pricing fields can be updated for a single quote line item.
Example Input
{
"quoteId": "0Q0XXXXXXXXXXXX",
"updates": [
{
"rootQuoteLineItemId": "0QL9IXXXXXXXXXXWAQ",
"quoteLineItemId": "0QL9IXXXXXXXXXXWAQ",
"pricingData": {
"vlocity_cmt__RecurringCharge__c": 4500,
"vlocity_cmt__OneTimeCharge__c": 1500
}
},
{
"rootQuoteLineItemId": "0QL9IXXXXXXXXX9WAK",
"quoteLineItemId": "0QL9IXXXXXXXXXXWAQ",
"pricingData": {
"vlocity_cmt__RecurringCharge__c": 5500,
"vlocity_cmt__OneTimeCharge__c": 2500
}
}
],
"checkAsyncJobStatus": true
}
Example Output
{
"success": true,
"quoteId": "0Q0XXXXXXXXXXXX",
"status": "ACCEPTED",
"asyncJobId": "707XXXXXXXXXXXX",
"message": "Bulk price update accepted; poll asyncJobId for status."
}
Error Handling
The action immediately returns a FAILED status when the request cannot be accepted.
Service-level validation errors are returned in the Error output using the following format:
[errorCode] errorMessage
For example,
[NOTHING_TO_UPDATE] Specify at least one entry for the updates parameter.
The action rejects the request before submitting the asynchronous job when:
quoteIdis blank.updatesis blank.updatesis not valid JSON.updatesis not a JSON array.