Configuration Load Rule Executor API
The Configuration Load Rule Executor API invokes all the load event product rules for the specified product. When configuring a nested bundle, set the parentProduct property to the parent product to inherit configuration attributes on the nested bundle.
| Required Editions |
|---|
| Available in: Salesforce CPQ Spring ’17 and later |
- Formats
JSON, Apex
- HTTP Method
PATCH
- Authentication
Authorization: Bearer token
REQUEST
| Name | Type | Description | |
|---|---|---|---|
| uid | String | Required | ID of the Product2 record . |
| quote | QuoteModel | Required | Corresponds directly to SBQQ__Quote__c . |
| configuration | ConfigurationModel | Optional | The product's configuration data. Only required if you have an existing configuration from product actions or a previous run-through. |
| lineItemKey | Integer | Optional | Used to identify upgrade options in amendment flows. |
| dynamicOptionSkus | List<String> | Optional | A list of dynamic option SKUs. Sourced from product options selected in dynamic features. |
| parentProduct | ProductModel | Optional | The parent product for a nested bundle. Used to inherit configuration attributes from the parent product. |
RESPONSE
| Type | Description | ||
|---|---|---|---|
| ProductModel | Representation of product data. See CPQ Models. |
The example request body loadRuleContext.json file for running load product rules. This example context value is a JSON-formatted string of the quote model and the configuration model.
Example response body returning product data. The actual response is a JSON formatted string.
Before saving the LoadRuleRunner example class, make sure that the CPQ Models classes are added as individual Apex classes in your Salesforce org.
To demonstrate usage of the LoadRuleRunner class, run the following code in anonymous Apex.