Anatomy of a rule
- Category — the domain it belongs to: capacity, assortment, ordering, transfer, pricing, distribution, or compliance.
- Enforcement mode — what happens when it triggers:
- Block — the action is rejected.
- Warn — the action proceeds with a warning.
- Log — the firing is recorded silently.
- Check level — what it evaluates: shop, brand, product, variant, inventory item, plan, or plan item.
- Condition — the test (a threshold or value), backed by live data fetched at evaluation time.
- Scope — which shops, brands, suppliers, products, variants, or collections it applies to. An empty dimension means “all”.
- Validation hooks — the moments it fires (see below).
- Violation message — the message shown when it triggers.
- Priority — the evaluation order.
When rules fire — validation hooks
Rules are attached to hooks that fire at specific points per plan type:| Moment | Hooks (per plan type) |
|---|---|
| Before adding an item | RESTOCK_PRE_ADD_ITEM, REBALANCE_PRE_ADD_ITEM, MARKDOWN_PRE_ADD_ITEM, PRE_SEASON_PRE_ADD_ITEM, SUPPLIER_RETURN_PRE_ADD_ITEM, SUPPLIER_EXCHANGE_PRE_ADD_ITEM |
| Before validating an item | RESTOCK_PRE_VALIDATE_ITEM, REBALANCE_PRE_VALIDATE_ITEM, MARKDOWN_PRE_VALIDATE_ITEM, PRE_SEASON_PRE_VALIDATE_ITEM |
| Before changing plan status | RESTOCK_PRE_CHANGE_STATUS, REBALANCE_PRE_CHANGE_STATUS, PRE_SEASON_PRE_CHANGE_STATUS, SUPPLIER_RETURN_PRE_CHANGE_STATUS, SUPPLIER_EXCHANGE_PRE_CHANGE_STATUS |
| When generating recommendations | RECOMMENDATION_PRE_GENERATE |
| On demand | MANUAL_CHECK (re-evaluate a plan from its validation panel) |
Templates
Rather than building rules from scratch, start from a template in the catalog — e.g. max plan value, max items per shop, max quantity per variant, OTB envelope caps, size-curve deviation, markdown discount/margin guards, and supplier policies. Pick a template, set its threshold and scope, choose Block or Warn, and assign it to a ruleset.Working with rules
Add rules from templates
Instantiate templates, set thresholds and scope, and choose the enforcement mode.
Every rule evaluation is recorded, so you can review which rules fired on a plan and
why. For the technical model (hooks, enforcement, paradigms, phases, the operations
layer), see Business rules engine.

