Tips from an Expert: Salesforce CPQ Price Rule Tracker




Salesforce CPQ is one of the best tools to provide accurate pricing with any given product configuration scenario.

Pricing Rules are one of the options; we admins have to modify records easily. In a few simple steps, we can inject a static value, related field value, calculated formula, table lookup, and more.

Any admin implementing SF CPQ will eventually find himself handling tens or even hundreds of price rules. How do you add a new price rule or maintain an existing price rule without impacting the others?

Price Rules: An Example In Action

Imagine you’ve just added a new price rule to the 150 price rules you already have in the system. Now you’d like to run the tested scenario, and guess what, it isn’t working as expected.

Say you’d like to update the Special Price field for a specific product family sold in a bundle. You’re creating this relatively simple rule with a condition and an action that modifies the Quote Line Special Price. But the Quote Line’s Special Price doesn’t update when it should.

Now what?

Are you sure you built the rule correctly? Factoring in evaluation events, conditions, actions, etc. ? How can you tell if the rule fired? And if it fired, maybe another rule overrides the Special Price value? You’d like to review all triggered rules, but how can you know which rules fired and which didn’t?

This is a common issue for CPQ admins. While the problem is common (and stressful!), the solution for the above is surprisingly simple.

How to track which rules were running.

The solution, in short, is adding a text field (“Price Rule Triggered”) to the Quote and/or Quote Line that captures all price rules that fired on the record.

Back to our example, where you can’t understand why the Special Price didn’t update the tested quote line. Now with the “Rule Fired” text field, you can see if your rule fired in the first place and if other rules fired afterward.


The solution

  1.       Create a new long text field on the object you’d like to evaluate.
  2.       For example, if the price rule action updates the Special Price on the Quote Line, you should open the text field on the
    Quote Line.
  3.       If you have rule actions triggered on Quote and on the Quote Line objects, I recommend creating “Price Rule Triggered” on both objects.
  4.       Add a new Price Action to each rule you’d like to evaluate if it was fired.
  5.       This rule adds the rule name, or any other text that will help to debug, to the “Price Rule Triggered” field.
  6.       I recommend adding the action to all price rules and updating the “Price Rule Triggered” field on the Quote or Quote line, respectively, to the rule action target object.
  7.       Add a rule to fire before any other rule (evaluation order should have the smallest number) to clear the “Price Rule Triggered” field.
  8.       This step is essential; otherwise, the string will concatenate on every “calculation” or “save” the rule names. Resulting a long string with duplications.
  9.       In many cases, there is already a rule that clears fields before calculation. If that case, you can use it and add the action to this rule.

Good Luck! I hope this helps make your price rule testing a much easier process.

Written by Yariv Medved, Director, Israel Professional Services