Understanding Configurator Rules

Configurator Rules contain the logic that updates the configurator as a user interacts with the UI. For example, these rules can enforce constraints, calculate pricing, manipulate the 3D scene, and react to end-user events such as clicking on pages and entering data into fields.

 

Creating and Managing Configurator Rules

When editing a configurator,

  1. Highlight "Rules" and click the "+" to see a drop-down list of the types of rules you can add.  Click in that list to add a new rule of the type you need.

    The new rule appears in the design tree, inside a folder for that rule type.
    • Click the name of the new rule to rename it.
    • Drag the rule up or down within the folder to have it run before or after other rules of that same type. Learn more about rule order of execution.
  2. Highlight an existing rule and click the "..." context menu for a drop-down list of things you can do with that specific rule.


Types of Configurator Rules

Configurator Rules are organized into the following types:

Field Rule

A Field Rule is executed only whenever that specific field is edited by a user.   

Global Rule

A Global Rule is a library where functions, subroutines, and types can be defined once, so they can be used many times in any other rules in the configurator.

Global Event Rule

A Global Event Rule is also a library for code re-use, much like a Global Rule. However, Global Event rules also allow setting UI elements.

Keyboard Rule

Keyboard Rule is executed when the user presses a key on their keyboard and no field is in focus.   

Loaded Rule

A Loaded Rule is executed only when the configurator initially loads on your user's device screen.

Message Rule

A Message Rule is a special type of rule to send data from your configurator back to the web page containing it, or from your 3D scene back to the configurator containing it.

Naming Rule

Naming Rule allows a configurator to change the name and description of its configured product based on Snap logic.

Page Changed / Tab Changed / Expander Changed Rule

Page Changed Rule, Tab Changed Rule, or Expander Changed Rule is run immediately after the user moves from one of these UI containers to another.

Pricing Rule

Pricing Rule allows Epicor CPQ to calculate a total price for a configured product.

Resize Rule

A Resize rule is executed whenever the browser window containing Epicor CPQ changes in size.   

Submit Rule

A Submit Rule is executed when the user clicks "Add to Quote" on a configuration and finishes their work. 

Validation Rule

A Validation Rule allows a configurator to identify and communicate problems with a configuration to a user.

Value Rule

Value Rule allows a configurator to programmatically manipulate field values based on algorithms, formulas, and other business logic.

Visibility Rule

Visibility Rule allows a configurator to programmatically set show/hide and enable/disable options for pages, groups, and fields based on logic.

 

Considerations when Using Configurator Rules

Rules are Run in a Specific Order

Learn more about the order of execution for configurator rules.

Other Rules Available on Other Objects

While most Snap code is run in the context of a Configurator Rule like the ones listed here, there are also Quote Header Rules, Output Rules, Safe Functions3D Scene Rules, rules related to Nested Configurators, and rules that run as part of Integrations.

Was this article helpful?