Alert Product Rule
An alert is like a gentle warning. It shows a message to the user, who can then decide whether to continue or stop.
Both Alert and Validation Product Rules help keep the quote information accurate and correct. An Alert Product Rule gives a friendly reminder that the user can ignore and still save the quote. On the other hand, a Validation Rule stops the user with an error message, and they must make the required changes before saving the quote.
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
Use Case
For a bundle product, the TMobile Phone Plan, we want to notify sales reps if the total price of added options goes beyond $100. The sales reps should see an alert message but still have the option to continue saving the quote if they choose to.
Step-by-step Guide to Configure a Alert Product Rule
1. Create the Alert Product Rule:
Go to the Product Rule tab and click on the New button.
Product Rule Name: Phone Plan Pricing Alert
Type: Alert
(Set to Alert so the rule shows a warning message but allows the user to continue.)
Scope: Quote
(Indicates that the rule applies to the entire quote.)
Conditions Met: All
(This means all conditions must be true for the rule to trigger. Change to Any if only one condition needs to activate the alert.)
Evaluation Event: Save
(This determines that the rule will be evaluated when the quote is being saved.)
Message: The total price for TMobile Phone Plan Bundle products should not exceed $100.
(This is the alert message that will be shown to the user.)
Active: Check this box to activate the rule.
Click Save.
2. Add Error Conditions to Define When the Rule Should Be Triggered:
Scroll down to the Error Conditions section or click on the Related Tab.
Click New to add an Error Condition.
Rule: Family Bundle Pricing Alert
Index:10
(The order in which the conditions are checked. Lower numbers are evaluated first.)
Tested Object: Quote
(Defines the object to which this rule will apply.)
Tested Field: SBQQ__ListAmount__c
(This field represents the net total amount of the quote. If this field is not visible, follow the steps below to add it.)
Operator: greater than
(Specifies that the rule should trigger if the net total exceeds a specific value.)
Filter Type: Value
(Indicates that a fixed value is used for comparison.)
Filter Value:100
(Sets the threshold value for the rule; in this case, $100.)
Click Save.
3. Add a Second Error Condition to Apply the Rule to Specific Products:
Click New to add another Error Condition.
Rule: Family Bundle Pricing Alert
Index: 20
(This is the second condition, so the index is set higher than the first.)
Tested Object:Quote
Tested Field: SBQQ__ProductCode__c
(This field checks which product bundle is being quoted.)
Operator:equals
(Checks if the value is exactly as specified.)
Filter Type:Value
Filter Value:TMobile Family Bundle
(Specifies the product code for the TMobile Phone Plan.)
Click Save.
4. Test the Configuration:
- Create a New Quote
- Edit Quote Lines: Click on Edit Lines and add the TMobile Phone Plan and its child products.
- Adjust the quantities and prices to ensure the total exceeds $100.
- Save the Quote: When you try to save the Quote, an alert message should display: The total price for TMobile Phone Plan products should not exceed $100.
- Acknowledge the Alert: The sales rep can choose to acknowledge the alert and continue or make changes to the quote as needed.
Once you click on the Continue and click on Save, it will let you save the record
Validation Product Rule
A Validation Product Rule in Salesforce CPQ is basically a way to make sure that quotes are created correctly. It checks if the products, quantities, and prices in a quote meet certain rules set by the business.
How Does It Work?
Think of a Validation Product Rule like a checkpoint. When you’re adding products to a quote, it checks if everything matches the conditions you’ve set. For example, it might check if you’ve added too many of a product, if certain products shouldn’t be combined, or if the total price is too high.
If things aren’t right, it stops you and shows a message explaining what needs to be fixed. This way, it prevents errors and makes sure all quotes meet your company’s standards.
Use Case
Prevent sales reps from saving the quote if the total amount of the selected products exceeds $100.
Step-by-step Guide to Configure a Validation Product Rule
1. Create the Validation Product Rule
Click on New to create a new product rule.
Product Rule Name: Total Amount Limit Validation
Type: Validation
The rule type is set to Validation so that specific it prevents saving quote if those conditions are not met)
Scope: Quote
Defines the level at which the rule applies. Quote means it applies to the entire quote.
Conditions Met: All
Specifies that all conditions must be met for the rule to be triggered. Change to Any if only one condition needs to trigger the rule.
Evaluation Event: Save
Determines when the rule should be evaluated. Save means the rule is checked when the quote is being saved.
Message: The total net price cannot exceed $100.
This message will be displayed to users if the rule is violated.
Active: Check this box to activate the rule.
Click Save.
2. Add Error Condition for Validation Product Rule
Go to Error Conditions Section by clicking on Related Tab of Product Rule.
Index: 10
This sets the order of the conditions. Lower numbers are evaluated first.
Tested Object: Quote
Defines the object that the condition is checking, which is Quote in this case.
Tested Field: SBQQ__ListAmount __c
(Add the field in the Tested Field under Error Condition Object)
- Go to Setup > Object Manager > Error Condition.
- Click on Fields and Relationships and search for Tested Field.
- Add SBQQ__ListAmount__c to the picklist.
(Add the List Amount field under controlling field as well)
Return to Field Dependency and add SBQQ__ListAmount__c under Quote in Tested Object.
Operator: greater than
This specifies the condition. The rule will trigger if the net total is greater than the value specified.
Filter Type: Value
Indicates that a fixed value is used for the comparison.
Filter Value: 100
Sets the threshold value for the rule. In this case, the total amount should not exceed $100.
Click Save.
Test the Configuration
- Create a New Quote
- Click on Edit Lines and add the TMobile Family Bundle and its child products.
- Adjust the quantities and pricing to exceed $100.
- When you click Save, the error message should display, preventing the quote from being saved.
To make the Validation Product Rule run for a specific bundle, such as the TMobile Family Bundle, we need to add an additional error condition that checks whether the rule should only apply to this specific bundle.
Add an Additional Error Condition for the Specific Bundle
Rule: Select Total Amount Limit Validation for TMobile Family Bundle
Index: 20
Tested Object: Quote Line
The condition is applied at the Quote Line level to check specific products.
Tested Field: SBQQ__ProductCode__c
Checks the product code of the bundle.
(You need to add the Field in the Test Field object of Error Condition)
(Include the Value in the controlling field)
Operator: equals
Filter Type: Value (Uses a fixed value for comparison)
Filter Value: TMobile Family Bundle (Enter the exact product code or name for your specific bundle)
Testing: Error will come only for TMobile Family Plan with Product Code TFPB