Author: Rishabh Dubey
Selection Product rules are used to dynamically configure the bundle as per the business rules. Selection Rules can automatically add, remove, or hide products during bundle configuration.
Requirement: We have a Product Bundle “Meal” which has 3 features, Pizza, Fries & Coke. Each feature has 4 Products with different sizes. We have created a configuration attribute with 4 sizes (S, M, L, XL). We want the below automation.
“Based on the selection on Configuration attribute we want the product of the same size to be added to all the features and other sizes should be disabled.”
Solution:
Step 1: Click on the Product rule Tab and then click on New.
Step 2: Fill in all the required fields.
Product Rule Name: Happy Meal Selection Rule: S
Type: Selection
Scope: Product
Evaluation Event: Always
Evaluation Order: This will determine the order of evaluation of this rule (choose accordingly)
Active: True
Conditions Met: All
Advance Conditions: Null
Message: Null

Step 3: Go to the related list of the Product rule and click new on the error condition and fill in all required fields.
Tested Object: Configuration Attributes
Tested Field: Size__c
Operator: Equal
Filter Type: Value
Filter Value: S

Step 4:
- Go to the related list of the Product rule and click new on product action and fill in all required fields.
Type: Add
Filter Field: Size__c
Operator: equals
Filter Value: s

- Go to the related list of the Product Rule and click new on product action and fill in all required fields.
Type: Disable & Remove
Filter Field: Size__c
Operator: not equals
Filter Value: s

Step 5: Go to the related list of the Product rule and click on the configuration rule and fill in all required fields.
Active: True
Product: Meal
Product Rule: Happy Meal Selection Rule: S
Step 6: Follow the same steps M, L, and XL
Step 7: To test the above configurations add the meal product to the Quote.

As soon as we select “S” in Size (configuration attribute) all the Small product options will be added and the rest will be disabled.

Note: Instead of creating multiple Product Rules, we can also use a Lookup query (we will explore lookup queries in upcoming blogs).