Skip to main content

Domain Events

These are in-organization events. Vendors never see them; vendors see the Vendor API's Published Language (apis/openapi.yaml). The convention is on Event standard: CloudEvents and ADR 0007.

Envelope​

AttributeValue
specversion1.0
ida UUID minted once per event and stored in the outbox row, so a redelivery carries the same id
source/retailnetwork/vendor-connectivity
typecom.retailnetwork.partner.vendor-connectivity.<entity>.<EventName>; entity is vendoraccount, purchaseorder, submission or inboundreceipt (InboundReceiptSubmitted only)
subjectthe aggregate root id: vendorId, poNumber, transactionId, or shipmentId for InboundReceiptSubmitted
timethe instant of the fact, UTC
datacontenttypeapplication/json
dataschemaurn:retailnetwork:vendor-connectivity:<events|analytics>:<EventName>:v1
Topicretailnetwork.vendor-connectivity.events; PurchaseOrderCancelled goes only to retailnetwork.vendor-connectivity.analytics
Kafka keysame as subject, so one purchase order's events stay in order on one partition

Published​

Every event leaves through the transactional outbox, in the same transaction as the aggregate change.

VendorOnboarded​

Typecom.retailnetwork.partner.vendor-connectivity.vendoraccount.VendorOnboarded
Subject / keyvendorId
Produced byOnboardVendor (REST POST /vendors)
Consumersnode-performance (acknowledged without effect)
FieldTypeMeaning
vendorIdstringThe vendor account id, for example V-WS
namestringThe vendor's name
ackWindowMinutesintegerThe vendor's ack window, 60 to 1440

VendorSuspended​

Typecom.retailnetwork.partner.vendor-connectivity.vendoraccount.VendorSuspended
Subject / keyvendorId
Produced bySuspendVendor (REST POST /vendors/{vendorId}/suspensions), only when the account was ACTIVE
Consumersnone yet
FieldTypeMeaning
vendorIdstringThe vendor account id
suspendedAtdate-timeWhen the suspension took effect
reasonstring, optionalThe operator's reason

VendorReinstated​

Typecom.retailnetwork.partner.vendor-connectivity.vendoraccount.VendorReinstated
Subject / keyvendorId
Produced byReinstateVendor (REST POST /vendors/{vendorId}/reinstatements), only when the account was SUSPENDED
Consumersnone yet
FieldTypeMeaning
vendorIdstringThe vendor account id
reinstatedAtdate-timeWhen the reinstatement took effect

PurchaseOrderIssued​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderIssued
Subject / keypoNumber
Produced byIssueOnRelease (command IssuePurchaseOrder)
Consumersnode-performance
FieldTypeMeaning
poNumberstringThe purchase order
vendorIdstringThe vendor that operates the node
nodeIdstringThe vendor node
assignmentIdstringorder-sourcing's assignment
releaseNointegerThe release of that assignment
requiredShipBydate-timeThe pickup cutoff to be ready for
ackBydate-timemin(issuedAt + ackWindow, requiredShipBy - handlingTime)
linesarray of {lineNo, listingId, quantity, ownerRef?}The PoLines; ownerRef names the seller whose stock to pick, omitted for operator-owned stock (ADR 0012)

PurchaseOrderAccepted​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderAccepted
Subject / keypoNumber
Produced byProcessSubmission (acknowledgement ACCEPT, transaction SUCCESS)
Consumersorder-sourcing, node-performance
FieldTypeMeaning
poNumberstringThe purchase order
assignmentIdstringorder-sourcing's assignment
releaseNointegerThe release
nodeIdstringThe vendor node
acceptedAtdate-timeWhen the acceptance took effect
transactionIdstringThe acknowledgement submission

PurchaseOrderRejected​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderRejected
Subject / keypoNumber
Produced byProcessSubmission (acknowledgement REJECT, transaction SUCCESS)
Consumersorder-sourcing, node-performance
FieldTypeMeaning
poNumberstringThe purchase order
assignmentIdstringorder-sourcing's assignment
releaseNointegerThe release
nodeIdstringThe vendor node
reasonCodeenumOUT_OF_STOCK, UNKNOWN_LISTING, CANNOT_MEET_SHIP_BY, DISCONTINUED
rejectedAtdate-timeWhen the rejection took effect

