Skip to main content

Bounded Context Canvas

Built on develop, not deployed

Derived from model/model.yaml. The product-content service is built on develop (IQVO/product-content at 2f09dc0, checked 2026-10-27) and not deployed (no warehouse-infra entry). Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.

Following the ddd-crew Bounded Context Canvas v5. Every message row comes from contexts[product-content] (inbound, consumes, publishes, rest; sync_calls is empty) or from a neighbour's entry that names this context.

Canvas at a glance​

Two pictures of the sections below, laid out like the ddd-crew canvas: first the inbound collaborators feeding this context (purpose, domain roles and the business decisions it enforces), then the outbound collaborators it notifies. Arrows follow the message type: solid blue commands (cmd), dotted green queries (qry), thick orange events (evt); each arrow names its channel and the messages it carries. Box shapes mark the collaborator kind: rounded = people, UI or any client; blue = sibling bounded context. Channel names on the arrows are abbreviated; the Inbound and Outbound Communication tables carry the exact route, topic and CloudEvents type for every message.

Inbound​

Outbound​

Derived from: model.yaml → contexts[product-content].inbound, .publishes, .purpose, .roles, .business_decisions.

The diagrams omit assumptions, verification metrics, open questions and the ubiquitous language (sections below), the relationship pattern per message (see the tables), and the synchronous replies. PublishCategoryTree is triggered by the content manager through POST /category-tree-publications. This context makes no synchronous calls (sync_calls: []): the item data it needs is the local, event-fed CatalogItemView.

Name​

Product Content (product-content, code PC, CloudEvents tier storefront).

Purpose​

To enrich the network's catalogue item with everything a product page needs and the item master does not have. The context:

  • holds the sellable content of one item (description, bullets, attributes, media, primary category) as one versioned, publishable unit;
  • publishes content only when complete — a description, exactly one PRIMARY medium and a category (ErrIncompleteContent);
  • owns the single, versioned category tree, at most four levels deep;
  • retires published and draft content when the network discontinues the item (RetireOnDiscontinue); a discontinued item can never publish (ErrItemDiscontinued).

Strategic Classification​

AxisVerdict
DomainGeneric subdomain. See the Core Domain Chart.
Business ModelEngagement enabler (buy a PIM in production).
EvolutionCommodity.

Domain Roles​

RoleApplies?Evidence in the model
Specification (content of an item)Yes, primaryThe publish gate (ErrIncompleteContent, ErrUnknownCategory) defines what sellable content must look like.
Master data (category tree)YesCategoryTree is the one versioned tree every content references by primaryCategoryId.
ExecutionNoNo transactional flow runs here; commands are authoring actions.
Analysis / GatewayNoThe reads are projections for product-discovery's bootstrap, not decisions; shoppers reach the catalogue through product-discovery, not here.

Inbound Communication​

CollaboratorMessageTypeChannelRelationship
Storefront content manager (human)CreateProductContent, ReviseDraft, ReviseContent, PublishContent, DiscardDraft, RetireContent, CreateCategory, MoveCategory, RenameCategoryCommandREST /product-contents, /categoriesUI
Storefront content manager (human)PublishCategoryTreeCommandREST POST /category-tree-publicationsUI
Storefront content manager (human)GetProductContentQueryREST GET /product-contents/{catalogItemId}UI
product-discoveryListProductContents, ListCategoriesQueryREST GET /product-contents (bootstrap, paged), GET /categories (product-discovery does not call GetProductContent)Customer/Supplier (we are the Supplier)
offer-availabilityCatalogItemCreatedEventKafka retailnetwork.offer-availability.events, com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemCreatedConformist
offer-availabilityCatalogItemDiscontinuedEventKafka retailnetwork.offer-availability.events, com.retailnetwork.commerce.offer-availability.catalogitem.CatalogItemDiscontinuedConformist

Outbound Communication​

