Skip to main content

Vendor Connectivity

vendor-connectivity is a Supporting bounded context in the Network area of the warehouse-systems fleet (the retail network, CloudEvents tier partner). It is the network's Open Host Service for the vendors that operate its fulfillment nodes: it publishes the Vendor API, whose JSON schemas are the Published Language, and it runs the protocol behind it. Vendors register nodes, declare each node's operational profile, send inventory feeds, poll purchase orders, acknowledge each one once and in full before ackBy, request labels and confirm shipment. Every write except the label request is asynchronous: it returns 202 with a transactionId that the vendor reconciles with GET /vendor/transactions/{transactionId}.

Inside the network the context turns an order-sourcing release into a purchase order, runs its acknowledgement clock, and reports the vendor's answer back as events. The warehouse-systems fleet is one such vendor (V-WS); its network-fulfillment context reaches the network only through this API, and this context never calls into the fleet (ADR 0001).

:::info What runs on develop Three Go binaries share one application service: cmd/api (Vendor REST API, transactional outbox relay, five Kafka consumers, three background loops), cmd/mcp (read-only MCP over Streamable HTTP, nine tools) and cmd/a2a (read-only A2A agent, two skills). A fourth deployable, web/, is the vendor_connectivity_mfe Module Federation remote for the warehouse console. It runs on real Postgres and real Kafka only: there is no in-memory mode and no log sink, and DATABASE_URL, KAFKA_BROKERS, five consumer group ids and four neighbour URLs are mandatory for cmd/api. REST, MCP and A2A are unauthenticated, as everywhere in the fleet. :::

What the context owns​

ConceptWhere it livesRule in one line
VendorAccountinternal/domain/vendorA vendor's standing (ACTIVE or SUSPENDED) and its acknowledgement window, 1 h to 24 h. A suspended vendor's writes are refused.
PurchaseOrderinternal/domain/purchaseorderOne order per assignmentId and releaseNo, issued from an order-sourcing release. States ISSUED, ACK_PROCESSING, ACCEPTED, REJECTED, EXPIRED, SHIPMENT_PROCESSING, SHIPPED, CANCELLED. Acknowledge in full, once, before ackBy.
Submissioninternal/domain/submissionOne asynchronous vendor write (seven kinds) and its outcome, set once: PROCESSING, SUCCESS, FAILURE.
Local copiesvendor_nodes, listings, inbound_shipments, catalog_packagingEvent-fed read models of other contexts' facts, not aggregate state (ADR 0003, ADR 0005).
Inbound shipments and receiptsinternal/domain/inboundA seller's cartons announced by seller-inbound, polled by the vendor and answered with a carton-level receipt.

ackBy = min(issuedAt + vendor ackWindow, requiredShipBy - node handlingTime): the vendor never gets more time to answer than it has left to pick and pack.

What it does not own​

  • Choosing the node. order-sourcing owns assignment and reassignment; this context reports the vendor's answer and never picks another node.
  • The node registry and listings. node-topology and offer-availability own them; vendor writes are relayed to them over REST and the answers come back as events.
  • Labels and tracking. shipping-and-tracking issues the label (and holds the ship-to address); the Vendor API only ever carries labelRef, trackingNumber and carrier, never an address or other PII.
  • Measuring the vendor. node-performance owns the scorecard; this context relays it.
  • Authentication. There is none. The vendor names itself in each request and ownership is a consistency check (API overview).
  • Payments and invoicing, returns authorisation, inventory placement. Out of scope.
  • Anything inside the warehouse. No retail-network context reads a warehouse.* topic or calls a fleet service.

Classification and tier​

  • Supporting subdomain, partner tier. A direct-fulfillment-style protocol is industry practice; the value is contract stability, not cleverness (Subdomain classification).
  • CloudEvents types look like com.retailnetwork.partner.vendor-connectivity.<entity>.<EventName>.

Main capabilities​

  1. Onboard, suspend and reinstate a vendor account (POST /vendors, POST /vendors/{vendorId}/suspensions, POST /vendors/{vendorId}/reinstatements).
  2. Turn FulfillmentReleasedToNode into a purchase order with a computed ackBy; cancel it on FulfillmentCancelled while it is still ISSUED; expire it when ackBy passes.
  3. Accept the vendor's whole-order acknowledgement, label request and shipment confirmation, each atomically with its outbox events.
  4. Relay node registration, profile and inventory writes to node-topology and offer-availability, with bounded retry when a neighbour is down.
  5. Expose polling reads for purchase orders and inbound shipments, and a carton-level inbound receipt.
  6. Publish eleven event types on retailnetwork.vendor-connectivity.events (and PurchaseOrderCancelled on the analytics topic) through the transactional outbox.
  7. Offer simulation knobs (TX_PROCESSING_DELAY, TX_FAILURE_RATE, PO_REDELIVERY_RATE, RATE_LIMIT_RPS) so a vendor integration can be exercised against a hostile network.

Where to go next​

You want toRead
See the layers, binaries and data storesArchitecture, Runtime
Run it and make the first callsQuickstart
Know every settingConfiguration
Deploy and operate itRunbook, Observability, Before the first release
Fix something that brokeTroubleshooting
Know what tests and CI gates existTesting
See who talks to whomIntegration
See the use cases and invariantsUse cases
Read the design in ddd-crew artifactsDDD artifacts, Ubiquitous language
Read the contractsAPI overview, Event catalogue, MCP tools
Know why it is built this wayADR index
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.