Skip to content

The rules engine

Rules encode your sales logic: “this leg only exists for the wide body”, “leather bodies can’t take linen cushions”. They are authored as forms — no code — and the published configurator obeys them exactly.

Every rule reads the same way:

When this part… (driver) …is set to (driver variation)then this part… (target) …may show only these (allowed variations; others are disabled).

It’s an allow-list: you tick what remains valid, everything unticked is blocked while the driver sits on that value. Two edge cases are intentional:

  • All allowed — the rule has no effect yet; untick the variations you want to block.
  • Nothing allowed — hard-locks the target part while the driver is on this value. That’s a prerequisite gate: “you can’t pick a cushion until you’ve picked a compatible body.”

You choose, per product, how blocked variations appear:

  • Greyed out and unselectable (still visible) — good when shoppers should see that an option exists but is incompatible.
  • Hidden from the picker — a part whose options are all blocked disappears entirely. Combined with gates this enables main → child reveal flows: child parts only appear once the main choice makes them meaningful.

Rules are enforced at every entry point, not just on clicks:

  • If a selection change makes the current state invalid, the engine auto-corrects to the nearest valid configuration — shoppers can’t wander into a dead end.
  • Enforcement also runs at load time, so a stale deep-link or share URL that encodes a now-invalid combination is corrected on arrival.

Each rule can carry a hierarchy level — lower numbers are chosen first (main → child). Leave it at 0 unless you’re building a multi-step picker where choices unfold in a deliberate order.

You want Use
Parts that change together (one choice, many parts) Link groups
Alternative arrangements, one visible at a time Visibility groups
Combinations that are invalid or conditional Rules

Rules interact with links: a rule that blocks a variation a link tries to set wins — and the Setup Check flags the contradiction before you publish.