Case study · Orderline
Orders, stock, and invoices in sync across commerce, warehouse, and ERP.
An integration layer connecting an online store, a B2B ordering portal, a marketplace, a third-party warehouse, and the ERP, so every order flows through without re-keying and every discrepancy is visible.
- Sector
- Wholesale & direct-to-consumer distribution
- Services
- Scope
- Integration audit to production
- Core stack
- TypeScript, Node.js, PostgreSQL, Message queues, REST APIs
This case study shows how we would approach a representative project of this kind. It is not a record of a specific client engagement: names, interfaces, and plans are examples, and outcomes are described as what would be measured rather than as results.
Scroll sideways to see the full screen
§ 01The situation
Where things stand.
A distributor sells through its own online store, a B2B portal for trade customers, and a marketplace, and ships from a third-party logistics warehouse. The ERP is the system of record for products, stock, customers, and invoices.
Today the systems are connected by a patchwork of plug-ins, CSV exports, and manual steps. Stock levels drift, orders occasionally ship twice or not at all, and month-end reconciliation takes days.
What makes it hard
Overselling
Stock updates reach the sales channels late, so popular items are sold after they have run out.
Silent failures
When a plug-in fails, nobody knows until a customer asks about an order that never shipped.
Duplicate records
Retries and manual fixes create duplicate orders and customers in the ERP.
Month-end reconciliation
Finance compares exports from four systems by hand to find missing invoices and payments.
§ 02The solution
What we would build.
Each part answers one of the problems above, and each can be delivered and tested on its own.
- A single integration layer
- A dedicated service replaces point-to-point plug-ins, giving every data flow one place where it is defined, logged, and monitored.
- Event-driven order flow
- Orders, shipments, and returns are published as events and processed in order, with idempotent writes so a retry never creates a duplicate.
- Stock synchronization
- Available stock is calculated from ERP and warehouse data and pushed to every channel within seconds of a change.
- Field ownership
- Each field has one owning system, documented and enforced, so updates stop overwriting each other.
- Failure handling
- Failed messages are queued with their error, alerted on, and replayed once the cause is fixed.
- Automated reconciliation
- Orders, shipments, and invoices are compared across systems every day, with differences reported to the team.
§ 03Architecture
How the pieces fit.
A layered view of the proposed system. The highlighted component carries the logic the rest of the system depends on, so it is designed and tested first.
01 Channels
- Online store
- B2B portal
- Marketplace
02 Integration layer
- Connectors
- Event bus & queues
- Mapping & transformation
- Retries & dead-letter queue
03 Systems of record
- ERP
- Warehouse (3PL)
- Payment provider
04 Operations
- Integration monitor
- Reconciliation reports
- Alerting
§ 04Delivery plan
Delivered in stages you can review.
Each stage ends with something working that you can evaluate before committing to the next.
Stage 01
3 weeks
Integration audit
Map every data flow, owner, and current failure; agree the target architecture and field ownership.
Stage 02
6 weeks
Foundation
Integration service, monitoring, and the order flow from the online store to the ERP and warehouse.
Stage 03
6 weeks
Channels & stock
B2B portal and marketplace connectors, near-real-time stock synchronization, and returns.
Stage 04
4 weeks
Reconciliation & handover
Automated reconciliation, runbooks, and retirement of the old plug-ins.
§ 05Outcomes
What you receive, and how success is measured.
Targets for each measure are agreed during discovery, using your current figures as the baseline, and reported on throughout delivery.
Deliverables
- Integration service with a connector for each system
- Integration monitor with replay of failed messages
- Field ownership and data flow documentation
- Automated daily reconciliation reports
- Runbooks for common failures
Measured by
- Orders that need manual intervention
- Time for a stock change to reach every channel
- Unresolved reconciliation differences at month end
- Time to detect and resolve a failed sync
§ 06Start a project
Planning something similar?
Describe where things stand today and what needs to change. We will reply with questions and an initial view of scope and approach.
- 01
Share the context
A short description of the project, your goals, and any constraints you already know about.
- 02
We review it
We read it carefully and reply with questions or an initial perspective on the problem.
- 03
A first conversation
A call to explore scope, approach, and whether we are the right fit for the work.