CollaboratorMessageTypeChannelRelationship
product-discoveryProductContentPublishedEventKafka retailnetwork.product-content.events, com.retailnetwork.storefront.product-content.productcontent.ProductContentPublishedCustomer/Supplier (we are the Supplier)
product-discoveryProductContentRetiredEventKafka retailnetwork.product-content.events, com.retailnetwork.storefront.product-content.productcontent.ProductContentRetiredCustomer/Supplier (we are the Supplier)
product-discoveryCategoryTreePublishedEventKafka retailnetwork.product-content.events, com.retailnetwork.storefront.product-content.categorytree.CategoryTreePublishedCustomer/Supplier (we are the Supplier)

What the consumer does with them (from its own model entry): product-discovery folds each event into ProductView and CategoryView, guarded by the content revision and tree version as per-source monotonic guards. Full payloads: Domain Events. Relationship evidence: Context Map.

Ubiquitous Language​

Full glossary: Ubiquitous Language. Top terms: Product Content, Revision, Primary Medium, Category, Category Tree.

Business Decisions​

  1. Content publishes only when complete: a description, exactly one PRIMARY medium and a category (ErrIncompleteContent).
  2. Only catalogItemId crosses the boundary; content never redefines the item itself [19]. The item must exist in the local CatalogItemView (ErrUnknownCatalogItem) and must not be DISCONTINUED (ErrItemDiscontinued).
  3. The category tree is one versioned, always-published aggregate with no draft state (every command applies to the live tree and publishes a new version), at most four levels deep (ErrMaxDepth), never cyclic (ErrCategoryCycle), with unique sibling names (ErrDuplicateSiblingName); a category in use by PUBLISHED content is never removed (ErrCategoryInUse, which guards a future removal: categories are only renamed or moved, never deleted).
  4. RETIRED content never publishes again (ErrContentRetired).

Assumptions​

  • offer-availability publishes CatalogItemCreated before any content manager writes content for the item; content for an unknown item is rejected (ErrUnknownCatalogItem), so an early write fails rather than waits.
  • CatalogItemDiscontinued eventually reaches this context for every discontinued item; until it does, the item's published content stays up and product-discovery still shows it (its own Purchasable rule also requires an ACTIVE item in the item master, so the page is not buyable in the gap).
  • Media URLs point at static assets that exist; nothing here validates a URL (media upload is out of scope).
  • Every consumed event carries catalogItemId (the only field this context declares it needs).
  • Exactly one consumer of the published events exists (product-discovery); the analytics topic receives nothing, because the model lists no analytics-only event here.

Verification Metrics​

MetricTarget (proposed)Source
Publish success rate (201/200 on POST .../publications of all attempts)tracked; alert on a dropREST access log
Share of publishes rejected ErrIncompleteContenttracked (authoring quality signal)REST access log
Published content without a matching ProductContentPublished in the outbox0outbox vs aggregate state
p95 latency of GET /product-contents/{catalogItemId}below 200 mstraces
Outbox age of the oldest unpublished eventbelow 5 soutbox_events.created_at
Consumer lag on retailnetwork.offer-availability.eventsbelow 30 sKafka consumer metrics
PUBLISHED content of DISCONTINUED items (retirement lag)0 beyond one consumer-lag windowjoin on rm_catalog_items
revision regressions observed by consumers0 (monotonic per item)consumer logs of product-discovery

Open Questions​

None remain from the model-fix. The eight earlier gaps are resolved in the model: POST /category-tree-publications triggers PublishCategoryTree; a DRAFT is editable (ReviseDraft) and discardable (DiscardDraft); re-publication is PUBLISHED → PUBLISHED via PublishContent; there is no remove-category command by design (ErrCategoryInUse guards a future removal); the collection limits are ErrTooManyBullets, ErrTooManyAttributes and ErrTooManyMedia; RetireOnDiscontinue also retires DRAFTs and a discontinued item can never publish (ErrItemDiscontinued); and the tree has no draft state.