You are here:
Using Lookup Queries with Product Rules
Use lookup queries with your product rules to query data from an object other than a quote. Use that data to change products and configurations in the quote line editor and configurator. (Salesforce CPQ Managed Package)
Required Editions
| Available in: Salesforce CPQ Spring ’17 and later |
Your product rule’s lookup query maps data from your lookup object back to your product rule. This process lets your product rule use lookup data fields and values in place of the rule’s actions and conditions. Your product rule contains several lookup fields for accepting data from the lookup object.
- Lookup Object
- The API name of the object that stores your lookup data. Use SBQQ__LookupData__c or any custom object other than SBQQ__Quote__c or SBQQ__QuoteLine__c.
- Lookup Product Field
- The API name of the lookup object field that serves as a product action’s product lookup. The lookup object field you use must be a picklist or text field.
- Lookup Type Field
- The API name of the lookup object field that serves as a product action’s type picklist. The lookup object field you use must be a picklist or text field.
- Lookup Required Field
- The API name of the lookup object field that serves as a product action’s required checkbox. The lookup object field you use must be a checkbox field.
- Lookup Message Field
- The API name of the lookup object field that serves as your product rule’s message. The lookup object field you use must be a picklist or text field.
The lookup data object has several fields that map by default to your product rule’s lookup fields. To use a custom field for your lookup object, define those relationships manually. The following table shows the lookup object field values that each type of product rule requires.
| Product Rule Field | Selection Rules Require These Values From Your Lookup Object | Validation Rules Require These Fields From Your Lookup Object | Alert Rules Require These Fields From Your Lookup Object |
|---|---|---|---|
| Lookup Type Field | SBQQ__Type__c or a custom field | None | None |
| Lookup Product Field | SBQQ__Product__c or a custom field | None | None |
| Lookup Required Field | SBQQ__Required__c or a custom field | None | None |
| Lookup Message Field | SBQQ__Message__c or a custom value | SBQQ__Message__c or a custom value |
Configure a selection rule and lookup query that hides and shows your support options in the configurator based on whether you select Bronze, Silver, or Gold in the Support Level configuration attribute menu. First, create the following lookup data records. Remember, all Add, Show & Add, and Enable & Add lookup data records must have a Required field with a value of Yes.
| Name | Category | Type | Product |
|---|---|---|---|
| Lookup Data 1 | null | Show | Gold Support |
| Lookup Data 2 | null | Show | Silver Support |
| Lookup Data 3 | null | Show | Bronze Support |
| Lookup Data 4 | Bronze | Show & Add | Bronze Support |
| Lookup Data 5 | Bronze | Hide & Remove | Silver Support |
| Lookup Data 6 | Bronze | Hide & Remove | Gold Support |
| Lookup Data 7 | Gold | Show & Add | Gold Support |
| Lookup Data 8 | Gold | Hide & Remove | Bronze Support |
| Lookup Data 9 | Gold | Hide & Remove | Silver Support |
| Lookup Data 10 | Silver | Show & Add | Silver Support |
| Lookup Data 11 | Silver | Hide & Remove | Bronze Support |
| Lookup Data 12 | Silver | Hide & Remove | Gold Support |
- Name
- Configuration Selection Lookup Rule
- Conditions Met
- Any
- Scope
- Product
- Evaluation Event
- Always
- Type
- Selection
- Lookup Object
- SBQQ__LookupData__c
- Lookup Type Field
- SBQQ__Type__c
- Lookup Product Field
- SBQQ__Product__c
- Lookup Required Field
- SBQQ__Required__c
- Match Type
- Configuration Attribute Value
- Tested Configuration Attribute
- Support Level
- Operator
- Equals
- Lookup Field
- SBQQ__Category__c

