A ruleset defines a collection of pricing rules that apply to a selection of products. For more information about rulesets and their components, refer to the Rulesets and Rules concept page.
Rulesets support the following properties. An asterisk (*) indicates that the property is required.
|integer||A unique identifier for the ruleset, generated by Price Rules.||n/a|
|string (255)||An internal name of the ruleset. Intended to be used by Bold internally.||When the ruleset is created by an external app, |
|string (128)||An external unique identifier of the ruleset intended to be used by the merchant/partner. Can be any string that is unique for the application ID submitted in the request URL.||When the ruleset is created by an external app, the |
|string (255)||A public name to display promotional messages for this ruleset.||""|
|date(UTC)||The date and time when the ruleset was created.||n/a|
|date(UTC)||The date and time when the ruleset was last updated.||n/a|
|date (UTC)||The date and time when the ruleset should take effect.||none|
|date (UTC)||The date and time after which the ruleset is no longer in effect.||none|
|boolean||Indicates whether the ruleset is enabled. Setting active to ||true|
|integer||The priority of the ruleset. Price Rules evaluates rulesets in priority order, starting with the lowest value and ascending.||none|
|object||Defines the set of product items to which the ruleset applies. For details, see the Product selection reference in this guide. Learn how product selection works.||n/a|
|array||An array of conditions and actions based upon which a discount is calculated and applied. (For details, see the Rule properties reference in this guide. Learn how rules work.||n/a|
Rules are the basic unit of price adjustment in a ruleset. Each rule is tested against each selected product item in the customer’s cart. When a rule’s conditions are satisfied, Price Rules applies the rule’s pricing actions to the product items.
Price Rules supports the following rule properties. An asterisk (*) indicates the property is required.
|integer||A unique rule id, created by Price Rules for each rule automatically.||n/a|
|string||An external unique identifier of a rule. This can be used by the merchant/partner as a unique identifier for the specific rule condition/action.||n/a|
|string enumeration||The type of rule. Influences the order in which Price Rules resolves the rule. For details, see the Rule Type and Layers section. Learn more about how rule types work.||n/a|
|array||A list of conditions that define criteria for applying a rule to the product selection. For details, see the Conditions reference. Empty arrays (||none|
|array||A list of pricing actions to take when a rule’s conditions are satisfied. For details, see the Actions reference. Empty arrays (||none|
|integer||The priority of a rule relative to other rules within the same layer. For a tutorial, see Prioritization and stacking.||none|
|integer||Determines the order in which rules are resolved stackable layers. For details, see the Rule types reference in this guide. For a tutorial, see Prioritization and stacking.||none|
Rule types and associated layers
Each rule has a type, which influences the order in which Price Rules resolves the rule. Rule types map to layers, ranging from layer 0 (the base price) to layer 3. The Price Rules engine resolves rules starting at layer 0 and works “up” the stack to layer 3.
The layer associated with a rule type can support
stack_order, or both properties. Layer 0 and layer 2 apply the rule that yields the best price for the customer and do not support
stack_order. For a tutorial, refer to Prioritization and stacking.
Price Rules supports the following rule types:
|Type||Layer||Priority||Stack order||Best price|