CPQ fields, system fields, and partner fields
Summarize
Summary of CPQ fields, system fields, and partner fields
This content explains the three types of fields used in the CPQ (Configure, Price, Quote) environment: CPQ fields, system fields, and partner fields. Each field type serves a different purpose in storing, retrieving, and displaying data during product configuration, integrating with Salesforce and partner systems to ensure seamless data flow.
Show less
CPQ fields
- These are user-defined, customizable fields within the CPQ environment.
- Field types include number, text, picklist, set, or product picker.
- Users can assign default values manually or dynamically set values via determination actions or enrichment scripts.
- CPQ fields require explicit initialization via API calls if Salesforce is not the launch-point for CPQ.
System fields
- Predefined fields that pull data from Salesforce product cache or system time, thus cannot have default values assigned.
- Examples include product code, product name, family, description, unit of measure, price, current date, and action context.
- System fields map directly to Salesforce objects and their API field names.
- They can be added directly to layouts and displayed in the configurator UI without issues, even if some data is undefined in Salesforce.
- The value of sys.productId depends on CPQ environment settings and can correspond to product code, partner ID, or other Salesforce product identifiers.
Partner fields
- These fields obtain values via POST API calls and rely on partner data sets external to CPQ.
- They map to Salesforce Quote and Quote Line objects, including quote ID, line ID, pricebook ID, and currency ISO code.
- Partner fields cannot be directly added to layouts; instead, CPQ fields must be used to populate partner field data through initialization enrichments.
- Null checks are essential in scripts or rules utilizing partner fields to prevent initialization errors since some data may initially be null.
- Currency defaults to USD unless multi-currency is enabled in Salesforce.
Practical usage
- CPQ fields enable customization and control over configuration data.
- System fields provide reliable, predefined product and system data for use in layouts and configuration logic.
- Partner fields facilitate integration with external quote systems and ensure configuration is aligned with partner data.
- Organizations can display these fields in the configurator UI or use them behind the scenes in rules and pricing conditions according to their needs.
Learn about the three types of fields in CPQ—CPQ, system fields, and partner fields. Understand how each type stores, retrieves, and displays data in configurations, and how they interact with Salesforce and partner systems for seamless data integration.
There are three categories of fields in the CPQ environment: CPQ fields, system fields, and partner fields.
CPQ fields
A CPQ field is a user-defined field that is custom to the CPQ environment. Its type can be number, text, picklist, set, or product picker. When users create fields in CPQ, they can manually assign default values in the field definition, or they can set values through determination actions.
The following example shows how a user would set a CPQ field in an On Configure/Reconfigure enrichment:
cfgRequest.testField.set("value", "Hello World");
For a more complete description of CPQ fields, see Configure fields.
System fields
System fields are predefined. System fields cannot be assigned a default value because they leverage the SFDC product cache (or the current date and time) to generate their values.
The following example shows how a user would call a system field in an On Configure/Reconfigure enrichment:
let pC = {"input2":cfgRequest.sys.productCode.value};
System fields can be added directly to any layout. There are no issues with displaying them regardless of whether they contain predefined data.
In the layout editor:
In the Configurator UI:
Unit of Measure is blank because in this example, it has not been defined in SFDC.
The mapping of each of these system fields to their respective SFDC object is as follows. The field API name is in parentheses.
- sys.productUOM > Product: Quantity Unit Of Measure (QuantityUnitOfMeasure)
- sys.productName > Product: Product Name (Name)
- sys.productFamily > Product: Product Family (Family)
- sys.productDescription > Product: Product Description (Description)
- sys.productCode > Product: Product Code (ProductCode)
- sys.enableValidation: value defaults to true
- sys.currentDate: Simple time API call, returns date of UTC
- sys.actionContext > Quote Line: Action Context (LGK ActionContext c)
- sys.productPrice > Price Book Entry: List Price (UnitPrice)
- sys.productId: value depends on Admin Settings
sys.productId changes to whatever is defined in your CPQ environment settings. For instance, if the Product Id field was set to Product Code, the resulting data would be Product Code, making it identical to the sys.productCode field.
If the Product Id field was instead set to Partner Id, the data would be pulled from the SFDC field Product2 Id (ID as the field API name):
Partner fields
Partner fields are fields that use a POST call to initialize a configuration via API. Partner fields leverage the partnerʼs data set to generate field values.
The mapping of each of these partner fields to their respective SFDC object is as follows. The field API name is in parentheses.
- partner.quote.id Quote > Record ID (Id)
- partner.quote.lineId Quote Line > Record ID (Id)
- partner.quote.pricebookId Quote > Pricebook ID (SBQQPricebookIdc)
- partner.quote.currencyIsoCode Quote > CurrencyIsoCode
partner.quote.currencyIsoCode defaults to USD if your organization does not have multi-currency enabled in their Salesforce Org. To enable multi-currency, follow the steps in this Salesforce article: Enable Multiple Currencies.
When using these fields, it’s important to note that some of the data may not have any value (null) when the product is first configured. To make sure that there are no initialization errors, include null checks in any rules or scripts that utilize partner fields.
These fields cannot be directly added to a layout like system fields can. Instead, you can use CPQ fields to populate the data in partner fields via an initialization enrichment.
The following example initialization enrichment populates the values of the partner fields into the configurator:
let quoteId = cfgRequest.partner.quote.id.value;
let lineID = cfgRequest.partner.quote.lineId.value;
let currencyISO = cfgRequest.partner.quote.currencyIsoCode.value;
let priceBookID = cfgRequest.partner.quote.pricebookId.value;
if (quoteId != null) {
cfgRequest.quoteIDTest.set("value", quoteId);
}
if (lineID != null) {
cfgRequest.lineIDTest.set("value", lineID);
}
if (currencyISO != null) {
cfgRequest.currencyISOCodeTest.set("value", currencyISO);
}
if (priceBookID != null) {
cfgRequest.pricebookIDTest.set("value", priceBookID);
}
return cfgRequest;
Initial configuration:
Reconfiguration:
Line ID is now populated.
How you use partner and system fields is up to you. Some organizations find it helpful to display this information in the configurator to the end user, while others use it in the background in rules to drive pricing conditions.