lumnik. / scenarios All scenarios · Français

An invoice with an unreadable amount waits for its fix at the source

Goal Never write an invoice without an amount, and follow each set-aside line until it is fixed.

An export of supplier invoices carries two mistyped amounts and a test invoice.

invoices-day1.csv
invoice_no,supplier_id,invoice_date,amount_eur
FA-2025-0001,SUP-201,2025-03-03,1310.89
FA-2025-0002,SUP-202,2025-03-03,759.59
FA-2025-0003,SUP-203,2025-03-04,334.76
FA-2025-0004,SUP-204,2025-03-04,355.60
FA-2025-0005,SUP-205,2025-03-05,919.82
FA-2025-0006,SUP-201,2025-03-05,1378.91
FA-2025-0007,SUP-202,2025-03-06,328.89
FA-2025-0008,SUP-203,2025-03-06,933.35
FA-2025-0009,SUP-204,2025-03-07,1709.33
FA-2025-0010,SUP-205,2025-03-07,1771.36
FA-2025-0011,SUP-201,2025-03-08,1431.08
FA-2025-0012,SUP-202,2025-03-08,1556.29
FA-2025-0013,SUP-203,2025-03-09,1.250.00
FA-2025-0014,SUP-204,2025-03-09,828.02
FA-2025-0015,SUP-205,2025-03-10,590.18
FA-2025-0016,SUP-201,2025-03-10,2433.90
FA-2025-0017,SUP-202,2025-03-11,1914.07
FA-2025-0018,SUP-203,2025-03-11,622.31
FA-2025-0019,SUP-204,2025-03-12,342.27

… 22 more lines

$ lm dlq list --run 2171fb3a-6736-4e53-acf5-a67b7ecc4d20
ID        CONNECTOR            RUN       REASON            ATTEMPTS  RESOLUTION  MESSAGE
98f62ac7  scenario-invoices-b  2171fb3a  MappingFailed     1                     amount_eur: parse-number could not read the value
c88f102c  scenario-invoices-b  2171fb3a  MappingFailed     1                     amount_eur: parse-number could not read the value
7ac70133  scenario-invoices-b  2171fb3a  ValidationFailed  1                     required column 'supplier_id' is missing or blank

$ lm dlq get c88f102c-ae9e-427a-9fd4-9e9e57931560
ID:        c88f102c-ae9e-427a-9fd4-9e9e57931560
Connector: scenario-invoices-b (6ac6b66a-bd57-4331-bf79-25b442fd85a9)
Run:       2171fb3a-6736-4e53-acf5-a67b7ecc4d20
Reason:    MappingFailed
Attempts:  1
Message:   amount_eur: parse-number could not read the value
Detail:    {"field":"amount_eur","message":"parse-number could not read the value"}
Payload:   {"amount_eur":"1.250.00","invoice_no":"FA-2025-0013","supplier_id":"SUP-203","invoice_date":"2025-03-09"}
Resolution: open

$ lm entity get invoice_b --filter invoice_no=FA-2025-0013
no rows
$ lm dlq discard 7ac70133-fc8c-4e42-a112-b21f4ef7c4a3
discarded: 7ac70133-fc8c-4e42-a112-b21f4ef7c4a3
invoices-day2.csv
invoice_no,supplier_id,invoice_date,amount_eur
FA-2025-0001,SUP-201,2025-03-03,1310.89
FA-2025-0002,SUP-202,2025-03-03,759.59
FA-2025-0003,SUP-203,2025-03-04,334.76
FA-2025-0004,SUP-204,2025-03-04,355.60
FA-2025-0005,SUP-205,2025-03-05,919.82
FA-2025-0006,SUP-201,2025-03-05,1378.91
FA-2025-0007,SUP-202,2025-03-06,328.89
FA-2025-0008,SUP-203,2025-03-06,933.35
FA-2025-0009,SUP-204,2025-03-07,1709.33
FA-2025-0010,SUP-205,2025-03-07,1771.36
FA-2025-0011,SUP-201,2025-03-08,1431.08
FA-2025-0012,SUP-202,2025-03-08,1556.29
FA-2025-0013,SUP-203,2025-03-09,1250.00
FA-2025-0014,SUP-204,2025-03-09,828.02
FA-2025-0015,SUP-205,2025-03-10,590.18
FA-2025-0016,SUP-201,2025-03-10,2433.90
FA-2025-0017,SUP-202,2025-03-11,1914.07
FA-2025-0018,SUP-203,2025-03-11,622.31
FA-2025-0019,SUP-204,2025-03-12,342.27

