Inventory

One inventory truth you can always explain.

Every quantity change is an append-only movement. Balances are a projection of that ledger, not a number someone typed over. When a count looks wrong, you trace it to the exact movement that caused it instead of guessing.

The ledger is the system of record

Movements go in, balances come out, and nothing edits history.

Append-only movements

Receive, putaway, pick, pack, ship, transfer, return, damage, adjust, and cycle-count each write one immutable movement row. The ledger only ever grows, so the full history of a unit is always there.

Derived balances

On-hand, available, and reserved quantities are a projection written in the same transaction as the movement. Balances can never be updated on their own path outside a ledger write.

Reservations that hold

Allocation reserves stock against available with row-level locking on the balance row. Two orders competing for the last unit are serialized, so the second one is told there is nothing left.

Corrections, not edits

A miscount is fixed with a new offsetting movement, never by rewriting the old one. The mistake and its correction both stay on the record, which is what an auditor expects.

Nightly reconciliation

A scheduled job recomputes balances straight from the movement history and compares them to the stored projection. Any drift is flagged, not silently absorbed.

No oversell across channels

Because every channel reads the same available count and reserves through the same locked path, one marketplace can never sell a unit another has already claimed.

No inventory change without a movement

This is not a convention we hope everyone remembers. The database enforces it. The movements and audit tables are append-only at the trigger level, and the balances table rejects any write that is not part of a ledger transaction.

  • Movements and audit rows cannot be updated or deleted
  • Balances reject writes made outside a ledger transaction
  • Every correction is a new offsetting movement with a reason
  • The same rules apply to migrations, imports, and manual adjustments

# movements for SKU-4417 in bin A-12-03

+120 receive po-8841

+ 24 putaway from staging

- 2 cycle-count variance (approved)

- 18 pick order-33027

# available: 124 · reserved: 6 · on-hand: 130

Stop reconciling two systems that disagree

See how one ledger keeps catalog, warehouse, and channels reading the same number.