Popular Posts

Text

This is space for adding text

HTML/JavaScript

This space for adding Java script
Powered By Blogger

Search This Blog

Saturday, June 28, 2025

Chapter 7: Price Rules, Lookup Queries, and Summary Variables – Making Pricing Smart

 

 Salesforce CPQ doesn’t just offer static pricing—it gives you the power to make dynamic, responsive pricing decisions using logic. This is made possible through three powerful tools: Price Rules, Lookup Queries, and Summary Variables.

Used correctly, they turn your CPQ solution from a pricing calculator into an intelligent revenue engine.


7.1 What Are Price Rules?

A Price Rule in Salesforce CPQ allows you to automatically update quote line fields, quote fields, or configuration fields based on predefined conditions.

You can:

  • Inject values into a field

  • Calculate conditional pricing

  • Apply logic based on region, customer, or quantity


7.2 Key Components of a Price Rule

ComponentDescription
Price RuleThe rule itself; defines where and when the rule fires
Price ConditionsOptional logic to check before applying the rule
Price ActionsField updates that occur when the rule conditions are met
Lookup QueriesPull data from other objects to use in calculations

7.3 When Do Price Rules Run?

You can configure when the rule should execute:

  • Calculator Initialization – before quote calculations start

  • Before Calculation – to influence pricing inputs

  • After Calculation – to override final outputs

  • On Configuration – within the product configurator

This control allows you to inject logic at exactly the right moment in the quoting process.


7.4 Example: Region-Based Pricing

Use Case: If the customer is from “India”, offer 20% discount; otherwise, offer 10%.

  • Condition: Billing Country = India

  • Action: Set Additional Discount (%) = 20

Otherwise, set to 10%. This can be done with:

  • 2 Price Rules (one for India, one default)

  • Or 1 rule with dynamic calculation


7.5 What Are Lookup Queries?

Lookup Queries allow Price Rules to pull data from another object (e.g., a custom pricing matrix, discount table, or volume break).

You can use them to:

  • Fetch pricing tiers from a custom table

  • Match values from product-specific discount plans

  • Support customer-specific contracted rates


Lookup Query Example:

Use Case: A discount is stored in a custom object Discount_Master__c.

Fields:

  • Product_Code__c

  • Customer_Type__c

  • Discount_Percent__c

A Lookup Query matches the Product Code and Customer Type from the quote line and returns the discount.

The returned value is then mapped to the Additional Discount (%) field via a Price Action.


7.6 What Are Summary Variables?

Summary Variables are used to calculate totals, counts, or averages across quote lines. You can use them in Price Rules and Quote Terms.

TypeUse Case
SumTotal quantity of a specific product
AverageAverage list price of selected quote lines
CountNumber of lines with a specific attribute
Min/MaxHighest or lowest price in quote lines

Summary Variable Example:

Use Case: Apply a bulk discount if the total quantity of licenses exceeds 100.

  1. Create a Summary Variable:

    • Target Field: Quantity

    • Aggregation: Sum

    • Filter: Product Family = “Software License”

  2. Create a Price Rule:

    • Condition: Summary Variable > 100

    • Action: Additional Discount (%) = 15

This enables smart volume-based pricing across multiple lines.


7.7 Real-World Scenarios

ScenarioSolution
Region-based pricingPrice Rule + Condition
Product tiered pricingLookup Query + Custom Object
Subscription term discountsPrice Rule + Configuration Attribute
Volume-based discount across linesSummary Variable + Price Rule
Customer-specific pricing (contracted)Lookup Query + Account Lookup

7.8 Best Practices

  • Name clearly: Use naming conventions like PR_Region_Discount_India

  • Reusability: Design Lookup Queries to be scalable

  • Test combinations: Use debug logs to test multiple conditions

  • Avoid complexity early: Use standard discounts unless business logic requires rules

  • Combine logically: You can stack multiple Price Rules in a single quote process


7.9 Common Mistakes to Avoid

  • Forgetting to enable Calculator Plugin if rules don’t fire

  • Writing conflicting Price Rules without understanding sequence

  • Overcomplicating logic where Discount Schedules might suffice

  • Not defining correct target object (Quote vs. Quote Line vs. Configurator)


7.10 Chapter Summary

  • Price Rules automate field updates and smart pricing decisions.

  • Lookup Queries let you pull external pricing logic into quotes.

  • Summary Variables help you aggregate quote line data and apply logic.

  • These tools power advanced CPQ configurations and bridge static and dynamic pricing.

No comments: