Skip to main content

Subdomain classification

order-sourcing is a Core subdomain of the Network area. Its CloudEvents tier segment is commerce (com.retailnetwork.commerce.order-sourcing.assignment.<EventName>, see internal/adapters/kafka/cloudevents/cloudevents.go). The verdict is the one in the retail-network table of the warehouse-docs aggregator (network/docs/strategic-design/subdomain-classification.md on origin/main), and it matches the strategic classification of ADR 0001. The neighbour rows below are copied from that table, not recalled.

Why Core​

  • Differentiation. Late assignment with re-optimisation until a lock is where cost to serve is decided order by order, and where the promise made at checkout is kept or handed back. The decision structure is specific to this network: the virtual queue and its release point, the AssignmentCost ranking (legs, wait, cross-region, scorecard and promise-book pressure), exclusion of refusing nodes, and the lock on the vendor's acceptance (Use cases). Buying it would mean conforming to someone else's idea of this network.
  • Model complexity. One aggregate, but a rich one: seven states, a release history with at most one pending release, an exclusion list that resets with each promise revision, and per-package delivery. It reacts to 34 consumed event types from nine topics and keeps five event-fed views in ten rm_* tables, because it calls no sibling. Two loops cross a context boundary (release, purchase order, acceptance or refusal with vendor-connectivity; unsourceable, re-promise, re-queue with delivery-promise).
  • Business model: cost-to-serve reduction and speed protection. Evolution: custom-built, with the penalty weights still tunable constants (internal/domain/sourcing/sourcing.go).

What would move it: if the weights settle into fixed defaults that rarely change, parts of AssignmentCost could drift toward Product. The structure (late release, lock on acceptance, hand back when unsourceable) is what keeps the context Core. See the Core domain chart.

Neighbours (from the network table)​

Bounded contextClassificationTierRelation to this context
delivery-promiseCorecommerceupstream (PromiseRevised, PromiseBookExhausted) and downstream (reads FulfillmentUnsourceable, FulfillmentLocked, FulfillmentShipped)
customer-orderingGenericcommerceupstream (CustomerOrderPlaced, CustomerOrderCancelled) and downstream (reflects sourcing facts)
node-topologySupportinglogisticsupstream (nodes, lanes, service areas, regions)
offer-availabilitySupportingcommerceupstream (listings, discontinued items)
vendor-connectivitySupportingpartnerupstream (purchase-order outcomes) and downstream (consumes releases and cancels)
linehaul-transportationSupportinglogisticsupstream (departures, booking moves) and downstream (consumes releases, reassignments, locks, cancels)
last-mile-deliverySupportinglogisticsupstream (delivery waves)
node-performanceSupportingpartnerupstream (scorecards)
shipping-and-trackingGenericlogisticsupstream (PackageDelivered)
seller-inboundSupportingpartnerno edge

The aggregator's network table counts two Core, seven Supporting and two Generic contexts; this page lists only the contexts this one touches or deliberately excludes. The aggregator table is the authority if the two ever differ.

Tier is not classification​

The tier segment groups contexts by area of the business (commerce, logistics, partner); it is not the Core, Supporting or Generic verdict. For this context the two axes read: tier commerce, class Core.

Discrepancy with the aggregator​

The aggregator's chart and canvas pages count 29 consumed event types, 9 commands and 8 published events. The code on develop consumes 34 types and publishes 15 (nine on the events topic, six analytics-only), including BookingMoved, BookingFailed, DeliveryWaveCancelled, FulfillmentCancelRefused and FulfillmentConstraintRevised (Event catalogue). The verdict does not depend on the count.