Order Lifecycle
Order Lifecycle is the domain that turns a draft cart into a confirmed commercial order, keeps that order reviewable and adjustable, and supports post-purchase recovery through returns, refunds, and tracking.
This first pass treats the domain as five connected layers:
- cart-state behavior before confirmation
- core order authoring and review
- line-level commercial adjustments and recovery
- return processing
- post-purchase visibility and tracking
Status
- [x] Domain overview written
- [x] Subdomains reviewed
- [x] Technical node pages linked
- [x] End-user concept pages linked
- [x] Task guides linked
Responsibility
This domain is responsible for:
- representing both carts and confirmed orders on the same
Orderaggregate - storing order items, addresses, references, totals, and customer ownership
- validating checkout readiness and cart notifications before confirmation
- supporting admin review, calculation, confirmation, cancellation, duplication, and refund flows
- recording operational returns, return items, fees, shipping lines, and completion state
- exposing order history and tracking state to shoppers after purchase
Subdomains
Cart State And Checkout ReadinessOrderwithcart = truecart_token- cart notifications
- checkout readiness
Order Authoring And ReviewOrderOrderItem- order comments
- order actions
Commercial Adjustments And RecoveryOrderRiskOrderDiscountLineOrderItemDiscountLineOrderRefund- folded tax and shipping review details on
Order
Return ProcessingOrderReturnOrderReturnItemOrderReturnFeeLineOrderReturnShippingLine
Post-Purchase Visibility And Tracking- order history
- order detail
- tracking timeline
- fulfillments as downstream shipped outputs
Classification Decisions
Standalone technical pages
Standalone end-user pages
Standalone task guides
Folded into parent pages for now
OrderShippingLine- owned primarily by Fulfillment & Shipping and folded here only as part of order review because it is the priced result of shipment selection rather than a primary authoring surface
OrderDiscountLine- folded into
Orderbecause operators experience it mainly through financial details and calculation
- folded into
OrderItemDiscountLine- folded into
Order ItemandOrderbecause it is a line-level money-adjustment record, not a first-pass authoring surface
- folded into
OrderTaxLine- folded into
Orderbecause it is part of the total-calculation surface rather than a first-pass workflow owner
- folded into
OrderRefund- folded into
Order ReturnandOrderbecause refunds are downstream financial outcomes rather than the main review surface
- folded into
OrderRisk- folded into
Orderbecause it is a thin nested record with no packaged standalone review page in the shared admin UI
- folded into
OrderReturnItem- folded into
Order Return
- folded into
OrderReturnFeeLine- folded into
Order Return
- folded into
OrderReturnShippingLine- folded into
Order Return
- folded into
Explicitly not getting standalone end-user concept pages in this pass
Cart
Cart behavior is documented through the technical Cart page and adjacent storefront workflows. Risk remains an internal review concept documented inside the technical Order page rather than as a customer-usable feature.
Evidence Highlights
Framework ownership
packages/framework/src/Models/Order.phppackages/framework/src/Models/OrderItem.phppackages/framework/src/Models/OrderReturn.phppackages/framework/src/Models/OrderRisk.php
Admin and operations surfaces
packages/admin/routes/web.phppackages/admin/src/Livewire/Admin/Orderspackages/admin/src/Livewire/Admin/Orderpackages/framework/src/Http/Controllers/Api/Admin/OrdersController.phppackages/framework/src/Http/Controllers/Api/Admin/OrderReturnsController.phppackages/framework/src/Http/Controllers/Api/Admin/OrderRisksController.php
Storefront and shopper-visible surfaces
packages/storefront/routes/web.phppackages/storefront/src/Livewire/Storefront/Cartpackages/storefront/src/Livewire/Storefront/MyAccount/Orderspackages/storefront/src/Livewire/Storefront/MyAccount/Orderpackages/framework/src/Http/Controllers/Api/Storefront/CartsController.phppackages/framework/src/Http/Controllers/Api/Storefront/OrdersController.phppackages/framework/src/Http/Controllers/Api/Storefront/TrackingController.php
Core behavior and automation
packages/framework/src/Actions/Order/CreateOrder.phppackages/framework/src/Actions/Order/UpdateOrder.phppackages/framework/src/Actions/Order/MarkAsConfirmed.phppackages/framework/src/Actions/Order/CancelOrder.phppackages/framework/src/Actions/Cart/ValidateCart.phppackages/framework/src/Actions/OrderReturn/CreateOrderReturn.phppackages/framework/src/Actions/OrderReturn/ConfirmOrderReturnItems.phppackages/framework/src/Actions/OrderReturn/ApproveOrderReturnItems.phppackages/framework/src/Actions/OrderReturn/CompleteOrderReturn.phppackages/framework/src/Actions/Order/TrackOrder.php
Navigation Notes
Cartis not a separate model in this repo. It is anOrderrecord in cart state withcart = trueand acart_token.Orderis the commercial aggregate.OrderItemis the line-level commercial and fulfillment unit inside it.OrderRiskis not the same thing as a cart validation notification. Risks are stored records folded intoOrderreview; notifications are transient checkout blockers or warnings.OrderReturnis an operational return workflow and refund precursor, not a shopper-facing returns portal page in the shared package.Trackingis built from fulfillment-request progression and shipped fulfillments, not from the order record alone.