ERP bridge: one number, agreed by three systems
Stock in the ERP, orders in the shop, movements on the floor — and a deliberate layer that decides who is right.
- Area
- ERP, systems and integrations
- Written
- 2026
- Built with
- TypeScript
- Node.js
- PostgreSQL
- Message queue
- OpenAPI

Inside this project
The problem
Two systems disagree about the same number and everyone has learned which one to distrust. Usually nobody decided that the ERP owns stock and the shop owns orders — it accumulated. So a sync runs nightly, conflicts resolve by whichever job finished last, and a mis-picked order is discovered by a customer.
Integration work is mostly not code. It is deciding, explicitly, which system owns each field.
How we build it
1. An ownership map
One page per entity: product, price, stock, customer, order, invoice. For each field: which system is the source of truth, who may write it, and what happens when two writes race. This gets signed off before anything is built.
2. A bridge, not a mesh
Every system talks to one integration service with a versioned schema, instead of six point-to-point scripts that only one person understands. Inbound events are queued and idempotent — the same message arriving twice does not double a stock movement.
3. Visible reconciliation
A scheduled job compares both sides and reports differences as a list a human can work through, rather than silently overwriting. Drift becomes a number someone watches, not a surprise.
4. Migration with a rehearsal
Data moves in a dry run against a copy first, with a diff report and a rollback path. The real run is the third time we have done it, not the first.
What you would get
- The field-level ownership map, agreed in writing
- An integration service with a documented API and replayable event log
- Reconciliation reports and alerting on drift
- A migration runbook, rehearsed before the cutover
Where it gets hard
Legacy ERPs often have no usable change feed, so the bridge has to poll and diff — which makes the reconciliation job a permanent part of the system rather than a temporary crutch. Rounding rules for tax and unit conversion are where most “obvious” mismatches actually live. And every custom field someone added in a hurry is a migration decision waiting to be made.
Typical architecture