Order¶
aggregate-root order
Confirmed commercial commitment created from checkout or assisted selling.
Business Purpose: Coordinate order validation, confirmation, orchestration, fulfillment, payment capture, returns, and exchanges.
Identity¶
| Type | Field | Description |
|---|---|---|
global |
order-id |
Order ID uniquely identifies the order across its lifecycle. |
Attributes¶
| Attribute | Description |
|---|---|
order-id Order ID |
Stable order identifier. |
customer-id Customer ID |
Customer associated with the order. |
status Status |
Current order state. |
order-date Order Date |
Date and time when the order was created. |
total-amount Total Amount |
Current order total. |
Lifecycle¶
created → validated → confirmed → modified → cancelled → closed
Invariants¶
stable-order-id— Order ID must remain stable for the lifetime of the order.order-lines-belong-to-order— Order Line entries must belong to exactly one Order aggregate.confirmed-order-has-commercial-commitment— A confirmed Order represents a commercial commitment.
Relationships¶
| Type | Target |
|---|---|
belongs-to |
customer customer |
contains |
order-line order-line |
creates |
fulfillment-order fulfillment-order |
contains |
payment payment |
contains |
invoice invoice |
contains |
receipt receipt |
results-in |
return return |
results-in |
exchange exchange |
Events¶
| Event | Classification | Terminal |
|---|---|---|
OrderCreated |
created | — |
OrderValidated |
transitioned | — |
OrderConfirmed |
transitioned | — |
OrderModified |
updated | — |
OrderCancelled |
transitioned | ✓ |
OrderClosed |
transitioned | ✓ |
OrderSplit |
transitioned | — |
OrderRouted |
transitioned | — |
FulfillmentLocationReassigned |
transitioned | — |
Used by Capabilities¶
- order-management Order Management
- order-orchestration Order Orchestration
Used by Processes¶
- Checkout
- BOPIS
- BORIS
- Ship From Store
- Ship To Store
- Endless Aisle
- Clienteling Sale
- Return Anywhere
- Exchange Anywhere
Used by Applications¶
- OMS
oms - eCommerce Platform
ecommerce-platform
Semantic Constraints¶
| Constraint | Type | Rule |
|---|---|---|
order-must-have-lines |
association |
An Order must contain at least one Order Line. An empty order has no c… |
order-belongs-to-customer |
association |
An Order must be associated with exactly one Customer. Anonymous order… |
fulfillment-order-belongs-to-order |
association |
A Fulfillment Order must be derived from exactly one Order. Fulfillmen… |
payment-belongs-to-order |
association |
A Payment must be associated with exactly one Order. Payment without a… |
invoice-belongs-to-order |
association |
An Invoice must be associated with exactly one Order. |
return-belongs-to-order |
association |
A Return must reference the original Order it relates to. |
exchange-belongs-to-order |
association |
An Exchange must reference the original Order it is replacing. |
order-owned-by-oms |
ownership |
The Order lifecycle is exclusively owned by the OMS. No other applicat… |
order-in-order-domain |
domain-containment |
The Order Business Object is owned by the Order domain. |
order-cannot-dispatch-without-confirmation |
lifecycle-gate |
An order must pass through confirmed state before entering fulfilment.… |
order-cannot-cancel-when-completed |
lifecycle-gate |
A completed order cannot be cancelled. Post-completion reversals must … |
order-return-only-from-completed |
lifecycle-gate |
Returns can only be initiated after an order is completed. In-flight o… |
Note
Aligned with existing order object and process references.
Referenced by APIs¶
| Endpoint | Method | Role | Capability |
|---|---|---|---|
/orders |
POST | response |
order-management |
/orders/{id} |
GET | response |
order-management |
/orders/{id}/cancel |
POST | response |
order-management |
/orders/{id}/confirm |
POST | response |
order-management |
/payments/authorizations |
POST | request-body |
payment-processing |
/loyalty/accounts/{id}/points |
POST | request-body |
loyalty |
/returns |
POST | request-body |
returns-management |
/transactions |
POST | response |
checkout |
/transactions/{id}/void |
POST | response |
checkout |
/baskets/{id}/checkout |
POST | response |
checkout |
/members/{id}/earn |
POST | request-body |
loyalty |