Skip to main content

Ubiquitous Language

These are the terms this bounded context uses, with the definitions it uses them with. Every term maps to a Go identifier on develop. They are not interchangeable with the same English words used in inventory-storage, wes-work-planning or fulfillment-execution — see the last table.

Core terms​

TermDefinitionCode
OrderThe aggregate root: one customer's demand, its lines, its delivery promise and its hold/deadline intent.order.Order
Order lineOne requested SKU and quantity within an order, with its resolved process path, gift-wrap flag, line status and (once allocated) reservation id.order.OrderLine
Order statusDerived on every read from line statuses, never stored: Received, Allocated, PartiallyAllocated, Backordered, Released, PartiallyReleased, Shipped, PartiallyShipped, Cancelled.order.Status, Order.Status()
Line statusPending, Allocated, Backordered, Released, Shipped, Cancelled.order.LineStatus
AllocationReserving stock for one line through inventory-storage's POST /reservations. No local Reservation model — only the id is kept.usecases.allocateLines
BackorderedA line inventory-storage answered 409 for (insufficient usable stock). A business fact, unlike a transport or 5xx error, which fails the pass instead (BR2, fail closed).order.LineStatusBackordered, ports.ErrInsufficientStock
Retry allocationThe only path from Backordered back to Allocated.usecases.RetryAllocation, Order.RetryAllocate
ReconfirmRe-reserving a line allocated in an earlier pass right before it is released, so a lapsed reservation is caught.Order.ReconfirmReservation, reconfirmAllocatedLines
Lost reservationA reconfirm that 409s: the line moves Allocated → Backordered.Order.LoseReservation
ReleaseMarking allocated lines Released (a pure domain transition) once BR3 allows, and announcing them on OrderAllocated/OrderPartiallyAllocated. Not a call to wes-work-planning (ADR 0005).Order.Release, releaseAllocatedLines
Ship-completeAn order with allowPartialShipment=false (the default): nothing is released while any line is unallocated (BR3).Order.EnsureReleasable, ErrShipCompleteBlocked
Partial shipmentallowPartialShipment=true: allocated lines release even if others are backordered, possibly in several shipment groups.Order.AllowPartialShipment()
Cancellation boundaryAn order can be cancelled until any line is released or shipped (BR6).Order.EnsureCancellable, ErrOrderAlreadyReleased
Held orderReceived with releaseOnAllocation=false: it allocates, then waits for POST /orders/{id}/releases or a cancel. Must be ship-complete. Not a status.Order.Hold, Order.ReleaseOnAllocation(), usecases.ReleaseHeldOrder
Required ship-byA caller's deadline; the promise may only use a CPT window at or before it.Order.SetRequiredShipBy, PromisePolicy.FeasibleBy

Promise terms​

TermDefinitionCode
CPT (critical pull time)A site's carrier cutoff: work must be done by then to leave on that departure.order.CPTWindow
PromiseThe CPT window (or lead-time date) an order, or a shipment group, is promised to leave by.order.Promise
Promise basisWhich policy produced a promise: Capability (catalogue cycle time, CPT schedule, path capacity), LeadTime (per-path fallback), or Network (a window chosen to meet requiredShipBy).order.PromiseBasis
Promise group / shipment groupThe lines that ship together under one promise; one per order when ship-complete, possibly several with partial shipment.order.PromiseGroup
Promise dateOn the order, the latest cutoff across its promise groups.Order.PromiseDate()
Re-promiseRecomputing a line's group promise after fulfillment-execution reports TaskCPTMissed or PackageManifested; raises OrderRepromised if it moved.usecases.RepromiseOrder
Fulfillment classDemand-shape classifier SINGLE, SAME_SKU_MULTI, MULTI_LINE_MULTI, derived from line count and quantity, never stored (ADR 0008).order.FulfillmentClass

Routing terms​

