Skip to main content

Event Standard (CloudEvents)

Generated from the model

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

Every Kafka message in the storefront is a CloudEvents 1.0 structured JSON envelope, the same rule the fleet and the network apply. The storefront tier segment is always storefront (com.retailnetwork.storefront.<context>...), distinct from the network's commerce, logistics and partner tiers; the storefront consumes retailnetwork.* topics of the network (in-org, D1) and never produces or consumes a warehouse.* topic.

AttributeRule
specversion1.0
typecom.retailnetwork.storefront.<context>.<entity>.<EventName>
source/retailnetwork/<context>
subjectaggregate root id (also the Kafka partition key)
dataschemaurn:retailnetwork:<context>:events:<EventName>:v1
datacontenttypeapplication/json
idUUID; consumers are idempotent on it (inbox table)
timethe instant the fact became true, not the publish time
Topicretailnetwork.<context>.events (integration), retailnetwork.<context>.analytics (analytics)

Tiers (the <tier> segment):

TierContexts
storefrontproduct-content, pricing, product-discovery, shopping-cart, checkout, customer-payments

Integration rules carried by every context:

  • Every context owns its database; no shared tables.
  • Every published event leaves through a transactional outbox.
  • Every consumer is idempotent on the CloudEvents id (inbox table).
  • Consumers dispatch on the full type string, never on a suffix.
  • Sibling data used in a decision is a local, event-fed read model.
  • Synchronous calls exist only where a user request needs an answer (listed under sync_calls).
  • Analytics-only events go to the .analytics topic only.
  • Money is {amountMinor int64, currency}; one configured currency (ISO 4217, integer minor units).
  • Shared problem types (RFC 9457, application/problem+json, type /problems/<slug>) are not-found 404, illegal-transition 409, concurrent-update 409, validation-failed 422, plus one kebab-case slug per Err in the model.
  • Every write route takes an Idempotency-Key header; a repeated key returns the stored response of the first call.

Example envelope​

{
"specversion": "1.0",
"id": "7b1d3f0e-2c4a-4f7e-9a51-3c2b8e6d1f20",
"source": "/retailnetwork/checkout",
"type": "com.retailnetwork.storefront.checkout.checkoutsession.CheckoutCompleted",
"subject": "cs-01J9Z6Q8K2",
"time": "2026-10-24T14:05:11Z",
"datacontenttype": "application/json",
"dataschema": "urn:retailnetwork:checkout:events:CheckoutCompleted:v1",
"data": {
"sessionId": "cs-01J9Z6Q8K2",
"orderId": "co-88231",
"shopperId": "sh-0042",
"cartId": "cart-01J9YXY2AB",
"authorizationId": "pa-01J9Z6R0T4",
"currency": "USD",
"totalMinor": 12998,
"groups": [{"groupNo": 1, "tier": "NEXT_DAY", "amountMinor": 12998}],
"completedAt": "2026-10-24T14:05:11Z"
}
}

Event catalogue​

pricing​

Topic retailnetwork.pricing.events (analytics-only events on retailnetwork.pricing.analytics). Analytics-only events carry dataschema urn:retailnetwork:pricing:analytics:<EventName>:v1.

EventCloudEvents typeConsumers
ItemPriceChangedcom.retailnetwork.storefront.pricing.itemprice.ItemPriceChangedproduct-discovery, shopping-cart
ItemPriceWithdrawncom.retailnetwork.storefront.pricing.itemprice.ItemPriceWithdrawnproduct-discovery, shopping-cart
DeliveryChargeScheduleChangedcom.retailnetwork.storefront.pricing.deliverychargeschedule.DeliveryChargeScheduleChangedshopping-cart
TaxTableChangedcom.retailnetwork.storefront.pricing.taxtable.TaxTableChangedshopping-cart
PriceQuoteIssuedcom.retailnetwork.storefront.pricing.pricequote.PriceQuoteIssuedanalytics only

product-content​

