Configure-to-Order Rules Lab
A working configurator for a fictional commercial mortise lock. Change an option and watch the constraints repair the configuration, the 150% BOM resolve to the order BOM, and the routing and dealer net price follow. Move the order date to see a revision cut in and a finish phase out.
The product, part numbers and prices are invented. The modelling approach is the one configure-to-order manufacturers actually use: describe what can't be built, not every combination that can. Background in the glossary: 150% BOM, constraint, effectivity.
Configure
This configuration
Valid and buildable
Configuration code
Bill of materials
| Line | Part number | Description | Qty |
|---|
Price
Routing
| Op | Operation | Minutes |
|---|
Every constraint in the model, and whether the current configuration satisfies it.
| Rule | What it says | Attributes | Now |
|---|
The one list that holds every part any configuration could need. Each line has a condition; configuring filters it down to this order's BOM.
| Line | Description | Used when | This order |
|---|
Saved configurations with known correct outcomes. In real work this suite runs before every rule release, so a fix never quietly breaks something else.
| # | Test | Configuration | Result | Detail |
|---|
The model
The lock is described by eight attributes and their options, plus an order date. Eight constraints say which combinations are not allowed. Instead of listing every valid lock, the model lists what can't be built, which is how most configure-to-order products are modelled.
Blocking and repairing
Before you pick an option, the lab checks whether it would break a rule with your other choices and disables it, naming the rule. When you change something that makes an earlier choice invalid, the lab repairs that choice and tells you why, the way a good configurator guides a dealer rather than failing at checkout.
From generic BOM to order BOM
Every part lives in one 150% BOM, each line with a condition. The configuration filters it to a 100% BOM. The same choices select the routing operations and build up the list price, with a dealer multiplier for the net price.
Effectivity
Two dated rules show effectivity. The return lever moves from rev A to rev B on 1 December 2026 without anyone editing the BOM, and oil-rubbed bronze is phased out for orders dated on or after 1 January 2027.
Testing
Eighteen test configurations check that every rule fires when it should, that valid locks get the right parts, and that the price builds up correctly. The code is plain JavaScript; you can read it in rules-lab.js.