PurchaseOrderExpired​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderExpired
Subject / keypoNumber
Produced byExpireUnacknowledged (the expiry sweeper)
Consumersorder-sourcing, node-performance
FieldTypeMeaning
poNumberstringThe purchase order
assignmentIdstringorder-sourcing's assignment
releaseNointegerThe release
nodeIdstringThe vendor node
ackBydate-timeThe deadline that passed

PurchaseOrderCancelled​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderCancelled
Subject / keypoNumber
Produced byCancelOnSourcingCancel; published to the analytics topic only
Consumersnone (no repository reads the analytics topic)
FieldTypeMeaning
poNumberstringThe purchase order
assignmentIdstringorder-sourcing's assignment
reasonstringThe reason carried by FulfillmentCancelled, trimmed and capped at 200 characters

VendorShipmentConfirmed​

Typecom.retailnetwork.partner.vendor-connectivity.purchaseorder.VendorShipmentConfirmed
Subject / keypoNumber
Produced byProcessSubmission (shipment confirmation, transaction SUCCESS)
Consumersorder-sourcing, shipping-and-tracking, node-performance
FieldTypeMeaning
poNumberstringThe purchase order
assignmentIdstringorder-sourcing's assignment
nodeIdstringThe vendor node
trackingNumbersarray of stringOne per package, each with a label
shippedAtdate-timeWhen the vendor says it shipped
requiredShipBydate-timeThe cutoff it was due for, so consumers can judge lateness without a lookup

SubmissionProcessed​

Typecom.retailnetwork.partner.vendor-connectivity.submission.SubmissionProcessed
Subject / keytransactionId
Produced byProcessSubmission (any kind, any outcome)
Consumersnode-performance (feed freshness, failure rates)
FieldTypeMeaning
transactionIdstringThe submission
vendorIdstringThe vendor that wrote
kindenumACKNOWLEDGEMENT, INVENTORY, NODE_REGISTRATION, NODE_PROFILE, SHIPMENT_CONFIRMATION, INBOUND_RECEIPT, RETURN_OUTCOME
statusenumSUCCESS or FAILURE
errorCountintegerNumber of SubmissionErrors

No event carries a ship-to address, name or phone.

Example envelope​

PurchaseOrderAccepted is the most important event: it is the path lock (ADR 0005).

{
"specversion": "1.0",
"id": "9b2f4c1e-6a7d-4e0b-8f31-2c5d7a9e1b44",
"source": "/retailnetwork/vendor-connectivity",
"type": "com.retailnetwork.partner.vendor-connectivity.purchaseorder.PurchaseOrderAccepted",
"subject": "PO-7f3c",
"time": "2026-10-22T13:05:41Z",
"datacontenttype": "application/json",
"dataschema": "urn:retailnetwork:vendor-connectivity:events:PurchaseOrderAccepted:v1",
"data": {
"poNumber": "PO-7f3c",
"assignmentId": "asg-41d2",
"releaseNo": 1,
"nodeId": "node-ws-gru1",
"acceptedAt": "2026-10-22T13:05:41Z",
"transactionId": "tx-01J9Z6K4M2"
}
}

Consumed​

Every consumer is idempotent on the CloudEvents id (the processed_events inbox, written in the same transaction as the effect) and dispatches on the full type string.

