Bounded Context Canvas
Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.
Following the ddd-crew Bounded Context Canvas v5.
Every message row comes from inbound, consumes, publishes or
sync_calls of this context in the model.
Canvas at a glance
Two pictures of the sections below. Arrows follow the message type:
solid blue commands (cmd), dotted green queries (qry), thick
orange events (evt). Box shapes mark the collaborator kind: rounded =
people; blue = sibling bounded context; double border = external system
(the other organization); dashed = no context consumer. Channel names are
abbreviated; the tables carry the exact route, topic and CloudEvents type.
Inbound
Derived from: model.yaml → contexts[vendor-connectivity].inbound, .consumes, .purpose, .roles, .business_decisions.
Outbound
Derived from: model.yaml → contexts[vendor-connectivity].inbound,
.consumes, .publishes, .sync_calls, .purpose, .roles,
.business_decisions.
Omitted: the internal triggers that drive commands without a collaborator
(the ExpireUnacknowledged sweep and the submission processor that runs
ProcessSubmission after notBefore); replies to queries; the relationship
pattern per message (see the tables); assumptions, metrics and open
questions. "Accepted, Rejected, Expired" on the arrows abbreviate the full
PurchaseOrder... event names.
Name
Vendor Connectivity (vendor-connectivity, code VC, CloudEvents tier
partner).
Purpose
The network's Open Host Service for vendors that operate fulfillment nodes. It publishes the Vendor API and its Published Language: vendors register nodes, declare their operational profile, send inventory feeds, poll purchase orders, acknowledge them in full inside the acknowledgement window, request labels and confirm shipment. Every write is an asynchronous transaction a vendor reconciles.
Strategic Classification
| Axis | Verdict |
|---|---|
| Domain | Supporting. See the Core Domain Chart. |
| Business Model | Revenue-channel enabler (third-party capacity without integration cost). |
| Evolution | Product: the protocol shape is well known and adopted in the network's own vocabulary. |
Domain Roles
| Role | Applies? | Why |
|---|---|---|
| Gateway / Open Host Service | Yes, primary | The Vendor API is the one door for every vendor; its schemas are the Published Language (apis/vendor-connectivity/openapi.yaml). It relays node, profile and inventory writes to their owners. |
| Execution | Yes | Owns the purchase-order protocol and its clock: issue, ackBy, expiry, acceptance, label gate, shipment confirmation. |
| Analysis | No | Measuring vendors is node-performance's job. |
| Specification | No | Node and listing master data belong to node-topology and offer-availability. |
Inbound Communication
| Collaborator | Message | Type | Channel | Relationship |
|---|---|---|---|---|
network-fulfillment (warehouse-systems, vendor V-WS) | RegisterVendorNode | Command | Vendor API POST /vendor/nodes | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | DeclareNodeProfile | Command | Vendor API PUT /vendor/nodes/{nodeId}/profile | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | SubmitInventory | Command | Vendor API POST /vendor/inventory | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | SubmitAcknowledgement | Command | Vendor API POST /vendor/acknowledgements | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | RequestLabel | Command | Vendor API POST /vendor/shipping-labels | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | SubmitShipmentConfirmation | Command | Vendor API POST /vendor/shipment-confirmations | OHS + PL (downstream is Conformist + ACL) |
| network-fulfillment | PollPurchaseOrders | Query | Vendor API GET /vendor/purchase-orders?createdAfter=&nodeId=&nextCursor= | OHS + PL |
| network-fulfillment | GetPurchaseOrder | Query | Vendor API GET /vendor/purchase-orders/{poNumber} | OHS + PL |
| network-fulfillment | GetTransaction | Query | Vendor API GET /vendor/transactions/{transactionId} | OHS + PL |
| network-fulfillment | GetNode | Query | Vendor API GET /vendor/nodes/{nodeId} | OHS + PL |
| network-fulfillment | GetScorecard | Query | Vendor API GET /vendor/nodes/{nodeId}/scorecard | OHS + PL |
A vendor's returns-centre system (the fleet has no client for these on its develop) | PollReturnAdvices, GetReturnAdvice | Query | Vendor API GET /vendor/return-advices, GET /vendor/return-advices/{authorizationId} (service ADR 0014) | OHS + PL |
| A vendor's returns-centre system | SubmitReturnOutcome | Command | Vendor API POST /vendor/return-outcomes (service ADR 0014) | OHS + PL |
| customer-returns | ReturnAuthorized, ReturnLabelIssued, ReturnCancelled | Event | Kafka retailnetwork.customer-returns.events (into ReturnAdviceView) | Conformist |
| Network partner managers (human) | OnboardVendor | Command | REST POST /vendors | UI |
| order-sourcing | FulfillmentReleasedToNode | Event | Kafka retailnetwork.order-sourcing.events, com.retailnetwork.commerce.order-sourcing.assignment.FulfillmentReleasedToNode | Customer/Supplier |
| order-sourcing | FulfillmentReleaseWithdrawn | Event | Kafka retailnetwork.order-sourcing.events, com.retailnetwork.commerce.order-sourcing.assignment.FulfillmentReleaseWithdrawn | Customer/Supplier |
| order-sourcing | FulfillmentCancelled | Event | Kafka retailnetwork.order-sourcing.events, com.retailnetwork.commerce.order-sourcing.assignment.FulfillmentCancelled | Customer/Supplier |
| node-topology | NodeRegistered | Event | Kafka retailnetwork.node-topology.events, com.retailnetwork.logistics.node-topology.node.NodeRegistered | Conformist |
| node-topology | NodeActivated | Event | Kafka retailnetwork.node-topology.events, com.retailnetwork.logistics.node-topology.node.NodeActivated | Conformist |
| node-topology | NodeSuspended | Event | Kafka retailnetwork.node-topology.events, com.retailnetwork.logistics.node-topology.node.NodeSuspended | Conformist |
| node-topology | NodeRetired | Event | Kafka retailnetwork.node-topology.events, com.retailnetwork.logistics.node-topology.node.NodeRetired | Conformist |
| offer-availability | ListingCreated | Event | Kafka retailnetwork.offer-availability.events, com.retailnetwork.commerce.offer-availability.listing.ListingCreated | Conformist |
Outbound Communication
| Collaborator | Message | Type | Channel | Relationship |
|---|---|---|---|---|
| node-performance | VendorOnboarded | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.vendoraccount.VendorOnboarded | Conformist (downstream) |
| node-performance | PurchaseOrderIssued | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderIssued | Conformist (downstream) |
| order-sourcing, node-performance | PurchaseOrderAccepted | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderAccepted | Customer/Supplier (order-sourcing); Conformist (node-performance) |
| order-sourcing, node-performance | PurchaseOrderRejected | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderRejected | Customer/Supplier (order-sourcing); Conformist (node-performance) |
| order-sourcing, node-performance | PurchaseOrderExpired | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderExpired | Customer/Supplier (order-sourcing); Conformist (node-performance) |
| analytics only | PurchaseOrderCancelled | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderCancelled | — (no context consumer) |
| order-sourcing, shipping-and-tracking, node-performance | VendorShipmentConfirmed | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.purchaseorder.VendorShipmentConfirmed | Customer/Supplier (order-sourcing, shipping-and-tracking); Conformist (node-performance) |
| node-performance | SubmissionProcessed | Event | Kafka retailnetwork.vendor-connectivity.events, com.retailnetwork.partner.vendor-connectivity.submission.SubmissionProcessed | Conformist (downstream) |
| node-topology | RegisterNode, DeclareOperationalProfile | Command | REST (in-org) POST /nodes, PUT /nodes/{nodeId}/operational-profile | Customer/Supplier (this context is the Customer) |
| offer-availability | ApplyInventoryFeed | Command | REST (in-org) POST /inventory-feeds | Customer/Supplier (this context is the Customer) |
| shipping-and-tracking | IssueLabel | Command | REST (in-org) POST /labels | Customer/Supplier (this context is the Customer) |
| node-performance | GetScorecard | Query | REST (in-org) GET /scorecards/{nodeId} | Customer/Supplier (this context is the Customer) |
Full payloads: Domain Events. Patterns and reasons: Context Map.
Ubiquitous Language
Full glossary with the fleet translation:
Ubiquitous Language.
Top terms: Vendor, Purchase Order (poNumber), Acknowledgement
(fill-or-kill), ackBy, Required Ship-By, Submission /
Transaction (transactionId), Label (never the address), Vendor
API.
Business Decisions
- Acknowledge once, in full, before
ackBy. Fill-or-kill; partial acknowledgements are refused (ErrPartialAcknowledgement,ErrAlreadyAcknowledged,ErrAckWindowClosed). ackBy = min(issuedAt + vendor ackWindow, requiredShipBy - node handlingTime).- A label is issued only for an
ACCEPTEDpurchase order; a shipment is confirmed only after a label (ErrLabelBeforeAcceptance,ErrConfirmWithoutLabel). - Every vendor write returns
202with atransactionId; the write takes effect when its transaction succeeds. - The Vendor API never carries ship-to PII.
- Rate limits are part of the contract (
429withRetry-After). - One release, one purchase order.
poNumberis idempotent onassignmentId + releaseNo(policyIssueOnRelease), so a redelivered release never issues a second order. - Cancel only while
ISSUED(ErrCancelAfterAcknowledgementfor an order past acknowledgement,ErrIllegalTransitionfor anEXPIREDorCANCELLEDone; policyCancelOnSourcingCancel).
Assumptions
order-sourcingreleases to a vendor node early enough thatackByis in the future (itsVirtualQueuepolicy subtracts a vendor ack budget).- The node's handling time is known to this context when it issues a purchase order (see Open Questions: the model does not feed it here).
- Vendors poll often enough to see a purchase order well before
ackBy. - The four simulation knobs default to well-behaved; a non-default value is a test setting, not production behaviour.
- One vendor per node: a node's
vendorIdcomes fromNodeRegistered.
Verification Metrics
| Metric | Source | Target (proposed) |
|---|---|---|
Share of purchase orders acknowledged before ackBy | PurchaseOrderAccepted + PurchaseOrderRejected vs PurchaseOrderExpired | Expiry rate tracked per node by node-performance (expiryRate) |
| Acknowledgement latency (issue to accepted or rejected) | PurchaseOrderIssued.time to PurchaseOrderAccepted.acceptedAt / PurchaseOrderRejected.rejectedAt | p95 well inside the vendor's ack window |
| Transaction failure share by kind | SubmissionProcessed (kind, status, errorCount) | Equals TX_FAILURE_RATE in simulation; near 0 otherwise |
| Processing lag | processedAt - notBefore per submission | p95 under one processor tick |
429 responses per vendor | API metrics | Low and stable; a spike means a vendor is not honouring Retry-After |
| Shipments confirmed on time | VendorShipmentConfirmed (shippedAt vs requiredShipBy) | Feeds node-performance's on-time handover |
| Ship-to PII in the Vendor API | Contract review of openapi.yaml | Zero fields, always |
Open Questions
- Where does
ackBygethandlingTime? (resolved, service ADR 0003). FromNodeOperationalProfileDeclared, which this context consumes intoVendorNodeView.handlingTimeMinutes; a node with no declared profile has handling time 0. - Cancellation after acknowledgement (resolved, G12; one race stays open).
order-sourcing may cancel a
RELEASEDassignment while its purchase order isACK_PROCESSINGorACCEPTED; here cancel is refused (ErrCancelAfterAcknowledgement), logged, and nothing is published. The decision lives in order-sourcing, which refuses a cancel after the lock (FulfillmentCancelRefused). An acceptance that arrives after order-sourcing cancelled aRELEASEDassignment is only logged there, so the vendor may still ship a cancelled group. - Vendor suspension (resolved, service ADR 0002 A9, A14).
SuspendVendorandReinstateVendorarePOST /vendors/{vendorId}/suspensionsand/reinstatements, raiseVendorSuspendedandVendorReinstatedon the events topic, and aSUSPENDEDvendor's writes are refused with 409vendor-suspended. - The label request is synchronous. The model says every write returns
202, butSubmissionKindhas no label kind andIssueLabelis a synchronous call. The proposed contract returns labels in the response. Raised as a model gap. - How does a vendor learn its
nodeId? ANODE_REGISTRATIONtransaction reports only status and errors. Raised as a model gap. - Who is calling? With no auth, the vendor names itself with
vendorIdin each write; reads have no vendor parameter, soErrNodeNotOwnedByVendorcannot be checked on them. Raised as a model gap. - Synchronous refusal or failed transaction? The proposed contract
refuses invariant breaches it can detect at receipt synchronously (4xx,
no transaction) and reports downstream refusals as
FAILUREwitherrors. The model does not say which; confirm.