# Rules — conditional logic

> Show, hide or grey out questions and answers depending on what the customer picks.

Source: CBX documentation, version 4.0 preview (unreleased). Canonical page: https://docs.configbox.at/docs/4.0-preview/admin-guide/rules/. Last updated 2026-07-20.

---
> **Audience:** store admins · **Scope:** making the configurator dynamic · **Last reviewed:** 2026-07-20

**TL;DR** — A rule answers one yes/no question: *given the customer's current selections (and who
they are), does this question or answer apply?* Attach rules to questions and answers and the
configurator reshapes itself live — irrelevant options disappear or grey out, dependent questions
appear, invalid combinations become impossible.

## Articles

1. **[Build a rule](https://docs.configbox.at/docs/4.0-preview/admin-guide/rules/build-a-rule)** — the visual rule editor: conditions, operators, AND/OR,
   parentheses, show-if vs hide-if.
2. **[Control what happens on change](https://docs.configbox.at/docs/4.0-preview/admin-guide/rules/control-what-happens-on-change)** — the companion
   settings: hide vs grey out, auto-selecting defaults, resolving selections that became invalid.
3. **[Rule recipes](https://docs.configbox.at/docs/4.0-preview/admin-guide/rules/rule-recipes)** — ready-made patterns for the situations every
   configurator runs into.

## Where rules live

- **On a question** — controls whether the whole question shows.
- **On an answer** — controls whether that single choice is available within its question.

No rule means "always show". The rule editor opens from the **Rule** section of the question or
answer form.

## What rules can react to

- **Answers to questions** — what the customer picked or entered elsewhere ("Answer in *Material*
  is *Oak*"). The everyday case.
- **Results of calculations** — a computed number crosses a threshold ("Result of *Total span* is
  above 4") — this is how rules react to dimensions, weights and totals.
- **Customer** — who is configuring ("customer-group field *is_trade* is 1") — for trade-only
  options and segment-specific behavior.
- Stores with developer-built extensions may show additional condition tabs (e.g. **Custom
  Conditions**).
