Product Rules allow us to define advanced configuration logic, compared to Option Constraints. It also allows us to examine product options within a bundle or quote line against certain terms and then perform changes accordingly.
The four types of Product Rules are:
Validation is an option in product rules which shows an error message and does not allow a save until we have taken action to correct the mistake according to the error message which is shown by the validation rule, we created. The validation rule checks the error condition if it returns true then gives an error message. We can only save it after correcting that error. To create a validation rule we use summary variable. We’ll discuss further what summary variables are in CPQ.
When we select Alert type while creating a Product Rule and when we select that product and try to save it if the error condition returns true then it shows an alert message to suggest the best option. Whenever we try to save, it shows two options that are canceled and continue. We can change our product according to alert suggestions or we can also continue with the selected product based on the requirement. It just suggests to us through an alert message when the error condition returns true.
Don't forget to check out: What is Salesforce CPQ - Why Does Every Business Need it?
It automatically performs actions on Product Options without showing any kind of message to users. In other words, we can also say that it sets rules to automatically add, delete, hide, show, enable, or disable product options.
Filter rule is used to filter the product and shows only available products to add to the bundle. To create a filter rule we select the type field as Filter under the Product Rule. This rule is used to configure a bundle. This rule dynamically updates the bundle of which products we are offering to the customer.
Product Rule comprises of:
- Error condition:- It defines what conditions fire the rule.
- Product Actions:- It defines what actions the rule takes.
- Configuration Rule:- It links the product rule to the bundle.
Summary Variables in Product Rules
- Summary variables are used to determine the aggregations of products on quotes for use in features like Product Rules, Price Rules, Validation Rules, and dynamic quote terms. It is also known as the tested variable or filter variable.
- There are five aggregate functions we can perform for the aggregation while creating a summary variable.
- Sum: It returns the sum of all aggregate field’s values.
- Average: Returns the average of all aggregate field’s values.
- Min: Returns the minimum of among all the aggregate field’s values.
- Max: Returns the maximum of among all the aggregate field’s values.
- Count: It counts the number of records that satisfy the condition of filter criteria.
Check out an amazing Salesforce video tutorial here: Salesforce CPQ Product Bundles
Steps to create Summary Variable in Salesforce CPQ
- Open the Salesforce CPQ application from the app launcher.
- Type ‘Summary Variable’ in the search box of the app launcher.
- Open the Summary Variable tab and click on ‘new’.
- Set the variable name according to requirement. It should be descriptive.
- The set aggregate function which we want to perform.
- Set target object on which we want to perform aggregation function.
- Set the value of the aggregate field.
- Set the value of the filter field.
- Set the operator.
- Set the filter value.
- Click on save.