Welcome to Zuora Product Documentation

Explore our rich library of product information

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.

Supported Zuora Objects for pricing

CPQ supports price derivation from the CRM Mapping Field on the following Zuora objects.

Note: Zuora supports additional objects in the Context & Attribute definition, but these are not available during Quoting.

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)

  • sourceObject: The Salesforce object where the record is found.

  • whereIdField: The Zuora CPQ field used as the lookup value into the sourceObject.

  • returnField: The field from the sourceObject that will be returned as the attribute value

Fetches a field using an ID-based lookup.

LOOKUP(Account, zqu__Quote__c.zqu__Account__c, Vertical__c)

LOOKUPBY(sourceObject, sourceObjectField, whereIdField, returnField)

  • sourceObject: The Salesforce object where the record is found.

  • sourceObjectField: The field in the sourceObject that is matched with the whereIdField.

  • whereIdField: The Zuora CPQ field used as the lookup value into the sourceObject.

  • returnField: The field from the sourceObject whose value is returned as the attribute value

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)

  • condition: A Salesforce Apex expression, within your DSL, that evaluates to true or false.

  • thenValue: The expression that runs if the condition evaluates to true. This can include other DSL functions such as LOOKUP, LOOKUPID, or a nested IF.

  • elseValue: fallback value.

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.