Configuration Constraint Rules

Overview

What Are They?

Constraint rules are used to let the user know which values are and are not allowed to be selected in a particular configuration. While a constraint is active, the user can not advance to commerce.

How Do They Work?

A constraint rule has a condition and an action. You can choose attribute values for the condition, when the conditions are met the defined action is performed. You can also enter a message that alerts the user that the configuration cannot have the selected set-up. The rule becomes inactive when the buyer re-selects values that are appropriate for either the action or condition attribute(s). Constraint actions can be defined as simple-action or table-based actions.

ClosedMultiple Constraint Rules on the Same Action Attribute

In the case of multiple constraints defined on the same action attribute, the rules are first ordered using the following criteria (in sequence):

  1. Descending order by product hierarchy (model-level first and all-product family level last)
  2. Descending order by number of rule inputs (rules with single-inputs fire first)
  3. Ascending order by order number

The sorted rules are then applied on after the other to display the constraint messages in sequence.


ClosedConstraints and Recommendations

Constraints and recommendations can be applied together. Constraints are applied to all the attributes, followed by recommendations and then constraints will be run again.

The constraints are applied in two passes. The first pass to apply constraints determines the constrained action attributes to which the application of recommendations (if any) is skipped.

The recommendations are applied to only non-constrained action attributes. Constraints are run a second time to determine if any new constraints may have been triggered as a result of running the recommendations. So when the end-user makes changes to the attributes which are constrained and updates the configuration, new recommendations which were not run earlier (due to the earlier constraints) will also run which might trigger new constraints which are caught by the second pass of constraint application.


ClosedAJAX Constraint Rules

Constraint rules can run through AJAX resulting in faster performance and a dynamic user experience in configuration.

AJAX can be enabled for any constraint or hiding configuration rule. Unlike other rules, that are evaluated only if the attributes are set to auto update or if a user clicks the Update action, AJAX rules are evaluated and the action is performed instantly when a user changes any rule input. Input can be condition and action attributes or action inputs. AJAX rules are re-run when a user clicks the Update button.

Notes:

  • Constraint rule functionality will remain the same with AJAX. AJAX rules will support advanced condition and actions, table-based rules, and reverse constraint behavior. The exception to this are rules that have arrays as condition/action attributes or action inputs. AJAX constraint rules do not automatically hide the Pricing and Recommended Item sections when the user selects a constrained value. If the user performs an Update action, then these additional sections will be hidden. Also, constraint messages that are displayed below the main content when constraints exist in some other tab are not removed via AJAX.
  • Recommendation messages will appear/disappear via AJAX for attributes that are inputs/action attributes of AJAX rules. It should be noted that this does not imply that recommendation rules are fired by AJAX. Recommendation rules will only be fired when the user performs an Update action. However, if a recommendation rule has already fired on an attribute and that attribute is a part of an AJAX rule, then the recommendation value setting and messages will occur via AJAX.
End-User Interaction

With AJAX rules, the end user will experience a faster, more dynamic Model Configuration page.

AVP (Attribute Value Pricing ) will not automatically update is the user selects a constrained value that is constrained through an AJAX rule. Users will see the correct pricing upon performing an Update action.


Administration Pages

ClosedConstraint Rule Page

Constraint Rule Page

Item Description

1

The rule Actions menu provides the following functions:

  • Translations: Add translations for a rule.

  • Email the rule summary to the specified recipients.

  • Print the rule summary.

2

The Basic Details section contains general information about the rule.

  • What is the rule type? The rule type, after saving the value is read-only.

  • Name: The name of the rule

  • Variable Name: The variable name of the rule, after saving the value is read-only.

  • Description: The description of the rule.

    Click the Summarize Summarize icon to leverage generative AI to automatically produce human-readable summaries of rule logic, helping administrators quickly grasp the purpose and impact of rules without parsing complex expressions or condition sets.

  • Status

    • Active: Rule is fired when the condition is met.

    • Internal: Rule is active only for FullAccess users; it is inactive for all other users.

    • Inactive: Rule is not fired, even if the condition is met.

  • Effective Start Date and Effective End Date specify how long the rule will remain in the chosen status. If no duration is specified, the rule maintains its status until an administrator changes it.

  • Ajax enabled for JET UI: When enabled, the rule will automatically run when conditions are met. The rule will run without refreshing the page or performing an action.

3

The When section is used to define the conditions that specify when a rule should run. There are three options: Always True, Simple, and Advanced.

Always True: The rule will fire automatically, every time, because there are not any conditions to be met.

ClosedSimple: The rule will fire if the conditions you define using the rule editor are met.

Add conditions to select the necessary condition attributes and define the conditional values.

  • To add a conditions, click +Add Condition.
  • To edit a condition, click on the applicable condition.
  • To remove a condition, click the Delete Trash icon icon.

