Network Inventory Planning
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).
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.
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
- Business Context: why moving stock between warehouses needed its own context, and what stays advisory.
- Ubiquitous Language: InterWarehouseTransfer, Proposal, ScoreBreakdown, PlanningSnapshot, SiteCapability, SiteSkuDemand, WorkDemand, StuckTransfer, RebalanceRun.
- Core Domain Chart (ddd-crew core-domain-charts): why this context is Core.
- Bounded Context Canvas (ddd-crew bounded-context-canvas): purpose, roles, inbound and outbound communication, decisions and open questions.
- Context Map (ddd-crew context-mapping): every relationship with its pattern, technology and status.
- Aggregate Design Canvas
(ddd-crew aggregate-design-canvas):
the
InterWarehouseTransfersaga aggregate. - Domain Events: the six CloudEvents types it emits and the ten it consumes.
- Domain Message Flow (ddd-crew domain-message-flow-modelling): key scenarios as commands, events and queries.
- EventStorming (ddd-crew eventstorming-glossary-cheat-sheet): process-level boards.
- Class Diagram: the domain model as it exists in the code.
- Entity Relationship: the persisted tables, OLTP and analytical.
- Sequence Diagrams: the main runtime interactions.
- Async API: the Kafka integration in narrative form.
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
| Surface | Where | Notes |
|---|---|---|
| REST | cmd/network-inventory-planning, :8080 | seven operations including /healthz; Kong route /api/network-inventory-planning in the reference deployment; unauthenticated |
| MCP | cmd/mcp, :8090 | four read-only tools: get_transfer, list_transfers, find_stuck_transfers, simulate_transfer_options; opt-in in the chart (mcp.enabled); unauthenticated |
| Reports | cmd/nip-reports, :8092 | five read-only analytics reports over a separate analytical database, fed by cmd/nip-projector (:8091 admin) |
| Kafka | warehouse.network-inventory-planning.events and .analytics | CloudEvents 1.0 structured mode through the transactional outbox |
| Console | nip_mfe Module Federation remote | gateway path /mfes/network-inventory-planning/, dev port 5192; console route /network-inventory/* |
Elsewhere
- Repository: github.com/IQVO/network-inventory-planning.
Its ADRs live under
docs/docs/adr/, 0001 to 0010 ondevelop. - ADR index: links to this context's own decision records.
- Generated references on this site: REST
and AsyncAPI, generated from
the real
apis/openapi.yamlandapis/asyncapi.yaml. - Fleet-level: Context Map and the Event Standard.