Skip to main content

iCommerce Order Lifecycle

This guide walks through a typical order lifecycle in the embedded iCommerce engine.

1) Create an Order

Orders can be created through the SDKs or the CLI. Start with a minimal order payload, then enrich with payment, shipping, and customer details.

2) Validate and Authorize Payment

Validate totals, taxes, and discounts before authorizing payment. For agent workflows, ensure the action is explicit and auditable.

3) Reserve Inventory

Inventory is reserved against the order to prevent oversells. Reservations can be updated if the order changes.

4) Fulfill and Ship

When fulfillment begins, create a shipment record and update the order status. Tracking details flow back to the customer.

5) Post-Purchase Actions

Handle returns, exchanges, and refunds with deterministic actions tied to the original order and inventory adjustments.