The order in which the conditions are evaluated in are defined in the Add or change () to change grouping field.

  • Click Match All if all of the conditions must be met.
  • Click Match Any if any condition needs to be met.
  • Click in the Add or change () to grouping field to define custom grouping.
    For example, (1 OR 2) AND 3

ClosedAdvanced: Use the BML function editor to define complex condition logic.

  • Click Convert to Advanced Condition to convert the simple condition to an advanced condition.

4

The Then section is used to define actions (i.e. what will happen if the conditions are met).

  • Simple: Use the rule editor to select attributes and values to constrain or allow.
  • Table Based: Select attributes and values to constrain or allow from a data table.

Administration

ClosedAdd / Edit a Constraint Rule

Complete the following steps to add or edit a Configuration constraint rule.

  1. Navigate to the desired product level:

    • All Product Families:  Admin Home > Configurations
    • Product Family: Admin Home > Configurations > Product Family
    • Product Line: Admin Home > Configurations > Product Family > Product Line
    • Model: Admin Home > Configurations > Product Family > Product Line > Model
  2. Click the Edit Edit icon icon for the desired level.
  3. Select Rules in the left navigation.
  4. Create or edit a rule:

    • To create a new rule click + Rule. 

    • To edit an existing rule, click on the desired rule.

  5. Define or edit the Basic Details options:

    • What is the rule type? Constraint.
    • What is the rule name? Enter the name of the rule.
    • Variable Name: Enter a variable name for the rule. The Variable Name field populates automatically. The entry can be changed before saving, but after saving the value is read-only. Variable names can only contain alpha-numeric characters and underscores.

    • Description: If desired, enter a rule description.

      Click the Summarize Summarize icon to leverage generative AI to automatically produce human-readable summaries of rule logic, helping administrators quickly grasp the purpose and impact of rules without parsing complex expressions or condition sets.

    • Ajax enabled for JET UI: When enabled, the rule will automatically run when conditions are met. The rule will run without refreshing the page or performing an action.
    • Set the Effective Start Date and Effective End Date to specify how long the rule will remain in the chosen status.
      If no duration is specified, the rule maintains its status until an administrator changes it.

    • Set the status: 

      • Active: Rule is fired when the condition is met.
      • Internal: Rule is active only for FullAccess users; it is inactive for all other users.
      • Inactive: Rule is not fired, even if the condition is met.
  6. Set the Condition Type and add conditions in the What section.

    ClosedAlways True The rule fires automatically.

    ClosedSimple Select attributes and define simple conditions.

    ClosedAdvanced Use the function editor to select attributes and define advanced conditions.

  7. Define constraints in the Then section.

    Set the action type and add constraints:

    ClosedSimple Use the rule editor to select attributes and define constraints.

    1. Set Action Type to Simple

    2. To add a constraint, click + Add Constraint

      1. Select an attribute from What is the attribute to constrain?

        Note: You cannot constrain values for SSPL attributes.

      2. Select the constraint type.

      3. ClosedAll: Constrain all values for the selected attribute.

        1. Set Constraint Type to All

        2. To override the constrained values display, select Override Constrained Values Display? then choose the Display Style.

          • Disabled: Constrained attribute values will be disabled.

          • Removed: Constrained attribute values will be removed from the menu.

          • Normal: Constrained attribute values will appear in menus without being marked.

          • Strike Through: Constrained attribute values will be struck through (i.e. crossed out).

            The Strike Through option is not available for Image Menus.

        3. Enter the Message to show on an invalid selection.

          • Click the Generate Simple Message Auto Generate icon icon to create an automated message.

          • Click Use an Advanced Expression to Define the Message to use BML to define a message.

            Click Define BML Function, enter the Function Script, then click Save.

        4. Click Create.

        ClosedSimple Selection: Select applicable values and define constraint behavior.

        1. Set Constraint Type to Simple Selection.

        2. Specify constraint values:

          • For Boolean attributes, select the Value: True or False

          • For Currency, Date, Float, and Integer type attributes:

            Select the Operator and specify the Value.

          • For Text type attributes, enter the Values to Constrain.

          • For Menu type attributes:

            • Select menu options from Select Values

            • Set the Constraint Behavior:

              • Do not allow selected values (constrain)
              • Only allow selected values (allow or reverse constraint)
            • To override the constrained values display, select Override Constrained Values Display? then choose the Display Style.

              • Disabled: Constrained attribute values will be disabled.

              • Removed: Constrained attribute values will be removed from the menu.

              • Normal: Constrained attribute values will appear in menus without being marked.

              • Strike Through: Constrained attribute values will be struck through (i.e. crossed out).

                The Strike Through option is not available for Image Menus.

        3. Enter the Message to show on an invalid selection.

          • Click the Generate Simple Message Auto Generate icon icon to create an automated message.

          • Click Use an Advanced Expression to Define the Message to use BML to define a message.

            Click Define BML Function, enter the Function Script, then click Save.

        4. Click Create.

        ClosedAdvanced Function: Use BML to define values.

        1. Set Constraint Type to Advanced Function.

        2. Click Define BML Function, enter the Function Script, then click Save.

        3. For Menu type attributes:

          • Set the Constraint Behavior:

            • Do not allow selected values (constrain)
            • Only allow selected values (allow or reverse constraint)
          • To override the constrained values display, select Override Constrained Values Display? then choose the Display Style.

            • Disabled: Constrained attribute values will be disabled.

            • Removed: Constrained attribute values will be removed from the menu.

            • Normal: Constrained attribute values will appear in menus without being marked.

            • Strike Through: Constrained attribute values will be struck through (i.e. crossed out).

              The Strike Through option is not available for Image Menus.

        4. Enter the Message to show on an invalid selection.

          • Click the Generate Simple Message Auto Generate icon icon to create an automated message.

          • Click Use an Advanced Expression to Define the Message to use BML to define a message.

            Click Define BML Function, enter the Function Script, then click Save.

        5. Click Create.

    ClosedTable Based Select values to constrain or allow from a Data Table.

    1. Select the applicable Data Table from the Select Table menu.

    2. To add a Data Table filter, click Specify Filter.

      1. Click + Add Filter, then add the following:

        • Select the applicable Table Column and Operator.

        • Set the Value Type

          • Static: Enter specific values.

          • Attribute: Choose an attribute for the value.

        • Enter or select the applicable Value or Value Attribute.

        • Click Save.

      2. To add another filter, click +Add Filter, then define the table column, operator, and value.

      3. Set the filter match criteria:

        • Match All if all of the conditions must be met.

        • Match Any if any condition needs to be met.

        • Click in the Add or change () to grouping field to define custom grouping.

          For example, (1 OR 2) AND 3

      4. Click the Delete Trash icon icon to remove a filter.

    3. Select attributes to constrain.

      1. Click Select Attributes, then click + Add Constraint.

        • Select the Attribute to constrain.

          Note: You cannot constrain values for SSPL attributes.

        • Select the Table Column that will populate the attribute.

        • Set the Constraint Behavior:

          • Do not allow selected values (constrain)
          • Only allow selected values (allow or reverse constraint)
        • What is the message to show on an invalid selection?

          • To enter static messages, select Static then enter the Message.

          • To select messages from a table, select Column then select the Column with the messages.

        • Click Save.

      2. To add another constraint, click +Add Constraint, then define the attribute, table column, and message.

      3. Click the Delete Trash icon icon to remove a constraint.

    4. Click Test Table Results, then click Execute to view the constraint results.

  8. To add translations, select Translations from the Actions menu.

  9. Click Create or Save.


