Skip to main content

Offer & Availability

As built

Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.

Supporting

Offer & Availability (offer-availability, code OA, tier commerce) knows what the network can sell and from which node. It owns the network's own item master (CatalogItem), one Listing per (catalogue item, node), and the quantity each node currently claims it can ship for that listing, together with the basis the vendor gave for that number: PHYSICAL, THROUGHPUT_CONSTRAINED or UNKNOWN. Vendors send that number as inventory feeds, full or partial; a feed arrives through vendor-connectivity's in-organization call POST /inventory-feeds and is applied here atomically (InventoryFeed). A listing is sellable only while its node is ACTIVE in node-topology. The context publishes seven CloudEvents types on retailnetwork.offer-availability.events; delivery-promise and order-sourcing build their availability read models from them.

This context's pages​

PageWhat it coversddd-crew tool it follows
Business ContextThe business problem, actors, decisions, and what is out of scope— (plain-language context)
Ubiquitous LanguageCatalog Item, Listing, Available Quantity, Availability Basis, Inventory Feed, Full Feed, plus neighbour termsBounded Context Canvas (Ubiquitous Language section)
Core Domain ChartWhy this context is SupportingCore Domain Charts
Bounded Context CanvasPurpose, classification, roles, inbound and outbound messages, decisions, open questionsBounded Context Canvas v5
Context MapEvery upstream and downstream neighbour with pattern and channelContext Mapping
Aggregate Design CanvasCatalogItem, Listing, InventoryFeed: states, invariants, commands, eventsAggregate Design Canvas v1.1
Domain EventsThe seven published and four consumed events, with full CloudEvents typesDomain Message Flow Modelling (message catalogue)
Domain Message FlowFeed applied, feed failed, node suspended, catalogue set-upDomain Message Flow Modelling
EventStormingProcess-level boards and the hotspots the model leaves openEventStorming Glossary & Cheat Sheet
Use CasesOne section per command: trigger, adapter, flow, errors, events, idempotency— (application-service catalogue)
Class DiagramProposed domain types and the hexagonal ports and adapters— (UML)
Entity RelationshipProposed Postgres schema— (UML / ER)
Sequence DiagramsAdapter to use case to aggregate to outbox, per command— (UML)

Service and operations​

  • Service: IQVO/offer-availability on develop (6355d98, 2026-10-26): binaries cmd/api (REST) and cmd/mcp (read-only MCP), and the console remote in web/.
  • Deployment: wired in warehouse-infra develop: a terraform/apps.yaml entry (database: true, frontend_remote: offer_availability_mfe) and helm-values/offer-availability.yaml (MCP enabled, gateway path /api/mcp/offer-availability). The cluster itself was not checked in this refresh.
  • Observability: service ADR 0009, Adopt the fleet observability standard, Accepted 2026-10-26. Logs, metrics and traces leave over OTLP to the otel-collector (OTEL_EXPORTER_OTLP_ENDPOINT, chart default otel-collector.observability.svc.cluster.local:4317; OTEL_SERVICE_NAME). The Tier-2 business counter is availability.inventory_feeds.applied (unit {feed}, in internal/adapters/outbound/telemetry/feed_metrics.go), with attribute outcome = applied, superseded, failed or rejected and reason on the outcomes that are not a success. The dashboard queries it as availability_inventory_feeds_applied_total in warehouse-infra's terraform/dashboards/contexts/offer-availability.json, by outcome.

Elsewhere​

  • Read-only MCP server (service ADR 0007): cmd/mcp, a second binary serving Streamable HTTP on :8090 with no auth; it sources this context's own reads and nothing that writes. Four tools: browse_catalog, get_catalog_item, get_inventory_feed, list_listings. The gateway (Kong) exposes it at /api/mcp/offer-availability, rewritten to the server's /mcp mount.
  • Console remote (service ADR 0008): web/, a Vite + React Module Federation remote — federation container offer_availability_mfe, gateway mount /mfes/offer-availability/, dev/preview port 4018 — read-only screens over the existing REST reads, calling only this context's API.
  • REST contract (as built, from the service repository): apis/offer-availability/openapi.yaml, rendered under the API reference.
  • The domain-wide Context Map and Subdomain Classification.
  • ADR 0003: declared and measured capability: the declared availability basis this context keeps is one half of it.
  • ADR 0007: CloudEvents namespace and the event standard.