Insight · integration
Two systems, two truths, one price
Synchronising two markets is not a replication problem. It is a question about who owns each field.
The same product, two markets, two prices, and a synchronisation job that runs every fifteen minutes. The job worked exactly as specified: last write wins. Which meant the price oscillated all afternoon, and both markets were briefly wrong.
The job was not broken. The design was: nobody had decided which system was allowed to be right about which field.
Assign an owner per attribute, not per system
“The ERP is the master” is too coarse. Price may be owned centrally, tax treatment locally, stock by the warehouse that holds it, and the marketing description by whoever writes it. Once each attribute has an owner, synchronisation becomes directional, and a conflict becomes a bug rather than a race.
The table that records this is small and worth more than the integration: attribute, owner, direction, update trigger. Twenty rows covers most retail catalogues.
Never sync what you can compute
Prices that differ only by currency, tax or rounding should be computed at the point of use from one base value and one rule set. Copying them creates two numbers that drift, and the drift is invisible until a customer compares receipts across markets.
Copy only what cannot be derived. Everything else is a formula with a version number.
Conflicts need a visible outcome
When two writes arrive for the same attribute inside the sync window, the system must pick one and say so. Silent last-write-wins is the worst option because it produces a plausible value with no explanation.
The workable version: the owning system wins, the losing value is recorded with its source, and the discrepancy appears in a daily report that someone owns. Most days the report is empty. The days it is not are the days you learn something.
Two systems will always hold two views. The point is not to make them identical — it is to make the difference deliberate, and findable.
Working through this now?
