Architecture Pattern Guide

Inventory, Reservation, Allocation, Replenishment, and Returns

Goal

Break the inventory domain into the main business responsibilities that automation must support.

The Short Version

Inventory architecture gets clearer when reservation, allocation, replenishment, and returns are treated as different responsibilities instead of one vague stock problem.

Inventory is not just “how many items do we have?” It is a set of states that answer different questions: what can be promised, what has been reserved, what has been assigned to a shipment, what is on the way from a supplier, and what came back from the field.

The Inventory State Model

stock -> reserve -> allocate -> ship
stock <- return / replenish

Each term carries a different operational meaning:

  • Reservation protects future demand before the item is physically shipped.

  • Allocation assigns available supply to a specific order or fulfillment step.

  • Replenishment brings new stock into the system from suppliers or transfers.

  • Returns restore stock, send it to inspection, or remove it from usable inventory.

The point is not to force every business into the same flow. The point is to make the state changes explicit so that automation knows what can happen next.

Architecture Meaning

A single inventory quantity cannot describe all the decisions a fulfillment system needs to make. If we only track one number, the system cannot tell the difference between stock that is sellable, stock that is already promised, stock that is damaged, or stock that is waiting to be inspected after a return.

That ambiguity causes trouble quickly. Reservation may succeed when allocation should fail. Replenishment may arrive while the wrong order is still being held open. A return may be put back into available stock before inspection is complete.

Clear state ownership prevents those mistakes. The architecture should answer three questions for every inventory state change:

  1. What business event caused the change?

  2. Who is allowed to make the change?

  3. What downstream systems need to be told?

Example: Order to Return Loop

A shopper places an order.

The system reserves the item during checkout, allocates it for a warehouse pick later, and then ships it. A supplier replenishment arrives the next day, but that does not retroactively fix the order that already shipped. Later, a return comes back. The system must decide whether the item goes back to available stock, into inspection, or into a non-sellable state.

That loop is the real inventory model. It is not a single count. It is a chain of controlled transitions.

Common Mistakes

  • Treating all stock states as interchangeable.

  • Updating inventory without clear ownership.

  • Confusing reservation with physical shipment.

  • Returning items to available stock before the inspection step is complete.

  • Assuming replenishment automatically fixes every shortage.

If Someone Asks You

Why do inventory systems need multiple states and not one quantity field?

Because one quantity cannot tell the system what is already promised, what is still available, and what needs inspection or recovery. Multiple states make the business rules visible.

What You Should Remember

Inventory becomes manageable when each state change has a clear owner.

Questions to Check Your Understanding

  1. Which state protects demand?

  2. Which state changes supply availability?

  3. What happens when returns are not modeled separately?