Configuration Validator API

The Configuration Validator API runs selection, validation, and alert product rules and configurator-scoped price rules against the input configuration model and returns an updated configuration model.

Required Editions
Available in: Salesforce CPQ Spring ’17 and later
Formats

JSON, Apex

HTTP Method

PATCH

Authentication

Authorization: Bearer token

REQUEST

NameType Description
uidStringRequiredID of the Product2 record
quoteQuoteModelRequiredCorresponds directly to SBQQ__Quote__c.
configurationConfigurationModelRequiredThe product's configuration data.
eventStringRequiredEvent type of product and price rules to run. Options are "Load", "Save", "Edit", and "Always".
upgradedAssetIdStringOptionalAsset ID when upgrading a bundle.

RESPONSE

TypeDescription  
ConfigurationModelThe product's configuration data. This is the same Configuration Model that was passed in the request, but the data will be changed based on Product Actions from Product and Price Rules that ran. See CPQ Models.  

The example request body configValidatorContext.json file for running product and price rules. This example context value is a JSON-formatted string of the quote model, configuration model, and event type.

Example response body returning product configuration data. The actual response is a JSON formatted string.

Before saving the ConfigValidator example class, make sure that the CPQ Modelsclasses are added as individual Apex classes in your org.

To demonstrate usage of the ConfigValidator class, run the following code in anonymous Apex.