Inventory Lifecycle
Inventory in the embedded engine distinguishes on-hand from available. The gap between them is reservations, and getting that protocol right is what prevents overselling.Setup
Create an item
Read stock
Reservations: the three-step protocol
This is the part worth understanding properly.Why reserve at all
Without a reservation, two concurrent checkouts both read available stock as 1 and both succeed. Reserving makes the read-and-hold atomic, so the second checkout sees 0. Order the calls as reserve → authorise → confirm. Reserving first closes the race; confirming last means a declined card releases the stock rather than stranding it.Adjustments
For counted corrections, damage, and shrinkage:Cycle counts
For a systematic recount rather than a one-off correction, use the cycle-count workflow —draft → in-progress → completed, with variance applied transactionally to location inventory and a
cycle_count movement record written. See
Finance & Accounting.
Where reservations come from
Related
- Order Lifecycle
- Returns Workflow
- Finance & Accounting — cycle counts and valuation