Download PDF
Download page Configuring a Constraint Rule Using the Advanced Rule Setup.
Configuring a Constraint Rule Using the Advanced Rule Setup
This section provides information on configuring a constraint rule using the Advanced Rule Setup. You may have created a constraint rule for a product or a product group. When you click Advanced Rule Setup on the rule creation page, the rules details page with the Conditions & Actions tab is displayed. You must configure a condition and an action to complete constraint rule creation.
Creating a Constraint Rule Condition
On the Conditions & Actions tab, under the CONDITIONS section, click Add Condition.
Select one of the following options from the Scope drop-down. The last column changes based on the scope you select. Enter a value name in the last column accordingly.
Option Description Product This implies that the product must be present in the shopping cart to fulfil the condition.
- From the Scope drop-down, select Product.
- From the Operator drop-down, select Equals To.
- In the Product field, search and select a product.
Product Family This implies that one or more products from the specified product family must be present in the shopping cart to fulfil the condition. The number of products that should be present depends on the Match Rule.
- From the Scope drop-down, select Product Family.
- From the Operator drop-down, select Equals To.
- In the Product Family field, search and select a product family.
Product Group This implies that one or more products from the specified product group must be present in the shopping cart to fulfil the condition. The number of products that should be present depends on the Match Rule.
- From the Scope drop-down, select Product Group.
- From the Operator drop-down, select Equals To.
- In the Product Group field, search and select a product group.
Product Field Set 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 fulfilled. You must add at least one product field. After selecting Product Field Set on the Scope drop-down, the + Add Field button is displayed to add product fields.
- From the Scope drop-down, select Product Field Set.
- Click Add Field.
- Enter the following details:
- Product Field: Select a product field from the drop-down.
- Operator: Select an operator.
- Value: Enter the value of the product field. Each product field has one picklist value from the product object.
You must set up the product field to have only one choice. If you update the choice later, you must also update the constraint rule condition with the product field set specification to have the correct values. Match Rule is not applied to product field set-based constraint rules. CPQ considers Match Rule as Match Any In Group by default in such cases.
Product Option Group This implies that one or more products from the specified product option group must be present in the shopping cart to fulfil the condition. The number of products that must be present depends on the Match Rule.
- From the Scope drop-down, select Product Option Group.
- From the Operator drop-down, select Equals To.
- In the Product Option Group field, search and select an option group ID associated with the bundle.
- Click the Condition Criteria icon to define a constraint rule condition based on criteria. The Add Criteria pop-up is displayed. You can enter more than one criteria.
- On the Conditions tab, click Add Criteria and enter the following details:
- Field: Select a field on the product.
- Operator: Select an operator.
- Value: Enter a value.
- Click Add Criteria to add more criteria.
- Click the Remove icon to delete a criteria.
- Click Remove All to remove all criteria.
- Turn the Logic button on if you have more than one criteria and enter a value in the Logic field.
- On the Actions tab, define the criteria. For more information, see Creating a Constraint Rule Action.
- Click Save.
- On the Conditions tab, click Add Criteria and enter the following details:
- Click the Advanced Setup icon to define advanced conditions. The Advanced Setup pop-up is displayed. You can define advanced logic if there is more than one conditions.
- On the Conditions tab, enter the following details:
- Condition Name: The name is populated automatically. You can edit the name if required.
- Match In: Select an option where the condition match must happen. Supported values are:
- 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.
- Options: Selecting this means the condition is met only when the condition products are in the option line items of the shopping cart.
- Cart Options: Selecting this means the condition is met only when the condition products are among the cart line items of the shopping cart.
- Location: CPQ does not support this option currently.
- Match Rule: Select one of the following choices.
There is no default value, which 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 count is done before applying the criteria.- 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 min/max range.
- Min Products: Enter a value for minimum products.
- Max Products: Enter a value for maximum products.
- On the Actions tab, define the action. For more information, see Creating a Constraint Rule Action.
- Click Save.
- On the Conditions tab, enter the following details:
- click Add Condition. to add more conditions.
- Click the Remove icon to delete a condition.
- Click Remove All to remove all conditions.
- Turn the Logic button on and enter a value in the Logic field when you add multiple conditions.
When there is 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 associations:
Condition Association Description (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 nor 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 the logical operator "AND" to display the resultant record if all the conditions separated by AND are 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 does not work. Example, NOT (1 AND 2).
The constraint rule conditions are created. You can now define a constraint rule action.
- Click Save on the Conditions & Actions tab.
Creating a Constraint Rule Action
- On the Conditions & Actions tab, under the ACTIONS section, click Add Action.
From Action Type, select one of the following:
Option Description Exclusion Enforces exclusion of certain products from the shopping cart. Inclusion Enforces selection of certain products as specified by the product scope specification or criteria specification in the inclusion rule. Recommendation Product recommendations are displayed when the condition is met. Replacement Product replacements are suggested when the condition is met. Validation Displays the error message when the criteria conditions are met. Clone Enables cloning of a product multiple times based on criteria.
Action Type selection impacts the options available for Action Intent as shown in the following table:Rule Type Selected Options Available on the Action Intent Drop-Down Inclusion - Auto Include
- Prompt
- Show Message
- Check on Finalization
Exclusion - Prompt
- Show Message
- Check on Finalization
- Disable Selection
- Hide
Validation - Show Message
- Check on Finalization
Recommendation - Prompt
- Show Message
- Check on Finalization
Replacement - Prompt
- Show Message
- Check on Finalization
- Constraint rules of Action Types = Inclusion and Exclusion supports Match In Assets.
- Constraint rules of Action Types = Recommendation and Replacement do not support Condition Criteria and work only for the Scope.
From Action Intent, select one of the following:
Option Description Auto Include Adds selected products automatically. When the number of products selected by the rule action is more than the number mentioned in the Match Rule condition, auto-inclusion of products is not triggered. A message is displayed from the rule action instead.
Note: Auto Include is not applicable when the Match Rule value is Include All.
Prompt Displays a message with choices of products that you can select or remove.
Show Message Displays a message. Check on Finalization Applies rule action on finalization of the shopping cart. Disable Selection Disables selection of excluded products. Hide Hides the selection of excluded products.
Select one of the following options from the Scope drop-down. The last column changes based on the scope you select. Enter a value name in the last column accordingly.
Option Description Product - From the Scope drop-down, select Product.
- In the Product field, search and select a product to be included or excluded.
Product Family - From the Scope drop-down, select Product Family.
- In the Product Family field, search and select a product family to be included or excluded. One or more of the products from the product family will be included or excluded based on rule type and match rule specifications.
Product Group - From the Scope drop-down, select Product Group.
- In the Product Group field, search and select a product group to be included or excluded. One or more of the products from the product group will be included or excluded based on rule type and match rule specifications.
Action Criteria Click Edit Action Criteria or the Condition Criteria icon to define a constraint rule action.
The condition criteria icon shows up when the Action Type is set to Validation.
- Click Action Expression to open formula builder to define how many times a product should be cloned. Click Save.
- Click the Condition Criteria icon to define a constraint rule action based on criteria. The Add Criteria pop-up is displayed. You can enter more than one criteria.
- On the Actions tab, click Add Criteria and enter the following details:
- Field: Select a field on the product.
- Operator: Select an operator.
- Value: Enter a value.
- Click Add Criteria to add more criteria.
- Turn the Logic button on if you have more than one criteria and enter a value in the Logic field.
- Click Save.
- On the Actions tab, click Add Criteria and enter the following details:
- Click the Advanced Setup icon to define advanced actions. The Advanced Setup pop-up is displayed.
- On the Conditions tab, update the conditions if required.
- On the Actions tab, enter the following details:
- Action Name: The name is populated automatically. You can edit the name if required.
- Match In: Select an option where the action match must happen. Supported values are:
- Primary Lines: Select this option to include or exclude the products that are primary line items (offering) based on your Action Type selection.
- Options: Select this option to include or exclude the products that are options based on your Action Type selection.
- Cart Options: Select this option to include or exclude the products that are cart line items based on your Action Type selection.
- Assets: Select this option to include or exclude the products that are assets based on your Action Type selection.
- Match Rule: Applies to inclusion and exclusion type rule action only, and that has product scope as Product Family, Product Group, or Action Criteria. Select any one of the following to complete the rule action:
- None: No product selection is allowed.
- For inclusion type constraint rule:
- Include Any: Allows selection of up to one product. Rest of the products in the prompt are disabled.
- Include All: Allows selection of all products within the Product Group or Product Family. Note: Only this match rule works with Action Intent Auto Include.
- Include Min/Max: Requires a minimum number of products specified in the Min Products field.
- For exclusion type constraint rule:
- Exclude All: All the products are excluded.
- Exclude After One: Allows selection of only one product. Any other selection will trigger the rule action.
- Exclude After Max: Allows selection of a maximum number of products specified in the Max Products field. Any other selection over and above the specified number will trigger the rule action.
- Message Type: Select one of the following values:
- Error: If you select Error, you cannot finalize the cart unless you satisfy the constraint rule
- Warning: If you select Warning, you can finalize the cart but the warning message is displayed on the cart until you satisfy the constraint rule.
- Message Details: Enter text to be displayed when the rule action is effective. These messages can also be translated into multiple languages. For inclusion and exclusion type rule actions product name substitution parameters {0}, {1} can be used. For example: {0} requires {1}. For validation type rule actions only {0} will be substituted by triggering products.
- Click Save.
- Click Save on the Conditions & Actions tab.