Download page Creating Constraint Rule Conditions.
Creating Constraint Rule Conditions
Constraint rule conditions should be met in order to trigger a rule. There may be more than one condition for a rule. A constraint rule condition is met when the Sale rep adds a product that is part of the product scope you defined in constraint rule condition, to the cart. When the constraint rule condition is satisfied, the constraint rule action is executed on the cart. Different conditions are associated with an expression. When the condition association expression is not specified, all the conditions should be met in order to trigger the rule.
The rule condition is defined by product scope. Product scopes are groups in which the product belongs or a set of fields you can use as conditions. The product scope could be specific to a Product, Product Family, Product Group, Product Option Group, and a Product Field Set. Product scops are explained in detail later in this section.
You can define additional condition criteria like Country Codes or Color. The additional criteria on the condition is based on the line item object. Condition Criteria filter conditions that are applied to the line item created from the selected products that are within the product scope definition.
When criteria is defined, the condition is met when the product scope specification and criteria are both met. For example, based on your company's requirement, you cannot sell Product B if you are selling more than 3 units of Product A. In this case, you can define condition criteria to validate the quantity of Product A.
When using a constraint rule with condition criteria for a product with multiple line items, the system only validates the primary line item to evaluate the constraint rule.
You must run a criteria maintenance job whenever you add, remove, or make any changes to criteria. Even if you remove a constraint rule that has criteria defined, you must run a criteria maintenance.
You can create a Constraint Rule Condition or Constraint Rule Action criteria that is based on a field from the Product Attribute Value Extension object.
To Create Constraint Rule Conditions
You must have an existing constraint rule header.
- On App Menu, click Apttus CPQ Admin and then click the CPQ Admin tab. The new admin console is launched.
- On the Products menu, click Manage Products.
- Search and click any product for which you want to define a constraint rule.
- Click Rules. The page displays different rules tab.
- Click Constraint Rule icon ( ) next to the title, RULES. All the constraint rules associated with that product are displayed.
- Search and click the constraint rule.
- Fill in the required details under the IF(scope)... section. Enter a number under Condition column.
Select one of the following options from Product Scope drop down. The last column changes based on the product scope you select. Enter the name in the last column accordingly.
Option Description Product After selecting, enter the name or product code of the product in the Product field. This implies that the product should be present in the shopping cart in order to meet the condition. Product Family After selecting, enter a Product Family name in the Product Family field. When specified, one or more products from the specified Product Family should be present in the shopping cart in order to meet the condition. The number of products that should be present depends on the Match Rule. Product Group After selecting, enter a product group in the Product Group field. This implies that one or more products from the specified product group should be present in the shopping cart. The number of products that should be present depends on the Match Rule. Product Field Set
After selecting Product Field Sets in the product scope, an add icon (Product Field.) is displayed, add product fields. This implies that when the value of the field specified in the product scope matches the value of the field on the cart, the constraint rule condition is satisfied. You must add atleast one
- Click the add icon ().
- Select a product field from the picklist.
- Select an operator.
- Define the value of the product field in Value. Each of the Product Field has onepick list value from the product object.
The Product Field should be set up to have only one choice. If the choices are changed at a later time, the constraint rule conditions with Product Field Set specification should also be updated to have the correct values. Match Rule is not applied on Product Field Set based constraint rules. CPQ considers Match Rule as Match Any in Group by default in such case.
Product Option Group
After selecting this option, enter an Option Group ID associated with the bundle in the Product Option Group field. This implies that one or more products from the specified product option group must be present in the shopping cart. The number of products that must be present depends on the Match Rule.
If you define the constraint rule in CPQ Admin, enter the option group name associated with the bundle in the Product Option Group field.
Header Level This functionality is deprecated.
Click the setting icon (). A pop-up is displayed. Click CONDITIONS tab and fill in the details as explained below.
Option Description Condition Name The name is populated automatically. You can edit the name as you desire. Match In Primary Lines Selecting this means the condition is met only when the condition products are among the primary lines (bundle or standalone) of the shopping cart. Match In Options Selecting this means the condition is met only when the condition products are in the option line items of the shopping cart. Match in Cart Options Selecting this means the condition is met only when the condition products are among the cart line items of the shopping cart. Match in Location Selecting this means that constraint rules are executed within a location selected on the catalog. When the Sales rep selects a location and adds the condition product to the cart, constraint rule actions are executed. Upon changing the location, constraint rules are invoked again if conditions are met for the newly selected location. Match in Related Lines Selecting this means the condition is met only when the condition products are among the related line items (bundle or standalone) on the shopping cart. Match in Service Assets
Selecting this means the condition is met only when the condition product is a selected asset. An asset remains a selected asset while the Sales Rep is still on the Service Catalog. The selected asset considered a related line item if the Sales rep navigates to the Service Configuration, Service Cart after relating a service, or Installed Products page and returns to the Service Catalog.
Follow the below practices while defining Match in Service Assets:
- to exclude or include options from a bundle on the Configuration page, use Match in Related Lines.
- to exclude services on the Service Catalog, use Match in Service Assets.
- to exclude and include both services from Service Catalog and option in service bundle from the Configuration page, use Match in Service Assets and Match in Related Lines both.
Conga recommends that for the Inclusion type constraint rule, you must select Match in Service Assets and Match in Related Lines both for the functionality to work as expected.
CPQ creates related line items for service product added through auto-inclusion, which are deleted if you remove the auto-included service product
Select one of the following choices. The value is None by default. Match count is done before applying the criteria.
- None means that the rule condition is met if any one of the products in the product scope is selected. It is treated as Min/Max with Match Min Products as 1.
- Match Any In Group means that the rule condition is met if any one or more of the products from the group is selected. Match Any In Group is the same as Include Min/Max with Match Min Products as 1. It is also applicable to the Product Family and Product Field Set.
- Match All In Group means that all of the products from the group must be present in the shopping cart to meet the condition. This is applicable only to the product group and Product Family.
- Min/Max also requires you to specify a value in the Match Min Products field.
Match Min Products This field is applicable only when you select Min/Max from the Match Rule picklist. The condition is met, when the minimum number of products specified is selected from the Product Group, Product Family, or as specified by the Product Field Set specification. Match Max Products This field is applicable only when you select Min/Max from the Match Rule picklist. The condition is met, when the max number of products specified is selected from the Product Group, Product Family, or as specified by the Product Field set specification.
Match Rule is applicable to product scope of type Product Group, Product Family, and Product Field Set only.
- Click Save.
Click the flare icon () to define condition criteria. A pop-up is displayed.
- Click New Filter.
- Type a Field, an Operator, and type a Value. You can enter more than one criteria.
- Click Save.
You can add multiple conditions in a constraint rule. Click add icon () and follow the steps again.
You can also define condition association to define additional criteria to further filter the product scope condition. Next to IF(scope)..., select Custom from the drop-down menu. When there are more than one condition for a constraint rule, this field defines when to consider one or more of the conditions using AND/OR association. The sequence number defined in the Condition column is used as an identifier of the condition.
Few examples, you defined conditions with sequence numbers as 1, 2, 3, 4, 5, and 6. The following examples describe various condition association
(1 AND (2 OR 3))
|Either Conditions 1 and 2 or Conditions 1 and 3 must be satisfied on the cart|
|1 AND NOT 2||Condition 1 is in the cart while Condition 2 is not|
|1 AND NOT(2)||Condition 1 is in the cart while Condition 2 is not|
|1 AND 1||Only Condition 1 is evaluated on the cart. If you have defined multiple conditions, CPQ does not evaluate the remaining conditions|
|NOT(5 OR 6)||Neither Condition 5 or 6 are in the cart|
|NOT 5 AND 6||Condition 5 is not in the cart, but Condition 6 is in the Cart.|
It is recommended that you use logical operator - AND - to display the resultant record if all the conditions separated by AND is TRUE. For instance, (1 OR 2 ) AND (3 OR 4) AND 5. If you enter an invalid condition association, an error is displayed when you save the constraint rule.
You must set the Sequence for each condition or the Condition Association will be unreliable. Also, a constraint rule with only NOT in condition will not work. Example, NOT (1 AND 2).
The constraint rule conditions are created. You can now define a constraint rule action.