Skip to main content

Context Map

Generated from the model

This page is generated from network/model/model.yaml by network/scripts/gen_pages.py. Edit the model, then regenerate; CI fails when the page and the model disagree.

Following the ddd-crew Context Mapping notation. On every edge, U is upstream and D downstream; the pattern names how the downstream relates to the upstream's model: OHS Open Host Service, PL Published Language, CF Conformist, ACL Anti-Corruption Layer, C/S Customer/Supplier. Thick arrows are Kafka events (CloudEvents 1.0), thin arrows synchronous in-organization REST calls. The map is split into five views so each stays readable; an edge label such as CF 3e +REST reads "Conformist, three events, plus a synchronous call". The table under the views lists every edge with its messages.

The organizational seam​

The network and the warehouse-systems fleet are two organizations. The only channel between them is the Vendor API of vendor-connectivity.

Derived from: model.yaml → meta.hard_boundary, contexts[vendor-connectivity].inbound; the fleet side from IQVO/network-fulfillment internal/application/ports/ports.go on origin/develop. Separate Ways at the messaging level: no Kafka topic is shared in either direction. Details on WMS/WES Integration.

Commerce view: promise, order, sourcing​

Derived from: model.yaml → contexts[*].publishes[*].consumers, contexts[*].sync_calls, contexts[*].inbound[*].relationship.

Logistics view: topology, middle mile, last mile, tracking​

Derived from: same sections as above.

Partner view: sellers, inbound shipments and receipts​

seller-inbound is the proposed eleventh context (ADR 0009). It reaches the vendor only through vendor-connectivity.

Derived from: same sections as above.

Returns view: the authorization, the facts it reads and the restock​

customer-returns is the twelfth context (ADR 0012). Its reverse-label call to shipping-and-tracking (POST /return-labels) and the vendor seam through vendor-connectivity (return advices in, the graded outcome back) are built on both sides and are edges of this map.

Derived from: same sections as above.

Feedback view: what feeds the two Core contexts​

Derived from: same sections as above. Omitted from all views: analytics-only events, which have no integration consumer.

Every edge​

