Skip to main content

network-fulfillment

network-fulfillment is the bounded context that lets the warehouse fleet take orders from an external retail fulfillment network and answer them. It is the Anti-Corruption Layer between that network and everything else in warehouse-systems: the network's vocabulary (purchase orders, product ids, acknowledgement codes) stops here, and the fleet only ever sees SKUs, quantities, a site and a deadline.

  • Subdomain: Supporting (why).
  • Tier: wes. Every event it publishes is typed com.warehouse.wes.network-fulfillment.networkorder.<Event>.
  • Counterpart: the fleet's own retail-network service plays the network (ADR 0009). NETWORK_MODE picks the gateway: the in-process stub (the default) or, with live, the demand loop against the network's Vendor API (ADR 0026; the supply loop is ADR 0027, not built).
  • Status: implemented; the stub is the default everywhere and live is opt-in. A study project, not a production system (see the repository README).

What it owns​

  • NetworkOrder: one unit of network demand and the single answer given to it. NEW -> SUBMITTED -> ACKNOWLEDGED -> CONFIRMED, or REJECTED from NEW or SUBMITTED. Acknowledged in full or rejected in full, within 24 h of receipt.
  • The 24 h acknowledgement clock: the fleet's only external SLA. A sweep reports overdue orders and a separate job rejects them. A third pass is the backstop for the order-management hold each order raises: it cancels a hold nobody decided once the window plus a grace has passed (ADR 0024).
  • CapabilityOffer (always on): the quantity per SKU and site this context would advertise, min(physicalAvailable, throughputFeasible), so the network is never offered more than the building can move before the next cutoff. Computed and stored; in live mode FeedInventory sends it to the network as a per-site inventory feed (ADR 0027 part 2).
  • The product dictionary: network product id to SKU, loaded from PRODUCT_TRANSLATION_FILE. An order with one unknown product is rejected.

It does not own the promise math: whether a deadline is feasible is asked of order-management through a held order (ADR 0001 §7).

Main capabilities​

CapabilityHowPage
Receive demandpoll the network every POLL_INTERVAL, translate, raise a held order in order-management, answeruse cases
Settle answersreconcile each SUBMITTED order with the network's transaction status, then release or cancel the holduse cases
Guard the SLAreport and reject orders still unanswered after 24 huse cases
Free orphaned holdscancel the order-management hold of an order nobody decided, after acknowledgeBy + ORPHAN_HOLD_GRACEuse cases, runbook
Confirm shipmenta ShipmentConfirmed event from outbound-shipping (primary), or POST /network-orders/{networkRef}/shipment-confirmation (operator fallback)use cases
Advertise capabilityrecompute offers from inventory-storage stock and path capacityuse cases
Publish factsseven CloudEvents types on warehouse.network-fulfillment.eventsintegration
Reportacknowledgement and translation report from an analytics data productrunbook
Answer agentsread-only MCP toolsMCP tools

Binaries​

cmd/netfulfil (REST API and every background job), cmd/mcp (MCP server), cmd/netfulfil-projector (analytics writer) and cmd/netfulfil-reports (analytics reader), plus the web/ remote for warehouse-console. See architecture.

Documentation map​

Overview

  • Architecture: binaries, hexagonal layout, data stores, diagram
  • Quickstart: build, test, run locally, first calls

Operations

Development

Integration and interfaces

  • Integration: every upstream and downstream
  • MCP tools
  • REST contract: apis/openapi.yaml; event catalogue: apis/asyncapi.yaml

Domain

Decisions

Disclaimer

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic.