Rule Type Catalog
The sixteen configurable rule types: what each one is for, its parameters, the refusal the user sees, and how to simulate it before activating.
A rule type stays compiled, tested Go code: the consultant picks a type, sets thresholds and a scope, never hard-coded business logic. The sixteen sheets below all follow the same plan: what it's for, tables and timing, possible scopes, parameters, what the user sees on a refusal, how to simulate it, and the normative reference when one exists.
Over-receipt tolerance sur_reception
Caps the gap between ordered and received quantity at goods receipt, as a percentage and/or an absolute amount.
| Type | reception_items |
|---|---|
| Scope | Tenant, supplier, item |
| When | On entry |
| Without configuration | No limit applies |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
pct_max | Number | Optional | 5 |
abs_max | Number | Optional | 10 |
illimitee | Boolean | Optional | false |
What the user sees
{
"code": "sur_reception",
"params": { "commande": "…", "recu": "…", "maximum": "…" },
"message": "receipt beyond tolerance: ordered 100, received 120, maximum allowed 105. Adjust the received quantity or have the over-receipt tolerance raised."
}HTTP 400 · sur_reception
Simulate
{
"rule_type": "sur_reception",
"scope_type": "tenant",
"params": { "pct_max": 5, "illimitee": false },
"jours": 90
}Normative reference
—
Customer credit limit limite_credit_client
Refuses a customer order or invoice being firmed if it pushes the customer past their credit limit.
| Type | sales_orders, invoices |
|---|---|
| Scope | Tenant, customer |
| When | On close |
| Without configuration | No check, even if a credit limit is set |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
tolerance_pct | Number | Optional | 10 |
inclure_commandes | Boolean | Optional | true |
mode | Text | Optional — bloquer | avertir | avertir |
What the user sees
{
"code": "limite_credit_depassee",
"params": { "client": "…", "encours": "…", "montant": "…", "limite": "…" },
"message": "customer credit limit exceeded: outstanding 12,000 + document 5,000 > limit 15,000. Raise the limit, collect open invoices, or reduce the document."
}HTTP 409 · limite_credit_depassee
Simulate
{
"rule_type": "limite_credit_client",
"scope_type": "tenant",
"params": { "tolerance_pct": 10, "inclure_commandes": true, "mode": "avertir" },
"jours": 90
}Normative reference
—
Field required at status champ_requis_statut
Requires one or more fields to be filled before a document moves to a given status, or to any firm status.
| Type | chosen by the consultant: any table exposed by the generic CRUD (table parameter) |
|---|---|
| Scope | Tenant |
| When | On close |
| Without configuration | No field required |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
table | Text | Required | sales_orders |
statut | Text | Optional — vide = n’importe quel statut ferme | confirmed |
champs | List of text | Required | delivery_date |
What the user sees
{
"code": "champ_requis_statut",
"params": { "table": "…", "statut": "…", "champs": "…" },
"message": "the document cannot move to status confirmed: fill in delivery_date first."
}HTTP 400 · champ_requis_statut
Simulate
{
"rule_type": "champ_requis_statut",
"scope_type": "tenant",
"params": { "table": "sales_orders", "statut": "", "champs": ["delivery_date"] },
"jours": 90
}Normative reference
—
Closed period periode_close
Refuses any document dated within an accounting period that is already closed, or being closed on request.
| Type | invoices, supplier_invoices, credit_notes, payments, accounting_entries (default scope, tables parameter to narrow it) |
|---|---|
| Scope | Tenant |
| When | On close |
| Without configuration | No period is controlled |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
tables | List of text | Optional | invoices, payments |
bloquer_closing | Boolean | Optional | false |
What the user sees
{
"code": "periode_close",
"params": { "periode": "…", "table": "…" },
"message": "the accounting period 2026-08 is closed: date the document within an open period or have the period reopened."
}HTTP 409 · periode_close
Simulate
{
"rule_type": "periode_close",
"scope_type": "tenant",
"params": {},
"jours": 90
}Normative reference
Standard accounting practice: allowed posting-date window.
Amount-based approval approbation_montant
Refuses firming a purchase or quote whose amount exceeds a threshold without a sufficient approval level.
| Type | purchase_orders, purchase_requests, quotes (chosen via the table parameter) |
|---|---|
| Scope | Tenant, supplier |
| When | On close |
| Without configuration | The historic purchase-request grid applies (5,000 → purchasing, 50,000 → purchasing management) |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
table | Text | Required | purchase_orders |
paliers | List of text | Required — format seuil:rôle | 5000:achat, 50000:directeur_achat |
mode | Text | Optional — bloquer | avertir | avertir |
What the user sees
{
"code": "approbation_requise",
"params": { "table": "…", "montant": "…", "seuil": "…", "niveau": "…", "role": "…" },
"message": "this document of 62,000 exceeds the threshold of 50,000: it must be approved (level 3 — Purchasing Director) before firming. Submit it for approval before firming it again."
}HTTP 409 · approbation_requise
Simulate
{
"rule_type": "approbation_montant",
"scope_type": "tenant",
"params": { "table": "purchase_orders", "paliers": ["10000:2", "100000:3"], "mode": "avertir" },
"jours": 90
}Normative reference
Standard purchasing practice: amount-threshold release strategy for requests.
Required workflow workflow_requis
Refuses firming a document until its active approval workflow has an approved instance.
| Type | quotes, purchase_requests, purchase_order_amendments, consumption_vouchers, production_release_pvs, supplier_invoices, manufacturing_orders, purchase_orders, sales_orders (tables parameter to narrow it) |
|---|---|
| Scope | Tenant |
| When | On close |
| Without configuration | No approval required |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
tables | List of text | Optional | purchase_orders |
mode | Text | Optional — bloquer | avertir | bloquer |
What the user sees
{
"code": "workflow_requis",
"params": { "table": "…", "workflow": "…" },
"message": "this document is subject to the “Purchasing validation” workflow: submit it for approval and wait for validation before firming it."
}HTTP 409 · workflow_requis
Simulate
{
"rule_type": "workflow_requis",
"scope_type": "tenant",
"params": {},
"jours": 90
}Normative reference
Standard governance practice: a document under an active approval circuit cannot be released outside that circuit.
Supplier not evaluated fournisseur_non_evalue
Refuses firming a purchase order for a supplier without a valid evaluation.
| Type | purchase_orders |
|---|---|
| Scope | Tenant, supplier |
| When | On close |
| Without configuration | No supplier is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
age_max_jours | Number | Optional — défaut 365 | 365 |
score_min | Number | Optional | 70 |
accepter_audit | Boolean | Optional | true |
What the user sees
{
"code": "fournisseur_non_evalue",
"params": { "fournisseur": "…", "derniere_evaluation": "…", "age_max": "…" },
"message": "supplier ACME has no valid evaluation (last evaluation: never, validity 365 days): evaluate the supplier or adjust the scope before firming the order."
}HTTP 409 · fournisseur_non_evalue
Simulate
{
"rule_type": "fournisseur_non_evalue",
"scope_type": "tenant",
"params": { "age_max_jours": 365, "mode": "avertir" },
"jours": 90
}Normative reference
ISO 9001 § 8.4.1 — control of externally provided processes, products and services.
NC without corrective action nc_sans_action
Refuses closing a nonconformity without an attached corrective action.
| Type | non_conformities |
|---|---|
| Scope | Tenant |
| When | On close |
| Without configuration | No closure is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
severites | List of text | Optional — défaut : major, critical | major, critical |
exiger_verification | Boolean | Optional | true |
What the user sees
{
"code": "nc_sans_action",
"params": { "nc": "…", "severite": "…" },
"message": "nonconformity NC-2026-014 (severity major) cannot be closed without a corrective action: attach a corrective action before closing it."
}HTTP 409 · nc_sans_action
Simulate
{
"rule_type": "nc_sans_action",
"scope_type": "tenant",
"params": { "severites": ["major", "critical"], "mode": "avertir" },
"jours": 90
}Normative reference
ISO 9001 § 10.2 — nonconformity and corrective action.
Traceability required tracabilite_requise
Refuses receiving, issuing, or closing a manufacturing order for a lot-tracked item without a lot number entered.
| Type | reception_items, consumption_voucher_items, delivery_note_items (on entry); manufacturing_orders (OF closure, via a dedicated guard) |
|---|---|
| Scope | Tenant, item |
| When | On entry — Closing a manufacturing order is checked separately, by a dedicated guard called at closure — not by the generic rule registry. |
| Without configuration | No item is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
moments | List of text | Optional — reception, sortie, fabrication | reception |
tous_articles | Boolean | Optional | false |
serie_aussi | Boolean | Optional | false |
What the user sees
{
"code": "tracabilite_requise",
"params": { "article": "…", "document": "…", "moment": "…" },
"message": "item REF-2210 is lot-tracked: enter the lot number before recording this receipt."
}HTTP 400 · tracabilite_requise
Simulate
{
"rule_type": "tracabilite_requise",
"scope_type": "tenant",
"params": { "moments": ["reception"], "mode": "avertir" },
"jours": 90
}Normative reference
End-to-end lot/serial tracking; IATF 16949 § 8.5.2; ISO 13485 § 7.5.9.
Certificate expired certificat_expire
Refuses firming a purchase order or receiving goods for a supplier, and an item if requested, without a valid material certificate.
| Type | purchase_orders (on firming), receptions (on entry) |
|---|---|
| Scope | Tenant, supplier, item |
| When | On close — The catalog declares this type “on firming”; the receptions table actually bites on entry, the purchase_orders table on firming. |
| Without configuration | No certificate is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
normes | List of text | Optional | OEKO-TEX, BSCI, GOTS |
par_article | Boolean | Optional | true |
tolerance_jours | Number | Optional — défaut 0 | 0 |
What the user sees
{
"code": "certificat_expire",
"params": { "fournisseur": "…", "norme": "…", "expire_le": "…" },
"message": "supplier ACME: OEKO-TEX certificate expired or missing (no certificate on file): renew the certificate before continuing."
}HTTP 409 · certificat_expire
Simulate
{
"rule_type": "certificat_expire",
"scope_type": "tenant",
"params": { "normes": ["OEKO-TEX", "BSCI", "GOTS"], "mode": "avertir" },
"jours": 90
}Normative reference
Oeko-Tex / BSCI / GOTS; ISO 13485 § 7.4 — externally originated documented information.
Equipment not calibrated equipement_non_etalonne
Refuses a quality control or SPC measurement entered with an out-of-calibration instrument.
| Type | quality_controls, spc_measurements |
|---|---|
| Scope | Tenant |
| When | On entry |
| Without configuration | No instrument is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
tables | List of text | Optional | quality_controls |
tolerance_jours | Number | Optional — défaut 0 | 0 |
What the user sees
{
"code": "equipement_non_etalonne",
"params": { "instrument": "…", "echeance": "…" },
"message": "instrument PIED-003 is out of calibration (due: 2026-05-01): recalibrate the instrument before using it for this check."
}HTTP 409 · equipement_non_etalonne
Simulate
{
"rule_type": "equipement_non_etalonne",
"scope_type": "tenant",
"params": { "mode": "bloquer" },
"jours": 90
}Normative reference
ISO 9001 § 7.1.5; IATF 16949 § 7.1.5.2 — monitoring and measuring resources.
Document required before status document_requis_avant_statut
Refuses moving a manufacturing order, purchase order, or sales order to a target status until the required document exists for its item.
| Type | manufacturing_orders, purchase_orders, sales_orders (chosen via the table parameter) |
|---|---|
| Scope | Tenant |
| When | On close |
| Without configuration | Nothing is checked until a full rule is set — table, statut and documents are all required |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
table | Text | Required | manufacturing_orders |
statut | Text | Required | in_progress |
documents | List of text | Required — fmea_studies, quality_control_plans, document_control | fmea_studies |
statut_document | Text | Optional — défaut selon le type de document | completed |
What the user sees
{
"code": "document_requis",
"params": { "document": "…", "article": "…", "statut": "…" },
"message": "the document cannot move to status in_progress: required document(s) missing for item ART-4471 (fmea_studies)."
}HTTP 409 · document_requis
Simulate
{
"rule_type": "document_requis_avant_statut",
"scope_type": "tenant",
"params": {
"table": "manufacturing_orders",
"statut": "in_progress",
"documents": ["fmea_studies"],
"mode": "bloquer"
},
"jours": 90
}Normative reference
IATF 16949 — PPAP / FMEA; ISO 9001 § 8.5.1 — control of production and service provision.
Dimension required dimension_requise
Refuses moving a header to a status (or any firm status), or entering a line, while one or more chosen analytical dimensions remain empty after inheritance (record → header → line).
| Type | table chosen by the consultant, restricted to the 28 dimension-carrying tables: the 15 headers (quotes, invoices, purchase_orders, sales_orders, delivery_notes, credit_notes, consumption_vouchers, purchase_requests, receptions, supplier_invoices, subcontracting_orders, supplier_rfqs, manufacturing_orders, technical_studies, stock_movements) and their 13 line tables |
|---|---|
| Scope | Tenant, customer, supplier |
| When | On close — On a header: on firming (statut parameter, blank = any firm status). On a line: on every write — a line has no status of its own. |
| Without configuration | No dimension is required |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
table | Text | Required | invoices |
statut | Text | Optional — vide = n’importe quel statut ferme (ignoré sur une ligne) | confirmed |
dimensions | List of text | Required — codes dim_dimensions.code | AFFAIRE |
What the user sees
{
"code": "dimension_requise",
"params": { "table": "…", "dimensions": "…" },
"message": "fill in dimension AFFAIRE before moving to status confirmed."
}HTTP 400 · dimension_requise
Simulate
{
"rule_type": "dimension_requise",
"scope_type": "tenant",
"params": { "table": "invoices", "statut": "", "dimensions": ["AFFAIRE"], "mode": "avertir" },
"jours": 90
}Normative reference
Standard analytical accounting: dimensions required per account/document.
Forbidden dimension combination combinaison_interdite
Refuses, at entry, any pair of dimension values found in the configured forbidden combinations (Settings → Dimensions). This type reads no parameter of its own in rule_parameters — only its activation matters; simulation, however, asks for a one-off target table (not stored) to know where to replay the check.
| Type | the same 28 dimension-carrying tables as dimension_requise — this type has no table parameter of its own |
|---|---|
| Scope | Tenant |
| When | On entry |
| Without configuration | No combination is blocked |
Parameters
| Parameter | Type | Required / default | Example |
|---|
What the user sees
{
"code": "combinaison_interdite",
"params": { "dimension_a": "…", "valeur_a": "…", "dimension_b": "…", "valeur_b": "…" },
"message": "forbidden dimension combination: Affaire = Import cannot be paired with Compte = 5800."
}HTTP 400 · combinaison_interdite
Simulate
{
"rule_type": "combinaison_interdite",
"scope_type": "tenant",
"params": { "table": "invoices" },
"jours": 90
}Normative reference
Forbidden dimension combinations (dim_forbidden table).
Qualification required habilitation_requise
Refuses assigning an operator to a production operation (or starting it) unless the operator holds, at the minimum required level, a skill the workstation requires (workstation_competencies) — or a valid, non-expired training/certification when required.
| Type | manufacturing_operations (generic CRUD); also bites on the dedicated route PUT /manufacturing-operations/{id}/operator |
|---|---|
| Scope | Tenant |
| When | On entry — Bites when operator_id is set (assignment), or when status moves to in_progress with an operator already assigned. |
| Without configuration | No operator is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
niveau_min_defaut | Number | Optional — défaut 2 ; le seuil posé sur la fiche du poste prime quand il existe | 2 |
exiger_formation_valide | Boolean | Optional | true |
What the user sees
{
"code": "habilitation_requise",
"params": { "operateur": "…", "poste": "…", "competence": "…" },
"message": "operator Karim B. not qualified for workstation Sertissage 3: required skill “Sertissage niveau 3” is missing or insufficient. Complete the qualification (level, training) before assigning this operator."
}HTTP 409 · habilitation_requise
Simulate
{
"rule_type": "habilitation_requise",
"scope_type": "tenant",
"params": { "niveau_min_defaut": 2, "exiger_formation_valide": true, "mode": "avertir" },
"jours": 90
}Normative reference
ISO 9001 § 7.2; IATF 16949 § 7.2.1 — competence, awareness and training.
Segregation of duties separation_taches
Prevents the person who performed action A (created a supplier/customer, created a document, changed bank details…) from later performing action B (approve, validate a payment, post, approve a workflow…) on that same document — four-eyes control. One active row per tenant: the conflict matrix is carried as a list.
| Type | firm-document tables (same scope as workflow_requis) plus payments — four bite points: the generic CRUD registry, the firming guard, workflow approval (internal/workflow), and payment validation (internal/finance) |
|---|---|
| Scope | Tenant |
| When | On close — Also bites on approval (approved_by set) and payment validation — not only on firming. |
| Without configuration | No conflict is checked |
Parameters
| Parameter | Type | Required / default | Example |
|---|---|---|---|
conflits | List of text | Required — format action_a:action_b | creer_fournisseur:valider_paiement, creer_da:approuver |
tables | List of text | Optional — défaut = toutes les tables éligibles | purchase_orders, payments |
mode | Text | Optional — bloquer | avertir | avertir |
What the user sees
{
"code": "separation_taches",
"params": { "action_a": "…", "action_b": "…", "utilisateur": "…" },
"message": "segregation of duties: the person who performed “creer_fournisseur” cannot perform “valider_paiement” on this document — four-eyes control, ask another user."
}HTTP 409 · separation_taches
Simulate
{
"rule_type": "separation_taches",
"scope_type": "tenant",
"params": { "conflits": ["creer_fournisseur:valider_paiement", "creer_da:approuver"], "mode": "avertir" },
"jours": 90
}Normative reference
Segregation-of-duties matrix (four-eyes control) — standard internal-audit practice.
← Back to Business Rules and Control
See also : Packs by trade · Deployment · Examples by sector · Monitoring and risk signals · Copilot · Status profiles