Dynamic Pricing with CRM-mapped attributes using DSL
Configure Dynamic Pricing in Zuora to integrate with Zuora CPQ, using CRM-mapped attributes and Domain-Specific Language (DSL) for real-time pricing adjustments.
You can configure Dynamic Pricing in Zuora to integrate with Zuora CPQ and calculate list prices based on data from Zuora objects such as Account, Subscription, or Rate Plan. This enables real-time, context-aware pricing. For example, adjusting prices according to a customer's industry (Vertical), company size, or service type.
To retrieve the appropriate pricing information during quoting, Zuora CPQ introduces a CRM Mapping field. This field is defined on the Context and Attributes page and uses a Domain-Specific Language (DSL) to map Zuora objects to their corresponding Salesforce objects. For more information, see Add a new attribute.
The goal of this configuration is to enable Zuora CPQ to automatically look up relevant data from Salesforce—whether the data originates in Salesforce or Zuora—and apply it to pricing logic during quote creation, eliminating the need for manual data entry.
When you use CRM-mapped attributes for Dynamic Pricing, create and save the attribute and its CRM Mapping field before you create the charge and Dynamic Pricing rate card.
If the charge and Dynamic Pricing rate card are created before the CRM Mapping is added to the attribute, the CRM Mapping is not recognized in Zuora CPQ during quoting. Updating the attribute mapping alone is not sufficient. You must recreate the charge and its Dynamic Pricing rate card after the CRM Mapping is saved.
To avoid this issue:
Create the attribute.
Configure and save the CRM Mapping field for the attribute.
Create a new charge and Dynamic Pricing rate card that references the attribute.
Supported Zuora Objects for pricing
CPQ supports price derivation from the CRM Mapping Field on the following Zuora objects.
Zuora Object | Salesforce Object |
|---|---|
Account | Zuora __CustomerAccount__c |
Subscription | zqu__Quote__c |
Domain-Specific Language Functions used in CRM Mapping field
Function | Description | Syntax |
|---|---|---|
LOOKUP(sourceObject, whereIdField, returnField)
| Fetches a field using an ID-based lookup. | LOOKUP(Account, zqu__Quote__c.zqu__Account__c, Vertical__c) |
LOOKUPBY(sourceObject, sourceObjectField, whereIdField, returnField)
| Fetches a field using a non-ID (for example, external ID) lookup. | LOOKUPBY(Zuora__CustomerAccount__c, Zuora__Zuora_Id__c, zqu__Quote__c.zqu__ZuoraAccountID__c, Vertical__c) |
IF(condition, thenValue, elseValue)
| Applies conditional logic. | IF(condition, valueIfTrue, valueIfFalse) |
For use cases, see Dynamic Pricing - use cases.
For DSL function example, see Domain-Specific Language function examples.