Salesforce CPQ Product Rule

Salesforce CPQ Product Rule helps Sales reps in many ways to sell the right product to customers. For example, a sales rep is selling a bundled product named ‘Desktop for Home’ to the customer. Will the Desktop Computer without keyboard be helpful to customer? In this case, Salesforce CPQ product rule helps Sales rep to sell ‘Desktop for Home’ product without missing keyboard.

Salesforce CPQ Product Rule helps Sales reps in many ways to sell the right product to customers. For example, a sales rep is selling a bundled product named ‘Desktop for Home’ to the customer. Will the Desktop Computer without keyboard be helpful to customer? In this case, Salesforce CPQ product rule helps Sales rep to sell ‘Desktop for Home’ product without missing keyboard.  

There are four types in product rules: 

  • Validation 
  • Alert 
  • Selection  
  • Filter 


Now, we are going to create a validation rule to stop sales reps from selling a desktop computer without keyboard.  

  1. Create a Summary Variable 
  • Go to Summary Variable tab 
  • Click New  
  • For Variable Name, enter the appropriate name. In this example, Variable name is set as KeybrdSum 
  • For Target Object, Choose Product Option 
  • For Aggregate Function, choose Sum. 
  • For Filter Field, choose Product Code. 
  • For Operator, choose contains 
  • For Filter Value, enter KEYBRD 
  • Click Save 
  1. Create a Product Rule 
  • Go to Product Rule tab 
  • Click New 
  • For Product Rule Name, enter Prevent missing KB 
  • For Type, choose Validation 
  • For Scope, choose Product. 
  • For Evaluation Event, choose Save. 
  • Check Active. 
  • For Conditions Met, choose All. 
  • For Message, enter Please choose an option that includes a Keyboard 
  • Click Save 
  1. Create an Error Condition  
  • In the Error Condition related list, click New. 
  • For Tested Variable, look up and choose KeybrdSum. 
  • For Filter Operator, choose equals. 
  • For Filter Type, choose Value. 
  • For Filter Value, enter 0. 
  • Click Save. 
  1. Create a Configuration Rule 
  • In the Configuration Rule related list, click New.  
  • Check Active. 
  • For Product, look up and choose the product where you want to apply this product rule. For this example, Desktop for Home product bundle with Key board product options have been selected to apply this product rule. 
  • Click Save. 

Let us test this Product rule (Validation) by adding the ‘Desktop for Home’ product bundle without choosing the keyboard product option.  

  1. Go to Quote records created for testing.  
  1. Click Edit Lines 
  1. Click Add Products 
  1. Select the Desktop product bundle and leave any keyboard product option unchecked.  
  1. Click Save 

You can see that the error message as shown below. 


To experience/test the alert product rule, just change the type to Alert in the product rule used in example for Validation

The difference between alert and validation in product rule is that Validation will not allow user to save quote or configuration until the record meets predetermined conditions. If you choose alert, user will be alerted with the message, but user can continue without making any changes.  


Selection Rule will automatically add, remove, hide, enable, or disable options in bundle.  

Now, we are going to create a Selection Product Rule to automatically add USB Thumb drive product to the quote whenever a Sales rep adds a monitor to the quote.  

Create a product rule.  

  1. USB thumb drive 
  1. Type – Selection  
  1. Scope – Quote 
  1. Evaluation Event – Always  
  1. Active – True  
  1. Condition Met – Any  

Create an Error Conditions: 

  1. Tested Object – Quote Line  
  1. Tested Field – SBQQ__ProductCode__c 
  1. Operator – Starts With  
  1. Filter Type – Value  
  1. Filter Value – monitor 

Create a Product Action  

  1. Type – Add  
  1. Product – Choose the product that you want to add automatically (For this example, USB Thumb Drive) has been selected.  
  1. Required – TRUE 

Let us test this selection rule by adding a monitor to a quote. If you add a monitor to the quote, USB Thumb Drive will be automatically added to quote.  


Filter Product rule helps us to create dynamic bundles. 

In this example, we are going to provide dynamic list of options to the Sales rep when they add the product ‘Laptop’ to the quote.  

Create a checkbox field in product option object. For this example, a checkbox named Addon__c has been created. 

Create a Feature for the product for which you want to display list of options, as shown below.  

Create a Product Rule  

  1. Go to Product Rule tab. Click New 
  1. For Product Rule Name, enter an appropriate name.  
  1. For Type, choose Filter. 
  1. For Scope, choose Product. 
  1. For Evaluation Event, choose Load. 
  1. Check Active. 
  1. For Conditions Met, choose All. 
  1. Click Save. 

Create Product Action  

Note: Before creating product action, add an API name of the created checkbox to Filter Field of Product Action. 

  1. In the Actions related list, click New. 
  1. For Type, choose Default Filter. 
  1. For Filter Field, choose Addon__c. 
  1. For Operator, choose equals. 
  1. For Filter Value, enter true. 
  1. Click Save. 

Create a Configuration Rules related list 

  1. In the Configuration Rules related list, Click New  
  1. Check Active. 
  1. For Product, look up and choose ‘Laptop’ 
  1. For Product Feature, look up and choose Upsells. 
  1. Click Save 

To test this Filter product rule, let us follow the steps.  

Go to Quote -> Click Edit Lines -> Add Products -> Add Laptop  

Click Add Options  

You can add the Printer to the quote by selecting and clicking add.  

This article explains each type of product rule with simple examples. This article does not cover everything related to product rule. To learn more about product rule, please refer the links below.  


About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.