ProducerFull typeWhat this context doesIdempotency beyond the inbox
order-sourcingcom.retailnetwork.commerce.order-sourcing.assignment.FulfillmentReleasedToNodePolicy IssueOnRelease: if nodeId is a VENDOR node in VendorNodeView, issue a purchase order from assignmentId, releaseNo, requiredShipBy, tier and lines (listingId, quantity, optional ownerRef: absent means operator-owned, ADR 0012); orderId and tier are kept internally for the label call and never published; anything else in the payload is ignored. A node not yet in the view is a retryable failurepoNumber is derived from assignmentId + releaseNo; a second release event with the same pair finds the order and does nothing
order-sourcingcom.retailnetwork.commerce.order-sourcing.assignment.FulfillmentReleaseWithdrawnPolicy CancelOnReleaseWithdrawn (ADR 0013): CancelPurchaseOrder on the order of exactly assignmentId + releaseNo (the withdrawn release of a dissolved consolidation; an unknown release is a no-op). The cancel reason is release withdrawn: <reason>, sanitised and capped like every cancel reasonA non-ISSUED order (accepted, rejected, expired, cancelled) is left as is, logged at INFO, nothing published and not retried
order-sourcingcom.retailnetwork.commerce.order-sourcing.assignment.FulfillmentCancelledPolicy CancelOnSourcingCancel: CancelPurchaseOrder on the order of the assignment's highest releaseNo (no order is a no-op)A CANCELLED order is left as is; a non-ISSUED one is refused (ErrCancelAfterAcknowledgement), logged at INFO, nothing published and not retried
node-topologycom.retailnetwork.logistics.node-topology.node.NodeRegisteredUpsert VendorNodeView (nodeId, vendorId, vendorNodeCode, nodeType, subtype, operator, regionId, timezone); a brand new node is PROPOSED, an existing status is keptUpsert by nodeId
node-topologycom.retailnetwork.logistics.node-topology.node.NodeOperationalProfileDeclaredStore handlingTimeMinutes and profileRevision (feeds ackBy)A revision not higher than the stored one is ignored
node-topologycom.retailnetwork.logistics.node-topology.node.NodeActivatedSet status ACTIVE in VendorNodeViewLast write wins unless the node is RETIRED
node-topologycom.retailnetwork.logistics.node-topology.node.NodeSuspendedSet status SUSPENDEDLast write wins unless the node is RETIRED
node-topologycom.retailnetwork.logistics.node-topology.node.NodeRetiredSet status RETIREDTerminal: no later event changes it
offer-availabilitycom.retailnetwork.commerce.offer-availability.listing.ListingCreatedSave into ListingView (listingId, catalogItemId, nodeId); invalid ids are logged and ignoredKeyed by listingId

Inbound receipts​

Built: ADR 0005 of this repository realises the aggregator's seller-inbound design.

InboundReceiptSubmitted (published)​

Typecom.retailnetwork.partner.vendor-connectivity.inboundreceipt.InboundReceiptSubmitted
Subject / keyshipmentId
Produced bySubmitInboundReceipt, in the same unit of work that accepts the INBOUND_RECEIPT submission (ADR 0005); SubmissionProcessed still reports the processing
Consumersseller-inbound, node-performance (inbound timeliness and accuracy observations)
FieldTypeMeaning
transactionIdstringThe submission
vendorIdstringThe vendor that wrote
nodeIdstringThe receiving node
shipmentIdstringThe inbound shipment the receipt answers
receivedAtRFC 3339 instantWhen the vendor says the cartons arrived
cartonsarrayPer carton: sscc, status (RECEIVED, MISSING, UNEXPECTED, DAMAGED), items (gtin, qtyEaches received), complianceCodes

Quantities are eaches. No event carries a ship-to address, name or phone.

Consumed​

ProducerFull typeWhat this context does
seller-inboundcom.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentLabelledInsert into InboundShipmentView (the carton manifest the vendor polls), with sellerId exposed unchanged (the vendor carries it as its ownerRef).
seller-inboundcom.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentShippedMark the shipment SHIPPED in InboundShipmentView; only SHIPPED shipments are returned by the poll.
seller-inboundcom.retailnetwork.partner.seller-inbound.inboundshipment.InboundShipmentReceivedMark the shipment closed in InboundShipmentView; it leaves the poll.
offer-availabilitycom.retailnetwork.partner.offer-availability.catalogitem.CatalogItemPackagingDeclared (the commerce tier spelling is accepted too)Upsert CatalogPackagingView (levels, GTINs, unitsPerPack).
offer-availabilitycom.retailnetwork.partner.offer-availability.catalogitem.CatalogItemPackLevelRetired (or the commerce spelling)Mark the level inactive in CatalogPackagingView.

Source: internal/domain/*/events.go (event structs), internal/adapters/outbound/kafka/encoder.go (payloads, topics, subjects), internal/adapters/inbound/kafka/consumers.go and inbound_consumers.go (consumed types) and apis/asyncapi.yaml. The full catalogue is on Events.