lumnik. / scenarios All scenarios · Français

One order status spelled fourteen ways

Goal Count orders by status whatever the spelling, and be told of a new spelling.

Fifteen years of hand entry left EC, Livré, LIV, ANNUL… in the ERP's order export. lumnik does not touch the ERP:

orders-night1.csv
order_id;customer;agency;ordered_on;status
C-1001;CLI-001;Lyon;01/09/2026;Saisie
C-1002;CLI-008;Grenoble;02/09/2026;EC
C-1003;CLI-015;Valence;03/09/2026;Annulée
C-1004;CLI-022;Chambéry;04/09/2026;EN COURS 
C-1005;CLI-029;Lyon;05/09/2026;Livré
C-1006;CLI-005;Grenoble;06/09/2026;SAI
C-1007;CLI-012;Valence;07/09/2026;Livrée
C-1008;CLI-019;Chambéry;08/09/2026;
C-1009;CLI-026;Lyon;09/09/2026;encours
C-1010;CLI-002;Grenoble;10/09/2026;Annulée
C-1011;CLI-009;Valence;11/09/2026;En cours
C-1012;CLI-016;Chambéry;12/09/2026;LIVREE
C-1013;CLI-023;Lyon;13/09/2026;SAI
C-1014;CLI-030;Grenoble;14/09/2026;Livrée
C-1015;CLI-006;Valence;15/09/2026;EN ATT
C-1016;CLI-013;Chambéry;16/09/2026;encours
C-1017;CLI-020;Lyon;17/09/2026;LIV
C-1018;CLI-027;Grenoble;18/09/2026;En cours
C-1019;CLI-003;Valence;19/09/2026;LIVREE

… 21 more lines

manifests/20-order-status.yaml
apiVersion: apps.lumnik.io/v1kind: Workflowmetadata:  name: scenario-order-status-aspec:  scope: order-desk  provenance: declared  on:    table: connector.t_scenario_orders_a    column: status  check:    trigger: ingestion  states:    - code: SAISIE      label: "Saisie"      initial: true    - code: EN_COURS      label: "En cours"      aliases: ["En cours", "encours"]    - code: LIVREE      label: "Livrée"      aliases: ["Livrée"]      terminal: true    - code: ANNULEE      label: "Annulée"      aliases: ["Annulée"]      terminal: true
manifests/30-order-status-completed.yaml
apiVersion: apps.lumnik.io/v1kind: Workflowmetadata:  name: scenario-order-status-aspec:  scope: order-desk  provenance: declared  on:    table: connector.t_scenario_orders_a    column: status  check:    trigger: ingestion  states:    - code: SAISIE      label: "Saisie"      aliases: ["SAI"]      initial: true    - code: EN_COURS      label: "En cours"      aliases: ["En cours", "encours", "EC"]    - code: LIVREE      label: "Livrée"      aliases: ["Livrée", "Livré", "LIV"]      terminal: true    - code: ANNULEE      label: "Annulée"      aliases: ["Annulée", "ANNUL"]      terminal: true
$ lm integration add scenario-orders-a --url http://host.docker.internal:9212/events --events workflow.undeclared.scenario-order-status-a --secret-stdin
registered: scenario-orders-a (id 1046) — forwards subscribed events from now on
orders-night2.csv
order_id;customer;agency;ordered_on;status
C-1001;CLI-001;Lyon;01/09/2026;En cours
C-1002;CLI-008;Grenoble;02/09/2026;Livrée
C-1003;CLI-015;Valence;03/09/2026;Annulée
C-1004;CLI-022;Chambéry;04/09/2026;EN COURS 
C-1005;CLI-029;Lyon;05/09/2026;Livré
C-1006;CLI-005;Grenoble;06/09/2026;En-cours
C-1007;CLI-012;Valence;07/09/2026;Livrée
C-1008;CLI-019;Chambéry;08/09/2026;
C-1009;CLI-026;Lyon;09/09/2026;En-cours
C-1010;CLI-002;Grenoble;10/09/2026;Annulée
C-1011;CLI-009;Valence;11/09/2026;Livrée
C-1012;CLI-016;Chambéry;12/09/2026;LIVREE
C-1013;CLI-023;Lyon;13/09/2026;SAI
C-1014;CLI-030;Grenoble;14/09/2026;Livrée
C-1015;CLI-006;Valence;15/09/2026;EN ATT
C-1016;CLI-013;Chambéry;16/09/2026;encours
C-1017;CLI-020;Lyon;17/09/2026;LIV
C-1018;CLI-027;Grenoble;18/09/2026;En cours
C-1019;CLI-003;Valence;19/09/2026;LIVREE

