Two sales staff see one unit in stock and promise it to different customers. There may be nothing wrong with the stock count they saw. The problem is that both orders were allowed to claim the same unit between displaying availability and confirming the order.
Agree on when stock is held
Define what on hand, available, reserved and allocated mean for your business. For example, a draft quote might leave stock available, an accepted order might hold one unit for a short window, and dispatch might consume that allocation. Agree how transfers, cancelled orders and unpaid reservations return quantity. Apply the same rule to warehouse, online and assisted sales channels that draw from the same pool.
Check stock and record the reservation together
In a custom integration, have one system make the reservation decision. For a single stock row, the implementation could conditionally reduce the available quantity only if enough remains, then create the reservation in the same transaction. A conditional update that affects zero rows means the system should report insufficient stock. PostgreSQL explains how concurrent updates can recheck the condition against the newer row at its default isolation level. Verify the approach for your database and inventory model. PostgreSQL transaction isolation documentation.
Keep that transaction short. When payment or approval is separate, save the hold before leaving the transaction and use an order reference to identify repeated requests. When a hold expires, release it once. If payment confirmation arrives after expiry, recheck stock and send exceptions to staff instead of silently honouring an expired allocation. See the database transaction guide for another example of saving related changes together.
Test the last unit, cancellations and late payments
- Submit two orders together for the final unit and verify which receives a reservation.
- Submit one order twice with the same reference and confirm it creates one hold.
- Repeat with a cancellation, a retry after timeout and a late payment. Compare stock and reservation totals after each run.
ITZ’s ERP and CRM integration service can review where availability is checked across your sales channels. Share an example of two orders competing for the same stock.
Review your stock reservation workflow
Bring the system that owns stock, the order channels and the point where customers receive confirmation. Review Your Stock Reservation Workflow