Salesforce CPQ: List View for Sequence of Price Rules

  • Blog
  • Salesforce CPQ: List View for Sequence of Price Rules
blog image
1
Aug

In Salesforce CPQ, managing the execution order of Price Rules is crucial to ensure a seamless and accurate quoting process. As a Salesforce CPQ consultant, understanding the significance of Price Rule sequencing can enhance the overall efficiency of your sales team. In this blog post, we will explore how to leverage a custom list view to sort Price Rules based on their Evaluation Event and Evaluation Order, using two custom fields specifically designed for this purpose.

On the Price Rule object let's create a formula field (EvaluationEventNumber__c) with the data return type of number to provide a numeric value to each evaluation event in the CPQ Calculation Sequence:

Next, create another text formula field (Rule_Execution_Order__c) on the Price Rule object. This field will provide a unified view of the sequence by combining the Evaluation Event Number and the padded Evaluation Order:

To maintain an appropriate sequence even when Evaluation Orders vary in magnitude, the formula pads all Evaluation Orders with leading zeros. By doing so, Price Rules with lower numeric values will appear before those with higher numeric values in the list view. Thus, we concatenate "0000" to the front of the padded Evaluation Order using the ampersand (&) to ensure a consistent four-digit length and use the RIGHT function to extract the rightmost four digits from the padded Evaluation Order. If SBQQ__EvaluationOrder__c is blank (NULL), we assign a default high value (9999) to push such rules to the bottom of the list (Note: a blank evaluation order is treated as having a higher value, leading it to execute after rules with specified values.)

For example:

If the Evaluation Event Number is "2" and the Evaluation Order is "3," the field value will be "2-0003."

If the Evaluation Event Number is "1" and the Evaluation Order is blank, the field value will be "1-9999."

The formula ensures that the "Rule_Execution_Order__c" field in Salesforce CPQ accurately represents the order in which Price Rules will run during the calculation process. Once the field is created, all that's left to do is add it to the relevant List Views, allowing for easy access, visualisation and seamless management of Price Rule execution sequences. 

Comments (0)

Leave a Comment