How To Create Constraint Rule In Apttus CPQ ?
- 2 minutes
- 3515
A constraint rule is a business rule. They let you to include, exclude, validate, recommend, and replace products based on business logic. At the very centre of it, a constraint rule is like if/then statement. It comprises of three things.
- Rule Header – a brief summary about the rule.
- Rule Condition – This is the ‘if’ part. It lets you define your business rules.
- Rule Action – This is the ‘then’ part. It includes the action to be performed when ‘if’ part gets evaluated to true.
There are various types of Constraint rules:
- Inclusion Rules
- Exclusion Rules
- Validation Rules
- Recommendation Rules
- Replacement Rules
Here, we will focus only on first on i.e. Inclusion Rule.
Use Case:
A company manufactures and sells smart phones. It includes a plan in which a user can buy the phone in less price but needs to buy a fixed carrier option for period of 3 years. If a user buys the phone, a carrier provider’s sim card will be automatically prompted.
Now we have got the requirement, let’s create the rule for this.
- Open all tabs
- Click on “Constraints Rule”.
- Open the rule.
- Create New Rule, fill the following fields.
- Name – Name of the rule
- Sequence – Shows the sequence in which the rule will get executed
- Currency – Currency of the product
- Mark Active and Save the rule.
- Now from the same page, click on Create Rule Condition button from related list.
- On the Constraint Rule Condition Detail page, in the Criteria section, from Product Scope, select Product.
- In Product, enter Smart Phone as the product and in the Match Conditions section, select Match in Primary Lines
- Click Save.
- Open the same rule and scroll down to related list “New Constraint Rule Action”.
- On the Constraint Rule Action Detail page, in Message, You must add {1}.
{0} equals the condition product and {1} means the action product. - From Action Type, select Inclusion and from Action Intent, select Show Message.
- From Action Disposition, select Error.
- From Product Scope, select Product and in Product, enter Sim Card as the product.
- In the Match Conditions section, select Match in Primary Lines and click Save.
So now, whenever a user selects smart phone, s/he will be instructed to buy the sim card too.