Price Rule:

  • In Salesforce CPQ (Configure, Price, Quote), a price rule is a set of conditions and actions that determine how products or services are priced. It helps automate the pricing process based on specific criteria or factors.
  • Price rules are used in Salesforce CPQ to update product prices in quote lines and automate price calculations. 
  • These rules are an extension of the standard CPQ functionality. 
  • Price rules are beneficial when you have products that change based on the presence of other products in a quote. 
  • Admins can use price rules to conditionally update any field, not just the price, in the quote, quote line, or quote line group. 
  • They are useful when you need product values to dynamically change based on other products in the quote. For instance, if a printer is sold, a price rule can be created to automatically add two ink cartridges and one printer paper to the quote.
  • Price rules can also handle dynamically changing data for subscriptions using multi-dimensional quoting (MDQ).

Difference Between Product Rule and Price Rule:

Salesforce CPQ Tutorial- Price Rule vs Product Rule


Contributing Objects for Price Rules:

  1. Price Rule: Configurations like when to evaluate the Price Rule, the behavior of conditions, lookup objects, etc are controlled by the Price Rule object.

  2. Price Conditions: A price condition is used to compare the value of a field, summary variable, or formula with another field, summary variable, or formula. You can include multiple conditions within a rule. By specifying which conditions need to be true, you determine when the rule should apply its action. For instance, a rule can trigger its action when all conditions are met when a single condition is fulfilled, or based on a specific logical combination of conditions.

  3. Price Action: When the conditions of your price rule are met, the rule will execute its price actions on a designated field. A price action retrieves the value from a summary variable, formula, user-defined value, or another field within the quote line, and transfers that value to the specified target field. A price rule must have at least one action, and you have the flexibility to include multiple actions that either target the same field or multiple fields.

  4. Lookup Queries: A lookup query is used to search for and retrieve data from related objects. It is used to tie a product rule to the object that houses the data set.
Use Case: Need to update a field on quote object Approval Required to true if quote total is greater than 40000.

 

Steps to Create Price Rule:

As per the ask, if the quote total is greater than 40000 then we need to send the quote for approval. So we need to first create the checkbox field and add it to the quote line.
  1. Create a Checkbox field and add it to QLE: Go to quote object and click on new and add the field - Approval Required make it a checkbox and save the changes. Now go to the quote object and Field Sets drag the newly created field -Approval Required and save the changes.

  2. Create a Price Rule Record: Go to the Price Rule tab and create a new record with the following details - 
    Name: Need Approval
    Active: True
    Evaluation Scope: Calculator
    Calculator Evaluation Event: On Calculate
    Evaluation Order: 10

  3. Create a Price Conditions Record: Click on the new button under the Price Condition section. Before we start creating the record we need to create the Tested Variable. Click on new button under the tested variable dropdown. and create the record with the following values - 
    Varibale Name: Quote Total
    Aggregate Function: Sum
    Target Object: Quote Line
    Aggregate Field: SBQQ_NetTotal__c(if not showing in the dropdown, please add the value in the picklist from the object manager)

    Now in Price Condition, we will validate if the Quote Total variable is greater than 40,000. To do that we need to set the values - 
    Index:10
    Object: Quote
    Tested Variable: Quote Total
    Operator: greater than
    Filter Type: Value
    Filter Value: 40,000

  4. Create a Price Action Record: Click on the New button under the Price Action section and create the record with the following value:
    Target Object: Quote
    Order: 1
    Target Field: Approval_Required__c
    Value: True

  5. Test the functionality: Go to the Quote tab and click on the Edit Line button and add any product more than 40,000 or add more quantity. Click on Calculate button you will see Approval Required field is selected. 
    Salesforce CPQ Tutorial - Price Rule