Why two figures appear
A shop starts with a counter and adds a website. The counter has a stock record; the website has a spreadsheet or a nightly export. The two are updated at different times by different people, and the first time a product sells at both, the numbers part company. The same thing happens inside a marketplace listing, where the stock is maintained on the marketplace rather than in the shop. Neither is a failure of effort — it is a failure of having two sources of truth, and no schedule keeps two sources true.
One record, two views
The counter and the storefront should read the same product record, with the same price and the same stock. A sale at the counter reduces the quantity the website shows; an online order takes the goods out of the available figure at the moment it is placed, not at the moment it is delivered. The website does not need its own stock figure — it needs a view of the shop's figure, filtered by what is available. That is also what makes an online order visible beside a walk-in sale, rather than in a separate app with a separate total.
The awkward cases: holds, cancellations and returns
An unpaid order that is holding stock needs a limit: after a stated time, the hold is released and the goods return to available. A cancellation releases the hold, and a return puts the goods back with a reason — resalable, damaged or written off. The mistake is to treat a hold as a sale and a cancellation as a correction, because then the stock figure depends on someone remembering to undo something. Treat each state as its own event with its own effect on stock, and the figure stays true without heroics.
- Unpaid holds released after a stated time
- Cancellations release stock, not a correction
- Returns recorded with a reason
The oversell, worked out
The shop has three units of a product. A customer at the counter buys two, and the counter records it: the website, reading the same record, now shows one. Without the shared record, the website still shows three and a customer orders all three. The shop then cancels one unit and promises the rest, or sells three and refunds a customer — either way, the mistake was made before the order, not at it. The same arithmetic applies to five branches: a product held in one branch but shown as available in another is the same oversell with a different address.
A daily stock check, not an order list
The stock question once a day is narrower than an order list: did every paid online order reduce the same stock the counter uses, did every cancellation and expired hold return its quantity, and did every return come back with a reason? The order states themselves — placed, confirmed, paid, fulfilled — are read in the order-management article. Here the test is the stock figure: sell one unit online and one at the counter, then confirm the record is two down; cancel an order, then confirm it is one back. That is the ten minutes that keeps the website part of the shop rather than a second job.