(Image Attached on Every Step)
Hello, my name is Smriti Sharan. I am an avid blogger and YouTuber. Follow my Blog, Linkedin and YouTube to learn various aspects of Salesforce.
https://t.me/sfdcamplified feel free to join the telegram group.
Follow my Youtube
Scenario: A product is sold for $100, now we want to give a discount to a particular partner of 5%. How can we set that up using CPQ?
Topics Covered:
- Why not use Discount Schedule for the scenario?
- Why not use Contracted Pricing for this scenario?
- Why use the Price Rule for this Scenario?
- Considerations while Designing of Price Rule
- Step by Step implementation
Before designing the solution let’s consider what options we have:
Salesforce CPQ offers
- Discount Schedule
- Contracted Pricing
- Price Rule
Why Not Use a Discount Schedule?
Discount Schedules are designed for discounting based on predefined criteria
- Volume
- Term
- Cost
Volume-Based Discount: Provides discounts based on the quantity or volume of a product purchased.
For example, A customer gets a 5% discount for purchasing 1-50 printer papers, a 10% discount for 51-100, and a 25% discount for 101-400.
Term-Based Discount: Provides discounts based on the duration or term of a subscription.
For example, a customer receives a 20% discount if they buy an antivirus subscription for more than three years.
Cost-Based Discount: Applies a discount directly to the product cost, not the list price.
For example, a flat 25% discount on LG air conditioners during winter, regardless of their list price.
Why Not Use Contracted Pricing?
Contracted Pricing is for scenarios where a product’s price needs to remain constant for a particular customer across renewals or amendments, regardless of any changes in the standard price book.
Fixed Price for a Specific Product: Contracted Pricing locks in a specific price for a product, ensuring that even if the price in the price book changes, the customer pays the contracted price.
For example, if a customer purchases a product for $1,000, Contracted Pricing ensures that the customer continues to pay $1,000 regardless of any future price adjustments.
Contracted Pricing is not suitable because it is about fixing a product’s price for a customer, while our need is to apply a variable discount (e.g. 5%) that can change depending on the partner or other conditions.
Why to Use Price Rule here
Price Rules allow for dynamic, condition-based discounting. For example, we want to apply a 5% discount specifically to “Partner A” whenever they purchase any product.
Unlike Contracted Pricing, Price Rules can access and use custom fields. We can dynamically pull the discount percentage from the Account object and apply it to the Quote Line using Price Rules
Designing of Price Rule
Before implementing we need to understand which objects can be used in Price Condition and Price Action.
Objects | |
Price Condition | Quote |
Quote Line | |
Summary Variable | |
Product Option | |
Price Action | Quote |
Quote Line | |
Product |
If you note, our scenario is to apply partner discount based on Account, but we cannot find Account object in Price Condition
To put this condition, we need to go with formula field SBQQ__Quote__r.SBQQ__Account__r.Partner_Discount__c to get value of partner discount from Account object
Step-by-Step Solution: Implementing Partner-Specific Discount Using Price Rules
Step 1: Create a Custom Field on the Account Object
- Field Type: Percent.
- Field Label: Partner Discount.
- Field Name (API Name): Partner_Discount__c
Step 2: Configure a Price Rule in CPQ
Name: Enter “Partner-Specific Discount.”
Evaluation Event: Select “On Calculate.” This ensures the rule evaluates whenever the quote is calculated.
Active: Check the box to activate the rule.
Evaluation Scope: Select Calculator
Conditions Met: Choose “All” to ensure all conditions are met before applying for the discount.
Create the Second Price Condition:
- Object: Choose Quote Line. (This is because, price rule applies at the Quote Line level.)
- Field: Choose SBQQ__Quote__r.SBQQ__Account__r.Partner_Discount__c (the custom field created on the Account).
- Operator: Set to “not equal to.” (This will check whether the Partner_Discount__c field on the Account is not equal to a null value.)
- Value: Enter null
Step 4: Set Up the Price Action to Apply the Discount
- Create a new Price Action.
- Target Object: Select Quote Line.
- Field: Choose SBQQ__PartnerDiscount__c
- Formula: Use a formula to fetch the discount percentage from the Account:
- SBQQ__Quote__r.SBQQ__Account__r.Partner_Discount__c
Testing
Create New Account
Name: Test Partner Discount
Partner Discount: 5
Create Opportunity
Create Quote
Account: Test Partner Discount
Opportunity: Test Partner Opportunity
Result
Go to Edit Quote Line -> Add Products, you will see 5% discount is applied to both the products.
Now let’s do the Negative Testing
Create Account with Partner Discount as Null
Create Related Opportunity
Create Related Quote
Go to Edit Lines and see No Partner Discount has been Added.
Scenario 2: Let’ s say we want to Add Partner Discount to a Particular Partner for a specific Product
Go to same Price Rule: Partner Specific Discount
Under Related Lists, find Price Conditions and click New Price Condition.
- Object: Choose Quote Line.
- Field: Choose the field that relates to the product you want to discount SBQQ__ProductCode__c
- Operator: Set to equals
- Value: T5G
- Condition Met: Set to True
Testing
Now you will see the Discount is only on T-Mobile 5G Device which has Product Code of “T5G”
Any feedback to improve documentation will be really appreciated so I can provide more quality content in the future.