Salesforce CPQ: Summary Variable

May 6, 2024


 

After completing this unit, you will be able to:

 

What is a Summary Variable?

Summary Variable allows you to perform mathematical operations on collected values from a number of fields associated with various records, like quote lines, product options, subscriptions, or assets. Here's how they work:

  1. Mathematical Operations: You can define mathematical functions like sum, average, count, minimum, or maximum on the values of number fields. For instance, you can sum up the prices of all quote line items, calculate the average discount percentage, count the number of units sold, or find the maximum value of a particular field across all records.

  2. Scope: Summary Variables can be scoped to specific records by applying filters. These filters ensure that the summary variable evaluates only the fields on records that match the specified filter criteria. For example, you can create a summary variable that sums up the prices of only quote line items with a specific product category or belonging to a particular sales region.

  3. Usage: Once defined, summary variables can be referenced in various parts of the Salesforce CPQ environment. You can use them in quotes, quote line fields, and product rules to drive pricing, discounts, or other business logic based on the calculated summary values.

  4. Dynamic Evaluation: Summary Variables dynamically recalculate their values as changes occur to the underlying records. This ensures that the summary information remains accurate and reflects the latest data entered into the system.

Overall, Summary Variable Fields provide a powerful mechanism for performing calculations and aggregations on numerical data within Salesforce CPQ, enabling organizations to derive valuable insights and automate pricing and quoting processes effectively.

 

How to use Summary Variable?

Create a Bundle Product

1. For creating a product, search Products in the App Launcher and select it.

2. Click on the New button and fill in these fields:

Product Name Mouse
Product Code MOUSE
Active True

Click Save.

 

3. Now click on the Related tab, then go to Price Books, click on Add Standard Price, and fill out all the below fields:

List Price 2000
Active True

Click Save.

 

4. Similarly, you can create one more product with the following fields:

Product Name Keyboard
Product Code KEYBOARD
Active True

 

and create price books with the following fields:

List Price 3000
Active True

 

5. Similarly, create a new bundle product with the following fields:

Product Name Hardware
Product Code HARDWARE
Active True
Configuration Type Allowed
Configuration Event Always

 

 

and create price Books with the following fields:

List Price 4000
Active True

 

6. Now, in the Related tab of the hardware product, go to Options, then click on New to create two product options by filling in these fields:

Fields Option1 Option2
Number 1 2
Optional SKU Mouse Keyboard
Quantity Editable True True
Bundled True True

Click Save.

 

 

Create Summary Variables

7. Search Summary Variables in the App Launcher and select it.

8. Create two summary variables by clicking on the New button and filling in these fields:

Fields Summary Variable 1 Summary Variable 2
Variable Name Mouse Quantity Keyboard Quantity
Aggregate Function Sum Sum
Target Object Product Option Product Option
Aggregate Field Quantity Quantity
Filter Field Product Code Product Code
Operator equals equals
Filter Value MOUSE KEYBOARD

Click Save.

 

 

Create Product Rules

9. Search for Product Rules in the app launcher and select it.

10. Click on the New button and fill in these fields:

Product Rule Name Mouse Quantity Must be More than Keyboard Quantity
Type Validation
Conditions Met All
Active True
Message Mouse Ouantity Must be More than Keyboard Quantity
Scope Product
Evaluation Event Always

Click Save.

 

11. Now click on the Related tab, then go to Error Conditions, click on New, and fill out all the below fields:

Tested Object Product Option
Tested Variable Mouse Quantity
Operator less than
Filter Type Variable
Filter Variable Keyboard Quantity

Click Save.

 

 

12. Now, go to Configuration Rules, click on New, and fill out all the below fields:

Active True
Product Hardware

Click Save.

 

To Test This:

1. Search for quotes in the app launcher and select it.

2. Click on New, then Save.

3. Click on the down arrow and select Edit Lines.

4. Click on Add Products and add Hardware.

5. Select both mouse and keyboard, and if you increase the keyboard quantity more than the mouse quantity, then an error message will be shown when you click on apply rules.

 

  • Connect with us

  • sales@phenoble.com

  • hr@phenoble.com

  • +91 7850952954


© 2025 Phenoble Software Private Limited