TermDefinitionCode
Process pathThe building workflow a line's work is dispatched to (pick, ...). Owned by process-path-management; cached here.shared.PathId, processpath.PathDefinition
Default pathpick, used when no catalogue is wired or nothing better is eligible.shared.DefaultPathId
EligibilityA path's admission rules: max units per line, required and excluded product attributes, non-sortable.shared.Eligibility
Path selectionChoosing, per line, among the active paths whose intake contains CUSTOMER_ORDER, the eligible one with the shortest known CycleTimeP95, ties to the lower PathId; pick when no path declares CUSTOMER_ORDER (ADR 0021, ADR 0042). Never caller-supplied.order.PathSelectionPolicy
Intake / demand sourceThe demand sources process-path-management allows to route work onto a path (CUSTOMER_ORDER, STOCK_TRANSFER, SLOT_RELOCATION, INVENTORY_CONTROL, its ADR 0034). Order lines are the CUSTOMER_ORDER source; a path with another or an empty intake is never an order entry point (ADR 0042).shared.DemandSource, shared.ActivePathCandidate.Intake
Product classificationA SKU's handling tags (Hazmat, Fragile, TemperatureSensitive, Oversized, HighValue), owned by product-master and read here from a local copy of its ProductClassified events (ADR 0036). Used only as a routing hint (fail-open: an unknown SKU has no tags).ports.ProductClassificationLookup, product_classification_copy
Work unit id{orderId}-line-{lineNo}, derived identically here and in wes-work-planning; never sent to wes-work-planning. It is stored on the release_confirmations row and carried by the analytics-only OrderLineReleased and OrderReleaseUnconfirmed facts.usecases.WorkUnitID, ParseWorkUnitID

Release confirmation terms (ADR 0043)​

Available, off by default (RELEASE_CONFIRMATION_MODE=off). These terms apply only while the loop is on. The state lives in a process manager, never on the Order aggregate.

TermDefinitionCode
Release confirmationKnowing that wes-work-planning admitted a released order line, learned from its WorkUnitCreated event (matched by its optional reference = the order id and line_no). Not a reply event and not a call.releaseconfirmation.Confirmation, usecases.ConfirmRelease, table release_confirmations
PendingA released line whose WorkUnitCreated has not been seen yet. Opened in the same unit of work as the release.releaseconfirmation.StatePending
ConfirmedThe line's WorkUnitCreated arrived. Idempotent: a second one changes nothing.releaseconfirmation.StateConfirmed
UnconfirmedA Pending line older than the confirmation timeout. Flagged exactly once, with the analytics-only fact OrderReleaseUnconfirmed. A signal, not proof: a late confirmation can still clear it.releaseconfirmation.StateUnconfirmed, usecases.FlagUnconfirmedReleases
Confirmation timeoutHow long a line may stay Pending (RELEASE_CONFIRMATION_TIMEOUT, default 15 minutes). An operational parameter, not a business rule: no promise, status or SLA depends on it.usecases.FlagUnconfirmedReleases.Timeout
Late confirmationA WorkUnitCreated for an Unconfirmed line: it becomes Confirmed and the problem is cleared (the fact already published is not retracted).releaseconfirmation.ConfirmedLate

Planned capacity terms (ADR 0031)​

TermDefinitionCode
Planned capacity windowA local copy of one warehouse-planning capacity plan: location, path, time window, demand, capacity, shortage, DRAFT/PUBLISHED.order.PlannedCapacityWindow
Capacity constraintA published shortage window the order's promise overlaps; shown on the order response, never changes the promise.order.CapacityConstraints, capacityConstraint

Infrastructure terms the domain relies on​

TermDefinitionCode
Idempotency keyRequired header on POST /orders with Postgres; replays return the stored response (ADR 0023).RequireIdempotencyKey, table idempotency_keys
OutboxEvents written in the same transaction as the order and relayed to Kafka (ADR 0022).postgres.OutboxPublisher, OutboxRelay
VersionOptimistic-concurrency counter on orders; a stale save is ErrConcurrentModification (ADR 0024).Order.Version()

Words that mean something different elsewhere​

WordHere (Order Management)Elsewhere
ReservationNot modelled — only a reservationId reference is heldinventory-storage: the aggregate itself, with ACTIVE/CONFIRMED/REVOKED/EXPIRED
ReleaseMarking allocated lines Released and announcing them on Kafkawes-work-planning: accepting and scheduling a WorkUnit
ConfirmedA release confirmation state: wes-work-planning's WorkUnitCreated was seen for the line (ADR 0043)inventory-storage: CONFIRMED is a Reservation status, unrelated to release
StatusOrder-level, always derived from line statusesinventory-storage's Reservation.Status is a different state machine on a different aggregate
CapacityPath capacity (PathCapacityChanged, remaining units per cutoff) feeds the promise; planned capacity (warehouse-planning) only annotateswarehouse-planning: the plan itself, with demand and bottleneck steps
Order referenceThis context's real OrderIddemandRef on inventory-storage's Reservation; order_ref on fulfillment-execution's tasks (a work-unit id, not a bare order id)

Do not share a DTO or type across those boundaries. Translate at the anti-corruption layer instead — see ADR 0002. The full state diagrams are on the Aggregate Design Canvas.