What happens when two stores sell the last unit at the same time
Every app that syncs stock between Shopify stores has a short window in which two stores can sell the same last unit. We build one of those apps, and we would rather explain the window than pretend it isn't there. Here is how it happens, how often it matters, and how buffers make it rare.
The timeline of a sale
Inside a single store, Shopify handles stock for you: if "Continue selling when out of stock" is off, the store stops selling at zero. Across two stores, nothing on Shopify's side connects them, so an app has to carry the news. That takes a few steps:
- A customer checks out in store A. Shopify lowers store A's count.
- Shopify notifies the sync app with a webhook. Shopify describes webhooks as "near-real-time" (Shopify developer docs), meaning after the event, not at the same instant.
- The app works out the new shared count.
- The app writes the new count to store B through the Admin API.
Between step 1 and step 4, store B still shows the old number. That gap is the window. It is usually short, but it is never zero, for any app built on Shopify's public APIs.
A worked example
| Moment | Retail store | Outlet store | Real units on the shelf |
|---|---|---|---|
| Before | shows 1 | shows 1 | 1 |
| Customer X buys in retail | shows 0 | still shows 1 | 0 (promised to X) |
| Customer Y buys in the outlet, inside the window | shows 0 | shows 0 | −1: one order can't be filled |
| The app's update arrives | shows 0 | set to 0 (never negative) | −1 |
Both checkouts succeeded because, at the moment each customer paid, their store really did show one unit.
When the window matters
For two orders to collide, both have to land on the same SKU, when it has very few units left, inside a short window. For most catalogs that combination is rare. It becomes realistic when:
- you run a sale or a drop and promote it in both stores at the same time;
- a few items sell fast and often sit at one or two units;
- a single unit is the whole stock (one-off, vintage, samples).
We don't publish a percentage for how often this happens, because it depends entirely on your traffic and catalog. Stockpact logs each case so you can see your own rate.
How buffers shrink the risk
A buffer is a number of units a store hides. The real stock doesn't change; the store just shows less. Put a buffer of 1 on the outlet and repeat the example:
| Shared stock | Retail shows | Outlet shows (buffer 1) |
|---|---|---|
| 3 | 3 | 2 |
| 1 | 1 | 0 |
When only one unit is left, only the retail store sells it, so there is nothing to collide. The window still exists for the second-to-last unit, but the chance that both stores sell two units of the same SKU within seconds is much smaller.
Practical rules:
- Buffer the lower-priority store, for example the outlet or the wholesale store.
- Buffer fast sellers and low-stock items, not the whole catalog.
- Raise buffers before a sale, lower them afterwards.
- Use a percentage for items with big stock, a fixed number for items with small stock.
How big should a buffer be?
There is no published benchmark, so start small and adjust from your own log. For reference, merchants in the Shopify Community describe rules like these (anecdotes, not measurements):
- holding back 2–3 units on the store or channel with the sharpest spikes (Community, Nov 2026);
- a per-store safety stock of about 5–10% on fast movers (Community, May 2026; Community, Sep 2026);
- showing "out of stock" once fewer than 3 or 4 items are left (Community, May 2026);
- a higher buffer during sale periods only (Community, Jul 2026).
A simple way to start: buffer of 1 on the lower-priority store for items that usually sit at five units or fewer, and 5% on fast sellers. After a month, look at which SKUs still collided and which sat at "0 shown" with stock on the shelf, and move the numbers.
The buffer trade-off: stuck stock
A buffer on every store hides the same units everywhere. With a buffer of 1 in both stores, the last unit shows as sold out in both, and nobody can buy it. That is lost revenue, not safety. Keep at least one store without a buffer for each item, and check the log for items that sit at "0 shown" while the shared stock is above zero.
The other risk: updates that never arrive
The window is about timing. A different failure is an update that never arrives at all. Shopify states that webhook delivery isn't always guaranteed and that ordering isn't guaranteed, and it recommends reconciliation jobs that fetch data periodically (source). An app that only listens to webhooks will drift slowly, and you find out when an order can't be filled. Ask any sync app how it catches missed updates.
What Stockpact does, and what it can't do
What it does
- Keeps one sellable count per SKU and writes the absolute number to each store, not "+1/−1".
- Handles events for the same SKU one after another, and applies a repeated event only once.
- Never shows a negative number; when it has to set a store to zero, it logs and counts it.
- Buffers per store, collection, tag or SKU, as a number or a percentage.
- Scheduled reconciliation plus a "reconcile now" button to catch missed updates.
- A log of every change with before, after and cause, and a restore button.
- Shows the measured sync delay for your stores in the app.
What it can't do
- Close the window to zero. No app built on Shopify's public APIs can.
- Stop a store from selling a unit it was showing at the moment of checkout.
- Choose which of two colliding orders to cancel. That is a customer decision, and it stays yours.
If it happens: a short playbook
- Check the real shelf. Sometimes a returned or miscounted unit is there after all.
- Keep the first order, contact the second customer quickly. Offer a similar item, a back-order date or a refund.
- Cancel and refund in Shopify so the stock and the customer record are right.
- Look at the log. Was it the timing window, or a missed update? The first calls for a buffer; the second for a reconciliation check.
- Add or raise a buffer on that SKU or its collection in the lower-priority store.
Have a polite template ready, so the second customer hears from you quickly and gets a clear choice.