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 while the replacement rule displays a message with products that can be replaced. The recommendation rules support Product, Product Family, and Product Group.
  • The replacement rule helps you swap a product with another product. 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. When you select Action Criteria as the product scope, you must first create the constraint rule action and then edit the same constraint rule action to define an action criteria.

You should be careful not to put too many actions into a single constraint rule. Typically a ratio of no more than 5 actions per 1 constraint rule can help ensure the rules do not impact the performance of your system. You should test the constraint rules thoroughly before pushing them to a live environment.

Action criteria can be set up only when the product scope is Action Criteria. It is used to search for products when it is defined for inclusion type rule actions. For exclusion type rule actions, the criteria are used to match products in the shopping cart. The criteria can have only the product fields in case of inclusion and exclusion type rule actions.

In case of validation type rule actions, the criteria entries are based on the line item fields. Related fields of the line item object, such as the attribute value field, product configuration fields, and product fields can also be used. For validation type rule actions, when the criteria conditions are met, the rule action message is displayed. If the rule action is error type, the end user cannot finalize the configuration until the criteria condition values have changed to make the validation ineffective.

When using a constraint rule with an action 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.

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.

  1. On App Menu, click Apttus CPQ Admin and then click the CPQAdmin tab. The new admin console is launched.
  2. On the Products menu, click Manage Products.
  3. Search and click any product for which you want to define a constraint rule.
  4. Click Rules. The page displays different rules tab.
  5. Click Constraint Rule icon () next to the title, RULES. All the constraint rules associated with that product are displayed.
  6. Search and click the constraint rule.
  7. Fill in the required details under the THEN(statements)... section. Enter a number under Action column.
  8. From Action Type, select one of the following:

    OptionDescription
    ExclusionEnforces exclusion of certain products from the shopping cart.
    InclusionEnforces selection of certain products as specified by the product scope specification or criteria specification in the inclusion rule.
    RecommendationProduct recommendations are displayed when the condition is met.
    ReplacementProduct replacements are suggested when the condition is met.
    ValidationDisplays 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.

  9. From Action Intent, select one of the following:

    OptionDescription
    Check on FinalizationApplies rule action on finalization of the shopping cart.
    Disable SelectionDisables 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.

    1. Go to Setup> Create> Objects> Constraint Rule Action> Action Intent
    2. 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 MessageDisplays a message.
    Auto IncludeAdds 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.
  10. From Product Scope, select one of the following:

    OptionDescription
    Action Criteria

    The action criteria are defined using the flare icon ().

    ProductIn the Product field, click to select a product to be included or excluded.
    Product FamilyIn 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 GroupIn 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.
  11. According to the product scope you select, enter values in the last column.
  12. Click the setting icon (). A pop-up is displayed. Click STATEMENTS tab and fill in the details as explained below.

    OptionDescription
    Statement NameThe name is populated automatically. You can edit the name as you desire.
    Match In Primary LinesSelect this option to include or exclude the products that are primary line items (offering) based on your Action Type selection.
    Match In OptionsSelect this option to include or exclude the products that are options based on your Action Type selection.
    Match in Cart OptionsSelect this option to include or exclude the product that are cart line items based on your Action Type selection.
    Match in AssetSelect this option to auto-include or prompt to include 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.

    You can select Repeat Inclusion for Client-Side Constraint Rules as well. However, only one condition statement with product scope is supported on client-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.
    • 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.
    • Exclude Any: 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.

    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. 

    SequenceEnter a number to indicate the order in which constraint rule action messages should be displayed.
    Message TypeSelect 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 DetailsEnter 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.
  13. Click Save.
  14. Click the flare icon () to define action criteria. A pop-up is displayed.
  15. Click New Filter.
  16. Type a Field, an Operator, and type a Value. You can enter more than one criteria.
  17. 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.