Most of us here have built or maintained something that tracks stock, usually bolted onto an order table that was never designed for it. The domain looks trivial right up until a second sales channel appears, so it is worth writing down where the real complexity sits.
Why The Naive Schema Breaks
The first version is always a single quantity column on the product row. It works until two orders land in the same second, or until a return, a warehouse transfer and a marketplace sync all touch the same SKU in the same minute.
What the column cannot express is intent. Stock that is physically present but already promised to a customer is not available stock, and stock in transit from a supplier is not present but is already committed. Once you split on hand, available, committed and inbound into separate values, most of the race conditions turn back into ordinary arithmetic.
Reorder Points Are A Function, Not A Setting
Teams tend to store a reorder threshold as a static integer someone typed in once. It should be derived: average daily demand multiplied by supplier lead time, plus a safety buffer sized to how much that demand actually varies.
Deriving it makes it recomputable. When lead time doubles because a supplier changed factories, every threshold moves on its own instead of waiting for a human to notice the stockout. The inventory management guide covers the forecasting side and how those numbers get chosen.
The Multi-Channel Sync Problem
Selling one SKU on your own store and on a marketplace means two systems each believe they own the quantity, and neither will tell you when they disagree.
The pattern that holds up is a single authoritative store of truth with every channel treated as a subscriber, plus a reconciliation job that reads actual counts back rather than trusting the last write. Push-only sync looks correct in testing and drifts quietly in production.
Why The Numbers Justify The Work
The business case is not abstract. Inventory routinely represents 50 to 80 percent of a product company's assets, and turning that stock 8 times a year instead of 4 needs roughly half the capital to support the same revenue.
That gap comes almost entirely from better information rather than better warehouses. It is one of the few places where writing correct software directly frees up cash.
Takeaway
Model availability as a set of related quantities instead of one number, derive reorder points instead of storing them, and never trust a one-way sync. Almost everything else in an inventory system is reporting layered on top of those three decisions.