… 21 more lines

orders-night3.csv
order_id;customer;agency;ordered_on;status
C-1001;CLI-001;Lyon;01/09/2026;En cours
C-1002;CLI-008;Grenoble;02/09/2026;Livrée
C-1003;CLI-015;Valence;03/09/2026;Annulée
C-1004;CLI-022;Chambéry;04/09/2026;EN COURS 
C-1005;CLI-029;Lyon;05/09/2026;Livré
C-1006;CLI-005;Grenoble;06/09/2026;En-cours
C-1007;CLI-012;Valence;07/09/2026;Livrée
C-1008;CLI-019;Chambéry;08/09/2026;
C-1009;CLI-026;Lyon;09/09/2026;En-cours
C-1010;CLI-002;Grenoble;10/09/2026;Annulée
C-1011;CLI-009;Valence;11/09/2026;Livrée
C-1012;CLI-016;Chambéry;12/09/2026;LIVREE
C-1013;CLI-023;Lyon;13/09/2026;SAI
C-1014;CLI-030;Grenoble;14/09/2026;Livrée
C-1015;CLI-006;Valence;15/09/2026;EN ATT
C-1016;CLI-013;Chambéry;16/09/2026;encours
C-1017;CLI-020;Lyon;17/09/2026;LIV
C-1018;CLI-027;Grenoble;18/09/2026;En cours
C-1019;CLI-003;Valence;19/09/2026;LIVREE

… 22 more lines

Limits

  • An unchanged file is not read again, so not re-checked.
  • Aliases ignore case and surrounding spaces, not accents: “Livré” and “Livre” are two spellings.
  • A blank status is counted apart, not as a spelling.
  • lumnik does not fix the ERP; EN ATT is for the business to settle.
  • Synthetic data.

Orders · ERP

The same status is written 14 ways.

EC, encours, En cours, EN COURS: four ways to say “in progress”.

40 orders, exported every night.

Fictional orders · synthetic data

The problem

How many orders are in progress?

  • Counting “En cours” finds 5 orders.
  • There are 15, under four spellings.
  • The ERP cannot be changed.

Nothing is changed

The ERP keeps its statuses.

  • lumnik reads the nightly export.
  • It writes nothing to the ERP.
  • The meaning of each status is declared in lumnik.

What had to be written

- code: EN_COURS
  aliases: ["En cours", "encours", "EC"]

This line says EC means “En cours”.

The whole scenario fits in 3 declaration files, 68 lines.

What lumnik reports

The spellings nobody declared.

  • First declaration: 6 unknown spellings, on 15 orders.
  • After the business confirms: EN ATT remains, on 2 orders.

Real values, replay of 28 October 2026.

Who decides

The business decides. lumnik does not guess.

  • EN ATT: waiting for payment, or for stock?
  • Until the business answers, EN ATT stays listed.
  • A confirmed spelling becomes an alias, in one line.

The next night

Alert arrives on its own.

  • Night 2: a new spelling arrives, “En-cours”.
  • Import is enough: a message names it, on 2 orders.
  • Night 3: nothing new, no message.

Try it

The scenario replays end to end.

Export, declaration, confirmation, nights 2 and 3: every step is published with its output.

This scenario runs on lumnik Open, free and open source.

Try lumnik Open →