Skip to main content

inventory-storage

Core Subdomain · WMS tier

Inventory & Storage is the WMS-tier authoritative record of what is held where, and what portion of it is usable. It is one of the platform's fourteen domain bounded contexts, and it owns the "storing them under chaotic storage" clause of the platform's domain vision — the truth that everything downstream depends on.

The one sentence that explains the whole design:

Every physical item has exactly one known bin, or it is flagged Unlocated.

Chaotic (random) stow, the item-scan + location-scan rule, cycle counting, and the Unlocated state are all consequences of taking that sentence literally.

What it owns​

CapabilityWhat that means here
Stock ledgerStockUnit aggregates — a quantity of a SKU at a specific bin, with a lifecycle state.
Bin-accurate locationChaotic (random) stow: any SKU may occupy any free bin; the system records the exact bin it landed in.
Capacity enforcementA Bin has a capacity; the sum of stock stowed into it may never exceed it.
Revocable reservationsAllocation is a Reservation with a timeout that can always be revoked and re-satisfied from a different physical holding.
Usable inventoryThe read model that actually constrains release: on-hand minus active reservations minus held/unlocated stock.
Cycle countingVerifying a bin's physical contents against system records, reconciling shortfalls by flagging stock Unlocated.
Placement and segregation at stowHazmat zone placement and same-bin DOT segregation, enforced at stow time against a version-guarded local copy of product-master's classification (ADR-0034). The classification itself (handling tags, temperature class, DOT hazard class) is owned by product-master since 2026-10-07.

What it deliberately does not own​

  • does not pick, pack, ship, or route associates — that is fulfillment-execution and wes-work-planning;
  • does not plan labour or headcount — that is workforce-management;
  • does not model the physical building (site, area, zone, aisle, bay, level, position) — that is facility-layout, a separate Generic subdomain;
  • does not own product master data — product-master is the source of truth for a SKU's classification; PUT /products/{sku}/classification here answers 410 (classification-moved), and the deprecated GET serves the local copy;
  • does not own bin existence as a place-in-the-building fact — facility-layout owns that; a Bin here is a flat, declaratively-registered capacity record, created/resized by inventory control via PUT /bins/{binId} (ADR-0025), not a node in the warehouse map.

Where this fits in the platform​

inventory-storage is an Open Host Service for bin-accurate location and usable inventory. wes-work-planning is a Customer/Supplier downstream, conforming to its Published Language (REST + the reservation events) with no write access to any of its aggregates. order-management reserves and revokes stock over REST. order-management, wes-work-planning and fulfillment-execution no longer call its GET /products/{sku}/classification: each keeps its own local copy of product-master's classification facts. network-fulfillment reads GET /inventory/{sku}/usable (opt-in) to compute its capability offers. It consumes facility-layout's warehouse.facility.events into a local location-classification cache (ADR-0013), product-master's warehouse.product-master.events into its product_classifications copy (PRODUCT_MASTER_CONSUMER_GROUP, ADR-0034, set in the reference deployment), inbound-receiving's ReceiptLineReceived (ADR-0037), network-inventory-planning's transfer allocation commands (ADR-0030) and fulfillment-execution's TaskCompleted from warehouse.fulfillment.events (TASK_COMPLETED_CONSUMER_MODE=kafka, set in the reference deployment): a PICK completion confirms the picked line's reservation (ADR-0035 and ADR-0036), a RELOCATE completion moves stock between two bins through RelocateStock (ADR 0039), and a REPLENISH completion does the same with reason REPLENISHMENT (ADR 0041). It also publishes BinStockLevelChanged (ADR 0040), the absolute per-bin level feed that pick-face-replenishment reads. The legacy ProductClassified and the one-shot republish-product-classifications backfill that re-emitted it were removed at product-master ADR 0003 stage E (2026-10-17): product classification is product-master's alone (ADR-0034).

Sealed cases are tracked as containers (LPNs, ADR-0045 and ADR-0046): GET /containers/{lpn}, POST /containers/{lpn}/stowages into a case bin, POST /containers/{lpn}/case-breaks into loose eaches and GET /bins/{binId}/containers. They raise ContainerRegistered, ContainerStowed, CaseBroken and ContainerEmptied on warehouse.inventory.events, keyed by LPN, with no consumer yet. Every REST and MCP endpoint is unauthenticated by deliberate decision (ADR-0015). See the Bounded Context Canvas for the full picture of who calls in and who is called out to.

Moving stock between bins: relocation​

Chaotic storage never had a way to move stock once stowed; slotting needs one. RelocateStock (ADR 0039) moves a quantity of one SKU between two bins of one site, atomically on the ledger: both bins' occupancy, the touched stock units, one new stock unit at the destination, an immutable relocations record and the outbox row commit in one transaction. Only the usable (unreserved) quantity moves, so a reservation's pick location never goes stale. It is reached two ways, and both raise com.warehouse.wms.inventory-storage.stock.StockRelocated on warehouse.inventory.events:

  • POST /relocations (operation relocateStock, behind the Idempotency-Key middleware) and GET /relocations/{id} (getRelocation);
  • a completed RELOCATE task from fulfillment-execution, applied by the TaskCompleted consumer from the additive sku, from_bin, to_bin, quantity and relocation_ref fields (reason SLOTTING, source_ref = relocation_ref, the move reference <plan_id>:<move_seq>);
  • a completed REPLENISH task (ADR 0041), applied by the same consumer from the same fields plus the required request_ref (reason REPLENISHMENT, source_ref = request_ref, the pick-face-replenishment request id). warehouse-infra develop wires the chain: pick-face-replenishment is deployed and wes-work-planning runs its replenishment consumer with REPLENISHMENT_MODE=kafka (K44).

slotting-optimization consumes StockRelocated to show how far an approved slot plan has been executed. See Business Context and Async API.

This context's pages​

Every page above except the Business Context and the Async API narrative is synced from the inventory-storage repository.

Elsewhere​

  • Repository: github.com/IQVO/inventory-storage
  • This context's own documentation site (ADRs, architecture, quickstart, generated OpenAPI/AsyncAPI reference) is built from docs/docs/ in the repository above by its own docs.yml workflow.
  • Generated references on this site: REST and AsyncAPI.
  • ADR index: links to this context's own decision records.