UpstreamDownstreamPatternEvents (Kafka)Synchronous calls
customer-orderingcustomer-returnsCFCustomerOrderPlaced, ShopperNoticeDecided-
customer-orderingdelivery-promiseC/SCustomerOrderPlaced, CustomerOrderCancelled-
customer-orderingorder-sourcingC/SCustomerOrderPlaced, CustomerOrderCancelled-
customer-orderingshipping-and-trackingC/S-qry GetShipTo (REST GET /orders/{orderId}/ship-to)
customer-returnsoffer-availabilityCFReturnCompleted-
customer-returnsvendor-connectivityCFReturnAuthorized, ReturnLabelIssued, ReturnCancelled-
delivery-promisecustomer-ordering? + C/SPromiseAtRisk, PromiseRevised, PromiseKept, PromiseBroken, PromiseUnkeepableqry QuoteDeliveryOffers (REST POST /delivery-quotes); cmd MakePromise, ConfirmPromise, CancelPromise (REST POST /promises, POST /promises/{promiseId}/confirmations, POST /promises/{promiseId}/cancellations)
delivery-promisenode-performanceCFPromiseKept, PromiseBroken-
delivery-promiseorder-sourcingC/SPromiseRevised, PromiseBookExhausted-
last-mile-deliverydelivery-promise? + CFDeliveryWaveScheduled, DeliveryWaveCapacityChanged, DeliveryWaveCancelled, PackageInductionDeferred-
last-mile-deliveryorder-sourcing? + CFDeliveryWaveScheduled, WaveCostDeclared, WaveEmissionDeclared, DeliveryWaveCapacityChanged, DeliveryWaveCancelled-
last-mile-deliveryshipping-and-tracking? + CFPackageOutForDelivery, StopEtaWindowAssigned, DeliveryAttempted, PackageReturnInitiated, DeliveryPointFlagged-
linehaul-transportationdelivery-promise? + CFDepartureScheduled, DepartureCapacityChanged, DepartureCancelled, LoadDeparted, LoadArrived, BookingMoved, BookingFailed-
linehaul-transportationlast-mile-deliveryC/SLoadArrived-
linehaul-transportationorder-sourcing? + CFDepartureScheduled, DepartureCapacityChanged, DepartureCancelled, BookingMoved, BookingFailed-
linehaul-transportationshipping-and-trackingCFLoadDeparted, LoadArrived-
node-performancedelivery-promiseCFNodeScorecardUpdated, NodeTierEligibilityChanged-
node-performanceorder-sourcingCFNodeScorecardUpdated-
node-performancevendor-connectivityC/S-qry GetScorecard (REST GET /scorecards/{nodeId})
node-topologycustomer-returnsCFNodeRegistered, NodeActivated, NodeSuspended, NodeRetired, ServiceAreaAssigned-
node-topologydelivery-promiseCFNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneClosed, ServiceAreaAssigned, RegionDefined-
node-topologylast-mile-deliveryCFNodeRegistered, ServiceAreaAssigned-
node-topologylinehaul-transportationCFNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneClosed-
node-topologynode-performanceCFNodeRegistered, NodeOperationalProfileDeclared-
node-topologyoffer-availabilityCFNodeRegistered, NodeActivated, NodeSuspended, NodeRetired-
node-topologyorder-sourcingCFNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneCostDeclared, LaneEmissionDeclared, LaneClosed, ServiceAreaAssigned, RegionDefined-
node-topologyseller-inboundCFNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired-
node-topologyshipping-and-trackingCFNodeRegistered, NodeActivated, NodeSuspended, NodeRetired, ServiceAreaAssigned-
node-topologyvendor-connectivity? + C/S + CFNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetiredcmd RegisterNode, DeclareOperationalProfile (REST POST /nodes, PUT /nodes/{nodeId}/operational-profile)
offer-availabilitydelivery-promiseCFCatalogItemCreated, CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestored-
offer-availabilitynode-performanceCFInventoryFeedApplied-
offer-availabilityorder-sourcingCFCatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestored-
offer-availabilityseller-inboundCFCatalogItemPackagingDeclared, CatalogItemPackLevelRetired, ListingAvailabilityChanged-
offer-availabilityshipping-and-trackingCFCatalogItemCreated-
offer-availabilityvendor-connectivityC/S + CFCatalogItemPackagingDeclared, CatalogItemPackLevelRetired, ListingCreatedcmd ApplyInventoryFeed (REST POST /inventory-feeds)
order-sourcingcustomer-ordering? + CFFulfillmentLocked, FulfillmentShipped, FulfillmentUnsourceable, FulfillmentCancelled, FulfillmentCancelRefused-
order-sourcingcustomer-returnsCFFulfillmentReleasedToNode, FulfillmentLocked-
order-sourcingdelivery-promise? + C/SFulfillmentLocked, FulfillmentShipped, FulfillmentUnsourceable-
order-sourcinglinehaul-transportationC/SFulfillmentReleasedToNode, FulfillmentReassigned, FulfillmentLocked, FulfillmentCancelled-
order-sourcingseller-inboundCFFulfillmentReleasedToNode, FulfillmentCancelled-
order-sourcingvendor-connectivityC/SFulfillmentReleasedToNode, FulfillmentReleaseWithdrawn, FulfillmentCancelled-
seller-inboundnode-performanceCFInboundShipmentShipped-
seller-inboundoffer-availabilityCFSellerSuspended, SellerReinstated, InboundShipmentReceived-
seller-inboundvendor-connectivityC/SInboundShipmentLabelled, InboundShipmentShipped, InboundShipmentReceived-
shipping-and-trackingcustomer-ordering? + CFLabelIssued, LabelVoided, PackageScanned, PackageDelivered, PackageExceptionRaised, PackageReturned, PackageLost, PackageEtaWindowAssigned, PackageDeliveryPointFlagged-
shipping-and-trackingcustomer-returnsC/S-cmd IssueReturnLabel (REST POST /return-labels)
shipping-and-trackingdelivery-promise? + CFPackageDelivered, PackageExceptionRaised, PackageReturned, PackageLost, PackageHandedToCarrier, PackageReadyForCollection-
shipping-and-trackinglast-mile-delivery?LabelIssued-
shipping-and-trackinglinehaul-transportation? + CFLabelIssued, LabelVoided-
shipping-and-trackingnode-performanceCFPackageHandedOver-
shipping-and-trackingorder-sourcingCFPackageDelivered-
shipping-and-trackingvendor-connectivityC/S-cmd IssueLabel (REST POST /labels)
vendor-connectivitycustomer-returnsC/SVendorReturnOutcomeSubmitted-
vendor-connectivitynode-performanceCFVendorOnboarded, PurchaseOrderIssued, PurchaseOrderAccepted, PurchaseOrderRejected, PurchaseOrderExpired, VendorShipmentConfirmed, SubmissionProcessed, InboundReceiptSubmitted-
vendor-connectivityorder-sourcingC/SPurchaseOrderAccepted, PurchaseOrderRejected, PurchaseOrderExpired, VendorShipmentConfirmed-
vendor-connectivityseller-inboundC/SInboundReceiptSubmitted-
vendor-connectivityshipping-and-trackingC/SVendorShipmentConfirmed-
vendor-connectivitynetwork-fulfillment (warehouse-systems)OHS + PL / CF + ACLnone (no shared topic)Vendor API, called by the downstream

Why these patterns​

  • node-topology, linehaul-transportation, last-mile-delivery, offer-availability and node-performance are upstream of the two Core contexts, which conform to their events. Their facts (a node's profile, a departure's remaining capacity, a wave's stops) are not negotiable by the promise; the promise keeps local, event-fed copies and makes no synchronous call on its hot path.
  • customer-ordering → delivery-promise is Customer/Supplier. Checkout needs an answer inside the shopper's request, so it calls the promise API; the promise context sets the contract.
  • order-sourcing ↔ vendor-connectivity is Customer/Supplier in both directions by event. Sourcing decides (release, cancel); the vendor protocol reports what the vendor did (accepted, rejected, expired, shipped).
  • vendor-connectivity is a customer of node-topology, offer-availability and shipping-and-tracking. It is a gateway: it validates and times a vendor's write, then hands it to the owner of the fact. It never owns node profiles, availability or labels itself.
  • shipping-and-tracking → customer-ordering is a restricted Customer/Supplier read. The label needs the address; nothing else does.
  • seller-inbound ↔ vendor-connectivity is Customer/Supplier in both directions by event. The shipment manifest goes out as InboundShipmentShipped; the vendor's carton-level answer comes back as InboundReceiptSubmitted. The vendor never calls seller-inbound: the Vendor API stays the only channel, and the seller never reaches the vendor.
  • seller-inbound conforms to node-topology and offer-availability. A node's inbound limits and a catalogue item's packaging hierarchy are their facts; seller-inbound keeps local, event-fed copies (NodeInboundView, CatalogPackagingView) and makes no synchronous call.
  • customer-returns conforms to customer-ordering, node-topology and order-sourcing, and offer-availability conforms to it. Whether a group may be returned, which returns centre serves its region and which node fulfilled it are their facts; customer-returns keeps local, event-fed copies (OrderGroupView, ReturnsNetworkView) and never calls them back. Its ReturnCompleted is a restock fact that offer-availability applies to the owner listing.