A stock quantity is meaningful only when its definition is clear. Goods may physically exist in the warehouse while already committed to an order, awaiting inspection or unavailable because they are damaged. A business system should distinguish those conditions before telling staff or customers that an item is available. Begin with the decisions the quantity supports: quoting, promising, picking, purchasing or stocktaking.
Name the stock states
Consider a Mildura irrigation supplier with twenty pumps on a shelf. Some are reserved for confirmed orders, one awaits inspection and another is a demonstration unit. The number staff can promise to a new customer is therefore different from the physical count. Define the stock states your business needs and identify who can change each one. Avoid creating a complex taxonomy for rare exceptions, but do not conceal ordinary restrictions in free-text notes that sales staff are unlikely to read before making a commitment.
Choose when an order reserves stock
An enquiry, a draft quote and an accepted order may need different reservation behaviour. If every draft reserves stock indefinitely, the system can make available goods appear unavailable. If nothing reserves stock until dispatch, several customers may be promised the same final item. Agree the event that creates a reservation, any expiry rule and what happens when an order changes. Transactions can group related database changes, as PostgreSQL explains, but the application also needs explicit concurrency controls and business rules for competing requests.
Treat adjustments as explainable events
Stock counts change through receipts, picks, returns, corrections and write-offs. Record the reason and reference for an adjustment so a later discrepancy can be investigated. A return may need inspection before becoming sellable again. A transfer between locations should not temporarily create stock at both ends without a defined in-transit state. Give staff a clear route to flag a discrepancy rather than encouraging them to overwrite the quantity until it looks right. The aim is a usable operational history, not an unmanageable requirement to narrate every routine movement.
Rehearse the last-item conflict
Use fictional stock and attempt two orders for the final available unit. Then cancel one order, receive a return and correct a stocktake difference. Compare the displayed quantities with the agreed definitions. Check:
- Physical, reserved and available quantities have distinct meanings.
- Reservations begin and end at explicit business events.
- Returns and transfers follow their own availability rules.
- Adjustments retain a reason, actor and related order or stocktake reference.
