We provide a custom made service for just drop us a line.
We would be glad to have feedback from you.
A retailer sold in Hong Kong and Singapore from two systems that agreed with each other about once a day. Overselling was routine, and the reconciliation was a spreadsheet with a person attached to it.
Client withheld under NDA. The sector, the shape of the engagement and the constraints are described; no client data, screens, names or volumes are reproduced.
Problem
Two systems, two teams, one warehouse. Each market kept its own stock figure and they exchanged numbers overnight, which meant that for most of the working day both storefronts were selling against a count that was already wrong.
The overnight sync also hid the cause of every error. When the numbers disagreed, the investigation started from a delta with no timestamps, and ended with a decision to trust one side. That decision was made weekly, by different people, in opposite directions.
Figure 1 — Two storefronts, one ledger, and the four things that must cross
Approach
The first decision was to stop syncing. A copy of the truth is the problem, not the fix: any sync interval is a window in which both sides are wrong. Stock became a single ledger with a reservation API, and both storefronts became clients of it.
The second decision was to write down which system owns which field. Eighteen fields, one owner each, and an explicit rule for what happens when the other side disagrees — which is that the owner wins and the disagreement is logged rather than merged. Most of the project was this list.
Figure 2 — Eighteen fields, two systems, one owner each
What the migration cost
Cutover was run one market at a time, over two weekends, with the old sync kept alive in read-only mode so the two could be compared for a fortnight. That fortnight found nine reservation bugs that would otherwise have been found by customers.
The unglamorous part was returns. A return in one market restocking a unit that was sold in the other is a tax event as well as a stock event, and the first version got the stock right and the tax wrong. It was fixed by making the ledger record the market of sale on every unit.
What we delivered
What it changed
Overselling stopped being a weekly event and became a monitored exception. The change was not accuracy in the sync; it was removing the sync, which removed the window in which both sides could be confidently wrong.
The field ownership table outlived the project. It is now the document new engineers are given in their first week, because it answers the question that used to take three meetings: which system is right about this.
We provide a custom made service for just drop us a line.
We would be glad to have feedback from you.