Topic retailnetwork.product-content.events (analytics-only events on retailnetwork.product-content.analytics).

EventCloudEvents typeConsumers
ProductContentPublishedcom.retailnetwork.storefront.product-content.productcontent.ProductContentPublishedproduct-discovery
ProductContentRetiredcom.retailnetwork.storefront.product-content.productcontent.ProductContentRetiredproduct-discovery
CategoryTreePublishedcom.retailnetwork.storefront.product-content.categorytree.CategoryTreePublishedproduct-discovery

shopping-cart​

Topic retailnetwork.shopping-cart.events (analytics-only events on retailnetwork.shopping-cart.analytics). Analytics-only events carry dataschema urn:retailnetwork:shopping-cart:analytics:<EventName>:v1.

EventCloudEvents typeConsumers
CartLineAddedcom.retailnetwork.storefront.shopping-cart.cart.CartLineAddedanalytics only
CartDeliveryQuotedcom.retailnetwork.storefront.shopping-cart.cart.CartDeliveryQuotedanalytics only
CartAbandonedcom.retailnetwork.storefront.shopping-cart.cart.CartAbandonedanalytics only
CartCheckedOutcom.retailnetwork.storefront.shopping-cart.cart.CartCheckedOutanalytics only

checkout​

Topic retailnetwork.checkout.events (analytics-only events on retailnetwork.checkout.analytics). Analytics-only events carry dataschema urn:retailnetwork:checkout:analytics:<EventName>:v1.

EventCloudEvents typeConsumers
CheckoutCompletedcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutCompletedshopping-cart, customer-payments
CheckoutOpenedcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutOpenedanalytics only
CheckoutDeclinedcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutDeclinedanalytics only
CheckoutRequoteRequiredcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutRequoteRequiredanalytics only
CheckoutFailedcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutFailedanalytics only
CheckoutSessionExpiredcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutSessionExpiredanalytics only
CheckoutPlacementInDoubtcom.retailnetwork.storefront.checkout.checkoutsession.CheckoutPlacementInDoubtanalytics only

customer-payments​

Topic retailnetwork.customer-payments.events for every event, analytics-only ones included (no analytics topic).

EventCloudEvents typeConsumers
PaymentAuthorizedcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentAuthorizedanalytics only
PaymentReauthorizedcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentReauthorizedanalytics only
PaymentCapturedcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentCapturedanalytics only
PaymentReleasedcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentReleasedanalytics only
PaymentAuthorizationExpiredcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentAuthorizationExpiredanalytics only
RefundIssuedcom.retailnetwork.storefront.customer-payments.refund.RefundIssuedanalytics only
RefundFailedcom.retailnetwork.storefront.customer-payments.refund.RefundFailedanalytics only
PaymentDeclinedcom.retailnetwork.storefront.customer-payments.paymentauthorization.PaymentDeclinedanalytics only

Consumed network events​

The storefront conforms to these network event types (produced on the network's commerce and logistics tiers; see the network Event Standard for the full network catalogue):

ConsumerEventProducer
pricingCatalogItemCreatedoffer-availability
pricingCatalogItemDiscontinuedoffer-availability
product-contentCatalogItemCreatedoffer-availability
product-contentCatalogItemDiscontinuedoffer-availability
product-discoveryCatalogItemCreatedoffer-availability
product-discoveryCatalogItemDiscontinuedoffer-availability
product-discoveryListingCreatedoffer-availability
product-discoveryListingAvailabilityChangedoffer-availability
product-discoveryListingSuppressedoffer-availability
product-discoveryListingRestoredoffer-availability
shopping-cartCatalogItemCreatedoffer-availability
shopping-cartCatalogItemDiscontinuedoffer-availability
customer-paymentsFulfillmentShippedorder-sourcing
customer-paymentsFulfillmentCancelledorder-sourcing
customer-paymentsFulfillmentUnsourceableorder-sourcing
customer-paymentsPackageLostshipping-and-tracking
customer-paymentsPackageReturnedshipping-and-tracking