Download PDF
Download page Creating Constraint Rule Actions.
Creating Constraint Rule Actions
Constraint rule actions are performed, when certain constraint rule conditions are met. A rule action can be of inclusion, exclusion, validation, recommendation, or replacement type.
- An inclusion rule action enforces selection of certain products as specified by the product scope specification or criteria specification in the inclusion rule.
- Similarly an exclusion rule action enforces exclusion of certain products from the shopping cart.
- The validation rule displays an error message when the criteria conditions are met.
- The recommendation rule displays products based on the condition. The recommendation rules support Product, Product Family, and Product Group.
The replacement rule helps you swap a product with another product by displaying a message with products that can be replaced. This is useful when an organization decides to discontinue a product and prompts you to go for a replacement.
CPQ supports replacement rules on ABO carts only for Swap and Split-Swap.
While creating a constraint rule action, when you select product scope as Product, you must enter details only in the Product field. Similarly, when you select product scope as Product Family or Product Group, you must enter details in their corresponding fields only.
You should be careful not to put too many actions into a single constraint rule. You must follow the best practices while defining Constraint Rules. Refer to CPQ on Salesforce Best Practices: Governor Limits. You should test the constraint rules thoroughly before pushing them to a live environment.
For Validation type constraint rules, you can set up action criteria by defining product scope as Action Criteria. Action criteria validate the condition against the criteria you defined and executes the action intent. For example, based on your company's requirement, you cannot sell more than 3 units of Product A at a time. In this case, for condition as Product A, you can define action criteria to validate if the quantity of Product A is more than 3. If the quantity is more than 3, CPQ executes the action intent which could be an error or a warning.
When the criteria conditions are met, based on the action intent the rule action message is displayed either instantly or upon finalization. You can use the line item fields and related fields of the line item object, such as the attribute value field, product configuration fields, and product fields can also be used. When you use a constraint rule with action criteria for a product with multiple line items, the system only validates the primary line item to evaluate the constraint rule.
If the rule action is error type, the Sale rep cannot finalize the configuration until the criteria condition values have changed to make the validation ineffective.
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.
To create a Constraint Rule Action
You must have an existing constraint rule header with an existing rule condition. Select the constraint rule header. The Constraint Rule detail page appears.
- On App Menu, click Conga 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 THEN(statements)... section. Enter a number under Action column.
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.
Action Type selection impacts the options available for Action Intent.Constraint rules of Action Types = Recommendation and Replacement do not support Condition Criteria and work only for the Product Scope.
From Action Intent, select one of the following:
Option Description 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.
If the value Hide is not present in the picklist, you can add the value in the picklist by following the steps below.
- Go to Setup> Create> Objects> Constraint Rule Action> Action Intent
- Click New. Type Hide and click Save.
After adding the value, on the Action Intent details page find the field Controlling Field under the section Picklist Options and click [Change]. Double-click Hide below Exclusion (do not select Hide for any other Action Types). Click Save.
Prompt Displays a message with choices of products that you can select or remove.
Show Message Displays a message. 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 will not apply when the match rule value is Include All.From Product Scope, select one of the following:
Option Description Action Criteria The action criteria are defined using the flare icon ().
Product In the Product field, click to select a product to be included or excluded. You search the product using product name or code. Product Family In the Product Family field, enter a Product Family. 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 In the Product Group field, enter a Product Group. One or more of the products from the Product Group will be included or excluded based on rule type and match rule specifications. - According to the product scope you select, enter values in the last column.
Click the setting icon (). A pop-up is displayed. Click STATEMENTS tab and fill in the details as explained below.
Option Description Statement Name The name is populated automatically. You can edit the name as you desire. Match In Primary Lines Select this option to include or exclude the products that are primary line items (offering) based on your Action Type selection. Match In Options Select this option to include or exclude the products that are options based on your Action Type selection.
When you define an auto-inclusion constraint rule action on option, CPQ overrides default selection in the option group if the option group has Max Options set to 1. However, if the option is manually selected by the Sales rep, CPQ does not override the selection.
Match in Cart Options Select this option to include or exclude the product that are cart line items based on your Action Type selection. Match in Asset Select this option to exclude, auto-include, or prompt to include or exclude a product, product family, or product group when a product does not already exist as an installed product. Repeat Inclusion Indicates that every time you add a condition product the action product is auto-included. For example, adding Product A to the cart auto-includes Product B then, if you add Product A to the cart again, Product B is auto-included again. By default, action product is only auto-included once.
Repeat Inclusion is supported only with product scope on server side.
Min/Max 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.
When you configure a constraint rule with Action Type = Exclusion and Min/Max Match Rule = Exclude After One, if the sales representative adds the product for the first time, CPQ displays a constraint rule message on the cart in the “Client” mode.
- 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.
When you define Min/Max for options at Option Group level, then Option Group level configuration is honored over the Min/Max Match Rule for prompt type inclusion constraint rule. Hence, if the maximum value that is configured at Option Group level is satisfied then the remaining options are disabled.
Sequence Enter a number to indicate the order in which constraint rule action messages should be displayed. Message Type Select from Error and Warning. If you select Error, you cannot finalize the cart unless you satisfy the constraint rule and 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 in multiple languages. For inclusion and exclusion type rule actions product name substitution parameter {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 the flare icon () to define action 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 actions in a constraint rule. Click add icon () and follow the steps again.
Constraint rule actions are created which will trigger when a constraint rule condition is met.
For constraint rules where Action Type = Exclusion and Product Scope = Product, CPQ now displays validation error messages from constraint rule actions as hyperlinks on the Configuration page or Cart page. Clicking on the hyperlink highlights the excluded product set in the product scope.