Understand order states
This section lists the possible states of an order and of order subobjects.
This section applies to Open Storefront Framework (OSF) and Storefront Classic.
The following table describes the possible states of an order:
State Name | Description |
---|---|
AGENT_REJECTED | When using order approvals, this indicates that the order has been rejected by the agent. |
APPROVED | When using order approvals, this indicates that the order has been approved by the agent. |
APPROVED_TEMPLATE | When using order approvals, this indicates that the scheduled order has been approved by the agent. |
BEING_AMENDED | When using order approvals, this indicates that the order is being amended. |
FAILED | The order failed. |
FAILED_APPROVAL | When using order approvals, this indicates that the order has failed to get approval. |
FAILED_APPROVAL_TEMPLATE | When using order approvals, this indicates that the scheduled order has failed to get approval. |
INCOMPLETE | The order is still in the purchase process. |
NO_PENDING_ACTION | The order has been fulfilled, and processing of the order is complete. All shipping groups in the order are in a NO_PENDING_ACTION or REMOVED state, and order payment has been settled. |
PENDING_AGENT_APPROVAL | When using order approvals, this indicates that the order is still awaiting review by the agent. |
PENDING_APPROVAL | When using order approvals, this indicates that the order is still pending approval. |
PENDING_APPROVAL_TEMPLATE | When using order approvals, this indicates that the scheduled order is still pending approval. |
PENDING_CUSTOMER_ACTION | Processing of the order requires the customer’s attention for some reason, such as an incorrect customer address. |
PENDING_CUSTOMER_RETURN | Processing of the order requires the customer return submission. |
PENDING_MERCHANT_ACTION | Processing of the order requires merchant attention for some reason, such as the failure of a payment group in the order. |
PENDING_PAYMENT | When using account-based commerce, this indicates that the order is awaiting payment information. |
PENDING_PAYMENT_TEMPLATE | When using order approvals, this indicates that the scheduled order is awaiting payment information. |
PENDING_QUOTE | When using account-based commerce, this indicates that the quote for the order is still pending. |
PENDING_REMOVE | A request was made to remove the order. The order is placed in this state until all shipping groups in the order are set to a PENDING_REMOVE state. |
PROCESSING | The order is being processed by the order management system. |
REMOVED | The order has been removed successfully. |
SUBMITTED | The order has completed the purchase process and has been submitted to the order management system. |
QUOTED | When using account-based commerce, this indicates that the order has been quoted. |
QUOTE_REQUEST_FAILED | When using account-based commerce, this indicates that the quote for the order has failed. |
REJECTED | When using account-based commerce, this indicates that the order has been rejected. |
REJECTED_QUOTE | When using account-based commerce, this indicates that the quote for the order has been rejected. |
In addition, the sections below describe the possible states of various order components:
paymentGroup
states
An order’s array of payment groups represent the payments that paid for the order. The following table describes the possible states of a payment group:
State Name | Description |
---|---|
AUTHORIZE_FAILED | Authorization of the payment group has failed. |
AUTHORIZED | The payment group has been authorized and can be debited. |
CREDIT_FAILED | Credit of the payment group has failed. |
INITIAL | The payment group has not been acted on yet. |
REMOVED | The payment group has been removed. |
SETTLE_FAILED | Debit of the payment group has failed. |
SETTLED | The payment group has been debited successfully. |
shippingGroup
states
A shipping group represents a shipment and includes commerceItemRelationships
that represent which commerce items in what quantities are included in the shipment. The following table describes the possible states of shipping group:
State Name | Description |
---|---|
INITIAL | The shipping group is in a pre-fulfillment state. |
PROCESSING | The shipping group has started the fulfillment process. |
PENDING_REMOVE | A request for the removal of the entire order was made, and the removal of this shipping group is possible. |
REMOVED | The shipping group has been removed. |
FAILED | The shipping group has failed to process. |
PENDING_SHIPMENT | The shipping group is ready to be shipped. |
NO_PENDING_ACTION | The shipment of all the items in the shipping group is complete. |
PENDING_MERCHANT_ACTION | An error occurred while trying to process the shipping group; the error requires the merchant’s attention. |
commerceItem
states
Commerce items (sometimes referred to as line items) represent the SKUs included in an order. The following table describes the possible states of a commerceItem
. These states are read-only and are calculated from the shipping group’s commerceItemRelationship
.
State Name | Description |
---|---|
BACK_ORDERED | The item is not available in the inventory; it has been backordered. |
DISCONTINUED | The item is not available in the inventory; it cannot be backordered. |
FAILED | The item has failed. |
INITIAL | The item is in an initial state, that is, it is not yet associated with any shipping group. |
ITEM_NOT_FOUND | The item could not be found in the inventory. |
OUT_OF_STOCK | The item is not available in the inventory, and it has not been backordered. |
PENDING_REMOVE | The item will be removed pending verification that all item relationships referring to it can be removed. |
PRE_ORDERED | The item is not available in the inventory; it has been preordered. |
REMOVED | The item has been removed from the order. |
SUBITEM_PENDING_DELIVERY | The item is available in the inventory, and it is being prepared for shipment to the customer. |