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.

  1. On App Menu, click Conga CPQ Admin and then click the CPQ Admin 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:

    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:

    Check on FinalizationApplies rule action on finalization of the shopping cart.
    Disable SelectionDisables selection of excluded products.

    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.


    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:

    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. You search the product using product name or code.
    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.

    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 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 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 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. 

    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.

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.