Order Hierarchy & States
General
Orders have different statuses that depend on the shipping, billing, and item statuses. These statuses help you to track the order progress, inform customers, and troubleshoot.
Depending on the state in the order flow, the Admin API returns status information consisting of the following:
detailedStatus.order
(e.g,order_created
,order_pended
,order_confirmed
)detailedStatus.billing
(e.g.,shipping_open
,shipping_ordered
)detailedStatus.shipping
(e.g.,billing_open
,billing_completed
)items.status
for each item in the order (e.g.,available
,returned
)
The shipping, billing, and item statuses determine the overall status
.
Order status
Overall Order Status
The following order statuses can be triggered during the checkout process. Each order status corresponds to a status in the SCAYLE Panel.
Status | Description | SCAYLE Panel Label |
---|---|---|
order_created , order_open | As soon as the customer enters the checkout (i.e., when an order is created). Or when an order is reverted back from order_pended . | Open |
order_pended | As soon as the customer places an order by clicking on the “Confirmed” button. This triggers the validation process with the chosen Payment Service Provider (PSP). It is possible that the order never leaves the state order_pended (e.g., customer logs out before completing the process). | Payment Pending |
order_confirmed | As soon as the Payment Service Provider validation is successful the state changes to order_confirmed . | Payment Reserved |
order_delegated | The status transitions to order_delegated when the order is delegated to the merchants associated with the order items. | Payment Reserved |
order_shipped | The status transitions to order_shipped when the shipping process started and the merchants send a shipping notification. | Shipped |
order_invoiced | As soon as the Invoice.pdf is created. This triggers the sending of the order confirmation email. This is an optional step if the invoicing is done by SCAYLE. If invoicing is done in an ERP the order state does not change. | Completed |
order_aborted | When an order cancellation is sent a record to cancel the order is created. While the record has status pending, the cancellation is pending. | Payment Cancelled |
order_cancelled | The order is fully cancelled. | Payment Cancelled |
order_imported | The order is imported. This status generally applies to orders migrated from previous systems. | - |
order_invoice_error | There was an error generating the invoice. | - |
Shipping Status
Status | Description | SCAYLE Panel Label |
---|---|---|
shipping_open | When a customer enters checkout, through payment reservation, until delegation. | New |
shipping_ordered | When the order is delegated to the merchants associated with the items of the order. | Ordered |
shipping_delivered | When the shipping process starts and the merchants send a shipping notification. | Shipped |
shipping_cancelled | The order is fully cancelled. | Cancelled |
shipping_undeliverable | Information from the merchant indicates the items are not deliverable. | Not deliverable |
shipping_partially_delivered | For orders with multiple items, information from the merchant indicates at least one item is not deliverable. | Partially undelivered |
Billing Status
Status | Description | SCAYLE Panel Label |
---|---|---|
billing_open | As soon as the customer enters the checkout (i.e., when an order is created). Or when an order is reverted back from payment_pending. | Open |
billing_pending | As soon as the customer places an order by clicking on the “Confirmed” button. | Open |
billing_payment_pending | When the customer confirms they want to order and they are redirected to the payment provider. | Payment Pending |
billing_completed | As soon as the Invoice.pdf is created. This triggers the sending of the order confirmation email. | Completed |
billing_payment_aborted | Customer aborts the payment process between billing_open and billing_payment_pending . | - |
billing_payment_cancelled | The order is cancelled due to no deliverable items or customer explicitly cancels the order. | Payment Cancelled |
billing_refunded | The order is refunded. | Refunded |
billing_denied | - | - |
Item Status
The following statuses are possible at the item-level. To understand how status changes at the item level affect the shipping and billing status, see the Order Flow table below.
Status | Description | Corresponding Order State |
---|---|---|
available | Item is available. | Shipping |
unavailable | Item is not available. | Shipping |
deliverable | Information from the merchant indicates item is deliverable. | Delegated |
undeliverable | Information from the merchant indicates item is not deliverable. | Delegated |
cancelled | Item cancelled. | Shipping |
returned | Item cancelled. | Invoiced |
Dependencies
The following table outlines which statuses can occur together.
Order Status | Shipping Status | Billing Status | SCAYLE Panel Shipping Status | SCAYLE Panel Billing Status |
---|---|---|---|---|
order_created | shipping_open | Open | New | Open |
order_pended | shipping_open | billing_pending | New | Payment Pending |
order_confirmed | shipping_open | billing_pending , billing_payment_pending , external_payment_pending or billing_completed | New | Payment Pending |
order_delegated | shipping_ordered | billing_pending , billing_payment_pending , external_payment_pending or billing_completed | New | Payment Pending |
order_shipped | shipping_delivered | billing_pending , billing_payment_pending , external_payment_pending or billing_completed | Shipped | Payment Pending |
order_invoiced | shipping_delivered | billing_payment_pending , external_payment_pending or billing_completed | Shipped | Payment Pending, Completed |
order_aborted | - | - | - | Payment Cancelled |
order_cancelled | shipping_cancelled , shipping_undeliverable or shipping_not_deliverable | billing_payment_aborted , billing_payment_cancelled , billing_refunded or billing_denied | Cancelled, Not Deliverable | Payment Cancelled, Refunded |
order_invoiced | shipping_partially_delivered | billing_payment_pending , external_payment_pending or billing_completed Partially Undelivered | Payment Pending, Completed |
Admin API
Get an order status
This endpoint is not bound to a specific shop country; however, it still requires the shop country details, identified by the shopKey
and countryCode
, without filtering by the shop country.
SCAYLE allows you to retrieve an order status by order reference key or ID.
This method can be used to get a specific order status by its identifier.
Method Signature
let response = await adminApi.apis.Orders.getOrderStatus({shopKey: shopKey, countryCode: countryCode, orderIdentifier: orderIdentifier});
let orderStatus = response.body;
Parameters
param name | type | required | description |
---|---|---|---|
status | string | true | Phases of order, e.g., cancelled, delivered. read-only |
detailedStatus | OrderDetailedStatus | true | Detailed status of the order |
Get an Order Status example
let response = await adminAPi.apis.Orders.getOrderStatus({shopKey: 'ms', countryCode: 'DE', orderIdentifier: "key=my-key"});
let orderStatus = response.body;