ClosedDelete a Rule

Warning: Deleted rules cannot be recovered.

Complete the following steps to delete a configuration rule.

  1. Navigate to the desired product level:

    • All Product Families:  Admin Home > Configurations
    • Product Family: Admin Home > Configurations > Product Family
    • Product Line: Admin Home > Configurations > Product Family > Product Line
    • Model: Admin Home > Configurations > Product Family > Product Line > Model
  2. Click the Edit Edit icon icon for the desired item.
  3. Select Rules in the left navigation.
  4. Right click on the configuration rule's actions ellipsis, then select Delete.
  5. Click Delete in the confirmation dialog.

Notes

Notes:

  • SSPL attributes cannot be added to Constraint rule Simple or Table Based Actions.
  • AJAX Rules are supported on Search Flow and Model Configuration pages.

  • AJAX Rule with fewer action attributes - AJAX rules update the page using JavaScript post page loads. Because of this, it is important to limit the number of attributes affected per AJAX call.

  • If an AJAX rule fails to evaluate properly, the action will be timed out for 2 minutes. The end user can continue to interact with the page after that.

  • AJAX Rule without SOAP/ Table Queries – AJAX rules are not recommended to be used on rules with a large amount of BML, SOAP calls, or table queries as it could adversely impact performance and hence, end user experience.

  • AJAX rules are not supported for the default wizard.

  • AJAX rules are meant primarily for User Interface (UI) clicks and get triggered when the parent attribute is modified. Including when using AJAX/access rules, the "read-only" behavior is triggered when the UI click satisfying the condition is done; therefore, the field can be modified first and then the UI click can make it read-only and still the modified value can be saved.

  • AJAX rules are designed for UI behavior and do not provide the functionality to honor access rules in API and import. For APIs/import line items a validation rule should be written to prevent updating/overwriting the value on a column based on conditions.

Related Topics

Related Topics Link IconSee Also