Selling something you no longer have is the most expensive small failure in online retail. Fixing it is less about speed than about deciding which system is allowed to be right.
The phone call nobody wants to make is the one explaining that an order cannot be fulfilled because the item sold out before the website noticed. It costs you the order, the customer's confidence and usually a small amount of goodwill you will not get back.
Most businesses treat this as a synchronisation speed problem: update the website more often and the gap closes. Speed helps, but the harder question underneath is structural — when the website and the warehouse disagree, which one is telling the truth, and what is the system allowed to do about it?
This article covers how stock synchronisation actually works, the decisions that determine whether it holds up under pressure, and what to do when it does not.
The website and the stock system are separate records of the same physical reality, and they are updated by different events at different moments.
A shop assistant sells the last unit over the counter. A picker discovers a damaged box. A supplier delivery is counted in. An online customer completes checkout. Each of these changes the truth, and each takes a different amount of time to reach the other system.
The gap is therefore not a bug to be eliminated but a window to be managed. The practical goal is not zero delay — that is unattainable — but a window short enough, and a set of rules strong enough, that a customer almost never buys something that is not there.
Perfect synchronisation is not achievable. What is achievable is a system that fails in a direction you have chosen in advance.
Before any technical work, one thing has to be settled: which system holds the authoritative quantity?
In almost every case the answer should be the stock system, because that is where physical reality is recorded. The website then displays a copy of that figure, and never modifies it except by reserving against it.
Where businesses get into trouble is allowing both systems to be edited independently. Once someone can adjust the website quantity directly and someone else can adjust the warehouse quantity, the two drift apart in ways nobody can reconstruct, and every later discrepancy turns into an argument about which number to believe.
This sounds obvious and is violated constantly, usually for a good short-term reason — a quick correction before a campaign, a manual fix during a busy weekend — that permanently undermines the arrangement.
A related decision is what the website should do when the connection to the stock system is unavailable. Continuing to display the last figures it received is the usual choice and is reasonable for a short outage; continuing for six hours is not, because the numbers stop meaning anything. A sensible design keeps a timestamp with every quantity and switches to a cautious display — showing availability as a status rather than an exact number — once the data passes an age you have chosen deliberately.
The single most effective protection against overselling is not faster updates but reserving stock at the moment of commitment.
When a customer begins checkout, the quantity should be held against that order immediately, not deducted when the order is confirmed minutes later. Those minutes are exactly when two customers buy the same last unit.
Reservations need an expiry. An abandoned checkout should release its hold after a defined period, or your available quantity slowly declines while the shelves stay full. Fifteen to thirty minutes suits most shops; longer for high-value items where customers genuinely need time to decide.
The same applies to the physical side. A picker who has taken an item off the shelf for an order should mark it as allocated rather than leaving it visible as available for the hour it sits on the packing bench.
| Approach | Suits | Weakness |
|---|---|---|
| Scheduled full export | Small, stable catalogues | Slow; whole file each time |
| Scheduled changes only | Most businesses | Delay equal to the interval |
| Event-driven updates | Fast-moving stock | Needs reliable delivery and retries |
| Website asks per page view | Very small ranges | Slows pages; fails when the source is down |
For most shops, sending only what changed, every few minutes, with an event-driven update for the fast-moving lines, is the right balance. Sending the entire catalogue every time is simpler to build and becomes unworkable exactly when the business grows enough to need it.
Whatever the frequency, the update has to be resilient. Connections fail, and an update that is lost rather than retried leaves the website confidently displaying a figure that is hours old with nothing to indicate it.
How you present availability affects how much the gap matters. A page showing an exact count invites a customer to trust a number that is minutes old at best; a page showing in stock, low stock or available to order sets expectations that a small delay cannot break. Exact counts belong where they genuinely inform a decision — a customer ordering thirty of something needs to know whether thirty exist — and elsewhere they mostly create precision you cannot honour.
A buffer reserves a few units that are never offered online, so the last ones on the shelf cannot be sold remotely.
This is a reasonable safeguard for products also sold in a shop, where a counter sale can happen at any moment. It is less reasonable applied across the whole catalogue, because it hides stock you are paying to hold and creates the impression of being out of items you have.
The sensible approach is a buffer only where the risk is real: fast-moving lines, items also sold over the counter, products with a long pick time. A single global buffer of two units per product is a blunt instrument that costs more in unsold stock than it saves in apologies.
The problem multiplies when the same stock is offered on a website and one or more marketplaces, because each channel maintains its own copy and each has its own update delay.
The only structure that holds is a single source with each channel receiving updates from it — never channels updating each other. As soon as two channels exchange figures directly, a delayed update from one can overwrite a correct figure from another, and the resulting errors are extremely difficult to trace.
Allocation is worth deciding deliberately. Some businesses expose the full quantity everywhere and accept occasional conflicts; others allocate a share to each channel. The first maximises sales and risks overselling on the last units; the second is safer and leaves stock unsold when one channel runs out while another has plenty.
Products sold in sets or made to order need separate treatment, and they are the usual source of the strangest discrepancies. If a bundle draws on three underlying items, its availability is the smallest of the three and changes whenever any of them moves, including when one is sold individually. Systems that treat the bundle as its own stocked item will oversell it consistently and the cause is rarely obvious from the order records alone.
Plan the failure case, because it will occur.
When an order cannot be fulfilled, speed of contact matters more than anything else. A customer told within the hour, with an alternative offered or a refund already processed, is mildly inconvenienced. The same customer discovering it three days later when the delivery does not arrive is a complaint and, increasingly, a public review.
The system should also make it visible. An order that cannot be picked needs to appear somewhere a person looks, not sit in a queue waiting for someone to notice, and it should record why — which is how you learn whether the problem is the synchronisation window, the buffer, or a stock count that was wrong before any of this began.
The worst failure is not a dramatic outage but slow divergence that nobody notices until a stocktake.
A periodic comparison catches this cheaply. Once a day, compare every website quantity against the stock system and report the differences. On a healthy system this list is empty or nearly so; a list that grows week by week is telling you a channel is writing where it should only be reading.
It is also worth alerting on the update pipeline itself. If no update has arrived for an hour on a system that normally updates every five minutes, something has failed, and knowing that before customers do is the entire point.
The underlying structure here is the one we describe in our article on multi-branch stock software, and the connection itself is covered in integrating your systems.
Stock synchronisation is a question of authority before it is a question of speed. Make the stock system the single source, reserve at checkout with an expiry, send only what changed, apply buffers selectively, never let channels update each other, and compare the two systems daily so drift is visible before a customer finds it.
You can see our approach to e-commerce and warehouse integration, real-time data synchronisation and the wider automation and integrations area on the service pages. If you would like your own stock flow mapped first, request a free consultation.