… 21 more lines

$ lm dlq replayed c88f102c-ae9e-427a-9fd4-9e9e57931560 --new-run-id a458b0b7-cc2d-4fdc-9d8c-cf94fa86ae05
marked replayed: c88f102c-ae9e-427a-9fd4-9e9e57931560

$ lm dlq replayed 98f62ac7-1119-4bda-91e6-90a468aab343 --new-run-id a458b0b7-cc2d-4fdc-9d8c-cf94fa86ae05
marked replayed: 98f62ac7-1119-4bda-91e6-90a468aab343

$ lm dlq list --connector scenario-invoices-b
ID  CONNECTOR  RUN  REASON  ATTEMPTS  RESOLUTION  MESSAGE

$ lm dlq get c88f102c-ae9e-427a-9fd4-9e9e57931560
ID:        c88f102c-ae9e-427a-9fd4-9e9e57931560
Connector: scenario-invoices-b (6ac6b66a-bd57-4331-bf79-25b442fd85a9)
Run:       2171fb3a-6736-4e53-acf5-a67b7ecc4d20
Reason:    MappingFailed
Attempts:  1
Message:   amount_eur: parse-number could not read the value
Detail:    {"field":"amount_eur","message":"parse-number could not read the value"}
Payload:   {"amount_eur":"1.250.00","invoice_no":"FA-2025-0013","supplier_id":"SUP-203","invoice_date":"2025-03-09"}
Resolution: REPLAYED by run a458b0b7-cc2d-4fdc-9d8c-cf94fa86ae05, 2026-11-03 17:07

$ lm dlq get 7ac70133-fc8c-4e42-a112-b21f4ef7c4a3
ID:        7ac70133-fc8c-4e42-a112-b21f4ef7c4a3
Connector: scenario-invoices-b (6ac6b66a-bd57-4331-bf79-25b442fd85a9)
Run:       2171fb3a-6736-4e53-acf5-a67b7ecc4d20
Reason:    ValidationFailed
Attempts:  1
Message:   required column 'supplier_id' is missing or blank
Detail:    {"violations":["required column 'supplier_id' is missing or blank"]}
Payload:   {"amount_eur":"0.00","invoice_no":"FA-TEST-0001","supplier_id":null,"invoice_date":"2025-03-13"}
Resolution: DISCARDED, 2026-11-03 17:07

$ lm entity get invoice_b --filter invoice_no=FA-2025-0013
INVOICE_NO    SUPPLIER_ID  INVOICE_DATE  AMOUNT_EUR  _CONFLICTS
FA-2025-0013  SUP-203      2025-03-09    1250        {}

Limits

  • on-error applies to CSV connectors; dlq is refused beside split-row.
  • The hub checks the named run could have carried the row (same connector, completed, later), not that it wrote it.
  • Synthetic invoices.

Accounting · invoices

Invoices arrive through an export.

Some are mistyped.

41 invoices, two days

The problem

Unreadable amounts.

  • 1.250.00
  • 87.5O, with the letter O.

What is not changed

The ERP stays the reference.

  • The fix is made at the source.
  • Nothing is touched up in the hub.

The trap

An invoice written with no amount.

  • It goes into the totals.
  • Nobody looks for it.

What had to be written

on-error: { fields: { amount_eur: dlq } }

One line.

  • The invoice waits, with its line as read.
  • Nothing vanishes on the way.
  • A 45-line scenario, two manifests.

The next day

The amounts fixed in the ERP.

  • 40 invoices, all with an amount.
  • No letter left open.

The limit

For CSV connectors.

  • on-error: dlq is refused beside split-row.

Try it

The scenario replays locally.

Every step is published with its output.

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

Try lumnik Open →