Key takeaways
- Three failure modes: stale data, partial updates and race conditions
- Deciding what to do with stale stock is a commercial choice, not a technical default
- Stopping sales only on low-stock lines is usually the right middle ground
- Store the last successful sync time where the application can read it
- Alert when that timestamp exceeds the expected interval
- Reconcile fully on a schedule and report the differences
An integration that only works when the other system answers is not finished. It is a demonstration.
Stock synchronisation is where this shows up most expensively, because the failure mode is selling something you do not have.
The three ways it goes wrong
- Stale data. The sync stopped hours ago and nobody noticed, so the shop is selling from a snapshot.
- Partial updates. Some products updated, some did not, and there is no way to tell which from the shop side.
- Race conditions. Two orders for the last item arrive within the sync interval and both succeed.
The first is the most common and the easiest to prevent. The third is the hardest and needs a decision rather than a fix.
Decide what the shop does when stock data is old
This is a commercial decision, not a technical one, and it should be made by the business rather than defaulted by the code.
| Behaviour | Trade-off |
|---|---|
| Keep selling from the last known figures | Maximises orders, risks overselling |
| Show items as available but flag longer dispatch | Honest, slightly reduces conversion |
| Stop selling affected lines | Safest, costs orders immediately |
| Stop selling only low-stock lines | A reasonable middle, needs a threshold |
The last one is usually the right answer. Items with plenty of stock are low risk; items with one or two left are where overselling happens.
Make staleness visible
The shop should know how old its stock data is. That means:
- A timestamp on the last successful sync, stored where the application can read it
- An alert when that timestamp exceeds the expected interval by a defined margin
- A visible indicator in the admin, so staff know before customers do
An integration that fails silently will fail silently for a week.
Reserve stock at the right moment
Deciding whether to decrement stock at basket, at checkout start, or at payment confirmation is a genuine trade-off between abandoned reservations and overselling. There is no universally right answer, but there is a wrong one: not deciding, and discovering the behaviour in production.
Reconcile regularly
Whatever the sync does in real time, run a full reconciliation on a schedule and report the differences. The differences are where the bugs are, and they are much easier to understand as a weekly report than as an angry customer email.
Frequently asked
Questions readers ask
Why does my ecommerce site oversell products?
Usually because stock data is stale and nobody noticed, because a sync partially failed, or because two orders for the last item arrived inside the sync interval. The first is the most common and the easiest to prevent with a staleness alert.
When should stock be reserved: basket, checkout or payment?
It is a genuine trade-off between abandoned reservations and overselling, and there is no universally right answer. There is a wrong one: not deciding, and discovering the behaviour in production.
What should a shop do when stock data is out of date?
Decide in advance. Options are to keep selling, show longer dispatch times, stop selling affected lines, or stop selling only low-stock lines. The last is usually best, because items with one or two left are where overselling happens.





