31
JanSalesforce CPQ: Creating Price Rules - Scenario 1
Imagine your client wants their users to configure quotes in such a way that the quantity of the ProductX is automatically updated to exactly 2 times the quantity of ProductZ. In order to achieve this it is necessary to create a price rule.
Step 1. First, create a Summary Variable to represent twice the quantity of ProductZ across all quote lines.
- A. Click the Summary Variables tab from the navigation bar.
- B. Click New.
- ►For the Variable Name field, enter a meaningful name that would make sense for you and your colleagues, for example: Total quantity of ProductZ multiplied by 2
- ►For the Target Object field, select Quote Line
- ►For the Aggregate Function field, select Sum
- ►For the Aggregate Field, select Quantity
- ►For the Filter Field, select Product Code
- ►For the Operator field, select equals
- ►For the Filter Value field, enter ProductZ
- ►For the Composite Operator field, select Multiply
- ►For the Value Element, enter 2
- C. Click Save.
Step 2. Create a Price Rule that will specify that it will be evaluated on the Quote Line Editor and for calculation events.
- A. Click the Price Rules tab from the navigation bar.
- B. Click New.
- ►For the Price Rule Name field, enter Set quantity of ProductX to twice the quantity of ProductZ
- ►For the Evaluation Scope field, select Calculator
- ►For the Evaluation Order field, enter 10
- ►Check the Active checkbox
- C. Click Save.
Step 3. Create a Price Condition that makes the rule evaluate only when the quote line product code is ProductX.
- A. Click New in the Price Condition related list and set the field values:
- ►For the Object field, select Quote Line
- ►For the Field, select Product Code
- ►For the Operator field, select equals
- ►For the Filter Type field, select Value
- ►For the Filter Value, enter ProductX
- B. Click Save.
Step 4. Create a Price Action that will set the quote line Quantity field to the value of the composite summary variable.
- A. Click New in the Price Actions related list and set the following field values:
- ►For the Target Object field, select Quote Line
- ►For the Target Field, enter SBQQ__Quantity__c
- Note: Don't forget to first add the API Name SBQQ__Quantity__c to the values of the picklist field "Target Field" on the Price Action object.
- ►For the Source Variable field, enter Total quantity of ProductZ multiplied by 2
- B. Click Save.
Step 5. Verify rule behaves as expected by adding ProductX and ProductZ to a quote.
- A. Click the necessary quote.
- B. Click Edit Lines.
- C. Click Add Products.
- D. Check ProductX and ProductZ.
- E. Click Select.
- F. Set the quantity of ProductZ to 3.
- G. Click Calculate.
- (Note the quantity of ProductX is double the quantity of ProductZ.)
This is how you can make sure that the correct number of any product is sold depending on the quantity of other products.
PS: Please make sure that the Product Code field is populated for the products you are working with for this specific example because it's the Product Code field that is being referenced in this price rule, not the Product Name.
Keep reading: Salesforce CPQ: Creating Price Rules - Scenario 1
Comments (0)