Loading

Set Salesforce CPQ Quote Line field values with Configuration Attributes

Дата публикации: Jul 9, 2025
Описание

The following outlines a sample use case combining Price Rules, Twin Fields, and Configuration Attributes to automatically calculate a quote line’s field value based on the Configuration Attribute value.



Example Scenario:

Admins can use Configuration Attributes to let users set the laptop memory quantity based on the total memory required. For example, if a quote contains a product option (product code = C-MEM-16GB) on a quote line, changing the Memory (GB) configuration attribute value to 256 GB, can automatically adjust its quote line quantity to 16 for 256-GB total memory.

Решение
  1. Create a quote line field:
    1. Data Type: Number
    2. Field Label: Memory (GB)
    3. Field Name: Memory
  2. Create a product option field
    1. Data Type: Number
    2. Field Label: Memory (GB)
    3. Field Name: Memory
  3. Create a parent product
  4. Create a product option related to the parent product
  5. Create a configuration attribute related to the parent product:
    1. Attribute Name: Memory (GB)
    2. Target Field: Memory__c
    3. Apply Immediately: True
    4. Apply to Product Options: True
  6. Create a price rule with the following field values:
    1. Active: True
    2. Evaluation Scope: Calculator
    3. Conditions Met: All
  7. Create a price condition with the following field values to evaluate which product options this rule should apply to:
    1. Object: Quote Line
    2. Field: Product Code
    3. Operator: Equals
    4. Filter Type: Value
    5. Filter Value: <Insert product option’s product code> (ex: C-MEM-16GB)
  8.  Create a price action with a source formula to calculate and then populate the quote line quantity field:
    1. Target Object: Quote Line
    2. Target Field: SBQQ__Quantity__c
    3. Formula: <use a formula to calculate the quantity based on the configuration attribute’s value. If the product option is a component where the quantity is dependent on the parent product reference the parent product’s quantity using the quote line’s Required By lookup relationship> (ex: SBQQ__RequiredBy__r.SBQQ__Quantity__c * Memory__c / 16)
  9.  Create a Quote > Edit Lines > Add Products
  10. Select the Parent product
  11. On the configuration screen, enter in the Memory (GB) value
  12. Save the configuration
  13. On the edit lines screen, verify that the product option’s quantity has been updated according to the price action’s formula
  14. Adjust the parent product’s quantity and verify that the option’s quantity updates
Дополнительные ресурсы
SEE ALSO
Номер статьи базы знаний

000381893

 
Загрузка
Salesforce Help | Article