Out of Stock at the Warehouse, In Stock on the Site: Fixing Inventory Sync

A customer finds a product on your site, adds it to the cart, confirms the order, and the card gets charged. A few hours later the phone rings: "Sorry, that item isn't actually in stock — we're refunding you." That isn't just one cancelled order. It's the moment that customer stops trusting you.
Usually the problem isn't the technology, it's that the warehouse and the website are speaking two different languages: one system knows one number, the other shows a completely different one, and nobody built a bridge between them. Fixing it is less about writing code and more about answering three questions — which number is the true one, how fast does it update, and who waits for whom.
What one apology call actually costs
When a confirmed order gets cancelled, the loss is never just one sale. The ad spend that brought that customer to your site is already spent. The time they spent typing in card details, an address, a delivery option — gone. On your side, someone has to call, apologise, process the refund by hand, maybe offer a substitute — time that could have gone into other orders.
The most expensive part doesn't show up anywhere: next time that customer looks for the same product, they're unlikely to come back to you — they'll go somewhere that didn't disappoint them. That loss never appears in a report, but it costs more than acquiring a new customer through ads did in the first place.
The point was never that products run out — every business runs out of something eventually, that's normal. The point is whether that fact shows up on the site before the order, not after. A customer who sees "out of stock" ahead of time doesn't feel cheated — they just pick something else, or wait.
Why manual updates always fall behind
In most small and mid-sized shops, stock count lives in two, sometimes three places: the warehouse's own system (sometimes just a spreadsheet), the accounting software, and the website's admin panel. Someone copies the first number into the last one once or twice a week.
The problem isn't the speed of that copy — even if the number is correct the moment it's typed in, every sale, every return, every item pulled off a physical shelf after that moment makes it stale again. A business selling across three channels — a physical store, a marketplace, and its own site — usually has a wrong number on the website by the middle of the same day, because the till and the website simply never talk to each other.
The fix isn't updating more often by hand — it's removing the human step entirely. When stock changes in the warehouse system or the accounting software, that change should reach the website's catalogue automatically, not whenever someone remembers to move it there. That's a one-time technical setup, and after it's built, nobody has to ask "did someone update the stock count?" again.
Sync frequency: not every product needs the same speed
Real-time sync sounds appealing, but it doesn't matter equally for every product. Choosing frequency by how fast a product actually sells is both smarter and cheaper.
Limited-quantity products that move fast
For a product from a limited run, or one down to its last few units, a delay is expensive — two different customers can order the same last unit within minutes of each other. This group needs event-based sync: the moment the count changes at the warehouse — a sale, a return, a walk-in purchase — the website should know immediately, not on the next scheduled hour.
A wide catalogue of slow-moving items
A shop with hundreds of spare parts or small SKUs doesn't need, or benefit from, minute-by-minute sync. Updating once an hour, or every few hours, is enough, because the odds of one customer hitting exactly the last unit of a slow-moving item within that window are low. Wiring this group into the same event-based system just spends technical effort where it buys nothing.
The right question isn't "how fast can this be?" — it's "what does a delay actually cost for this particular product?"
Whose item is it in the cart — reservation logic
Two customers can add the last unit of a product to their carts at the same moment. Both type in their card details on the payment page, but the warehouse and the website only ever had one unit. The question isn't who wins — it's when the second one finds out: before they've filled in a card, or after the money has already left it.
In a system built correctly, a product gets a short "soft" hold the moment checkout starts — nobody else can claim that unit while the hold is active, but if the customer doesn't finish paying, the unit returns to open stock once the hold expires. That window needs to be long enough for a real customer to complete payment comfortably, and short enough not to leave someone else waiting — this is measured in minutes, not hours.
The actual deduction from stock should only happen once payment is confirmed, never the moment something is added to a cart. Otherwise items abandoned in someone's cart for hours end up marked "sold" on the site even though nobody bought them — and now you're the one losing the sale, because a real buyer is being told there's nothing left.
The single-source rule: whose number counts
When several systems — the warehouse program, the accounting software, the website, maybe a marketplace account too — each keep their own stock number, sooner or later two of them disagree. That usually surfaces at the worst possible time: the order is already placed, and the item isn't there.
The practical fix is naming one system the "source of truth" — usually the warehouse or accounting software, because it sits closest to the physical product. The website, the marketplace listing, and every other channel only read from that source; none of them writes back to it. The transfer should flow one way through an API or a webhook — a signal fired the moment something changes, not a file someone exports once a day. Under that setup, two systems never overwrite each other, so the question of whose number is correct never even comes up.
Selling something that isn't actually on the shelf costs far more than saying so upfront.
Where to start a sync project
The sequence to work through before starting is short:
- Map the current situation — how many places the stock number actually lives: warehouse software, accounting, the website, a marketplace account.
- Pick the source of truth — whichever system sits closest to the physical product gets to name the "real" number.
- Build the transfer — an API or webhook, flowing one way, not a file someone moves by hand.
- Split frequency by product group — event-based for limited-quantity items, hourly is enough for the wide catalogue.
- Test the reservation window — try ordering the same item from two different browsers at once and check the system correctly rejects the second one.
This isn't a one-time setup, it's a bridge that keeps working between systems. Our system integration work builds exactly that bridge — deciding which system becomes the source of truth, tuning sync frequency by product type, and setting up reservation logic so no customer ever hears again that the item they already paid for doesn't exist.