docs
  1. SCAYLE Resource Center
  2. Developer Guides
  3. Transactions & Orders
  4. Order Hierarchy & States

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.

StatusDescriptionSCAYLE Panel Label
order_created, order_openAs 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_pendedAs 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_confirmedAs soon as the Payment Service Provider validation is successful the state changes to order_confirmed.Payment Reserved
order_delegatedThe status transitions to order_delegated when the order is delegated to the merchants associated with the order items.Payment Reserved
order_shippedThe status transitions to order_shipped when the shipping process started and the merchants send a shipping notification.Shipped
order_invoicedAs 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_abortedWhen 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_cancelledThe order is fully cancelled.Payment Cancelled
order_importedThe order is imported. This status generally applies to orders migrated from previous systems.-
order_invoice_errorThere was an error generating the invoice.-

Shipping Status

StatusDescriptionSCAYLE Panel Label
shipping_openWhen a customer enters checkout, through payment reservation, until delegation.New
shipping_orderedWhen the order is delegated to the merchants associated with the items of the order.Ordered
shipping_deliveredWhen the shipping process starts and the merchants send a shipping notification.Shipped
shipping_cancelledThe order is fully cancelled.Cancelled
shipping_undeliverableInformation from the merchant indicates the items are not deliverable.Not deliverable
shipping_partially_deliveredFor orders with multiple items, information from the merchant indicates at least one item is not deliverable.Partially undelivered

Billing Status

StatusDescriptionSCAYLE Panel Label
billing_openAs 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_pendingAs soon as the customer places an order by clicking on the “Confirmed” button.Open
billing_payment_pendingWhen the customer confirms they want to order and they are redirected to the payment provider.Payment Pending
billing_completedAs soon as the Invoice.pdf is created. This triggers the sending of the order confirmation email.Completed
billing_payment_abortedCustomer aborts the payment process between billing_open and billing_payment_pending.-
billing_payment_cancelledThe order is cancelled due to no deliverable items or customer explicitly cancels the order.Payment Cancelled
billing_refundedThe 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.

StatusDescriptionCorresponding Order State
availableItem is available.Shipping
unavailableItem is not available.Shipping
deliverableInformation from the merchant indicates item is deliverable.Delegated
undeliverableInformation from the merchant indicates item is not deliverable.Delegated
cancelledItem cancelled.Shipping
returnedItem cancelled.Invoiced

Dependencies

The following table outlines which statuses can occur together.

Order StatusShipping StatusBilling StatusSCAYLE Panel Shipping StatusSCAYLE Panel Billing Status
order_createdshipping_openOpenNewOpen
order_pendedshipping_openbilling_pendingNewPayment Pending
order_confirmedshipping_openbilling_pending, billing_payment_pending, external_payment_pending or billing_completedNewPayment Pending
order_delegatedshipping_orderedbilling_pending, billing_payment_pending, external_payment_pending or billing_completedNewPayment Pending
order_shippedshipping_deliveredbilling_pending, billing_payment_pending, external_payment_pending or billing_completedShippedPayment Pending
order_invoicedshipping_deliveredbilling_payment_pending , external_payment_pending or billing_completedShippedPayment Pending, Completed
order_aborted---Payment Cancelled
order_cancelledshipping_cancelled, shipping_undeliverable or shipping_not_deliverablebilling_payment_aborted, billing_payment_cancelled, billing_refunded or billing_deniedCancelled, Not DeliverablePayment Cancelled, Refunded
order_invoicedshipping_partially_deliveredbilling_payment_pending, external_payment_pending or billing_completed Partially UndeliveredPayment 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 nametyperequireddescription
statusstringtruePhases of order, e.g., cancelled, delivered.
read-only
detailedStatusOrderDetailedStatustrueDetailed 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;