This article describes the ways in which Rule Types and the Rules Engine works within Optimizely B2B Commerce.
B2B Commerce has six basic rule types by default:
Each rule type has a combination of rule type options. These options define the "IF" statement of the rule. New rule types and rule type options are created in the Admin Console, and require custom development in order to assign the rule types to the entity.
Using the rules engine
Out of the box, the rules engine is found under a Category's Products tab (for assigning Dynamic Rules), in the Personas section, in the Promotions section, in the Shipping & Fulfillment > Carriers section, in Page Variants, and in the Catalog > Restriction Groups section. While each instance of the engine contains different selectable options, the basic functionality remains the same.
Begin by choosing to match All or Any of the following rules, using the drop-down at the top of the engine. All requires that each rule be true for the results to execute, while Any allows any one of the rules to be true in order to render the result.
Select a Rule Type using the drop-down list, and fill out the remaining fields as applicable. See the Rule Type Options article for a list of all Rule Type Options.
Finally, select if the rule requires an additional Rule Group. Add a rule group to reveal an additional drop-down with AND/OR logic options. If the rule requires all/any of the rules in the first group AND all/any of the rules in the second group to be true to execute the result, select AND. If the rule can execute with either all/any of the rules in the first group OR all/any of the rules in the second group, select OR.
While multiple Rule Groups may be added to one rule, all Groups must use either the AND or the OR logic option; both options may not be used on the same rule.