Skip to main content

Network Inventory Planning

Core Subdomain

Network Inventory Planning (NIP) is the fleet's twelfth domain bounded context and sits in the wes tier of the CloudEvents subdomain taxonomy (com.warehouse.wes.network-inventory-planning.*). It answers one question: which stock should move between our warehouses, and how do we carry an approved move through to the destination without ever editing stock ourselves. ADR 0001 creates it as a WES-core context and fixes the boundary: inventory-storage stays the authority for physical stock and reservations, order-management for order allocation, facility-layout for site topology, and the WES contexts for work execution. NIP integrates with all of them through CloudEvents 1.0 facts and commands, never synchronous calls.

It owns two things. First, local read models of sibling facts (site transfer capability, per-site demand, published capacity plans) and a fail-closed planning snapshot built from them (ADR 0002). Second, the InterWarehouseTransfer saga: an operator-approved plan that asks inventory-storage to reserve origin stock, releases the pick and dispatch legs to wes-work-planning as work demands, and follows the physical facts until the destination stow closes it (ADR 0003, ADR 0005).

What is built, and what is only designed

Per the code on this context's develop branch:

Built: three Kafka read-model consumers (facility-layout, order-management, warehouse-planning); the fail-closed snapshot and the per-site advisory simulation (GET /v1/transfer-simulations); the diagnostic planner endpoint with explicit positions, policies and lanes (POST /v1/transfer-proposal-runs); the idempotent approval endpoint (POST /v1/transfer-approvals); the eleven-state saga with an immutable audit trail; the transactional outbox and relay; the inventory-storage reply and fact consumers and the fulfillment-execution fact consumer; WorkDemandReleased for the pick and dispatch legs; read-only transfer REST and a read-only MCP server; the saga-health analytics stream with its projector and nip-reports; the observe-only scheduled rebalance runs; and the nip_mfe console remote.

Not built (roadmap, from the design plan and the ADRs): dynamic order-site assignment (the plan's Phase 5), auto-approval, route or lane optimisation, demand forecasting and safety-stock models, a persisted lane and policy catalogue (the scheduled rebalance therefore records zero proposals today), multi-line transfers (v1 is one line per transfer), cancelling or revoking a transfer after the origin reservation exists, the TRANSFER_ARRIVAL work leg, and a variance disposition workflow.

Spec and wire disagree on one response

apis/openapi.yaml declares the GET /v1/transfer-simulations response as {asOf, options[]}, but the handler serves {advisory, asOf, sites[]} with per-site demand, capacity and headroom (and so does the MCP tool). The generated REST reference on this site follows the spec; the pages here follow the code. See the Domain Message Flow and the Bounded Context Canvas for the open question.

This context's pages​

Like every context, the pages from Ubiquitous Language to Use Cases and the Operations group are synced from the repository's own docs site (iqvo.github.io/network-inventory-planning), which it has shipped since October 2026. The Business Context and the Async API narrative are hand-written for this site, as everywhere.

Surfaces​

SurfaceWhereNotes
RESTcmd/network-inventory-planning, :8080seven operations including /healthz; Kong route /api/network-inventory-planning in the reference deployment; unauthenticated
MCPcmd/mcp, :8090four read-only tools: get_transfer, list_transfers, find_stuck_transfers, simulate_transfer_options; opt-in in the chart (mcp.enabled); unauthenticated
Reportscmd/nip-reports, :8092five read-only analytics reports over a separate analytical database, fed by cmd/nip-projector (:8091 admin)
Kafkawarehouse.network-inventory-planning.events and .analyticsCloudEvents 1.0 structured mode through the transactional outbox
Consolenip_mfe Module Federation remotegateway path /mfes/network-inventory-planning/, dev port 5192; console route /network-inventory/*

Elsewhere​