Cert++
Close

Order status lifecycle and order handling in Business Manager

Key Takeaway

An order starts as CREATED and then is either placed (NEW) or FAILED. Cancelling works only on OPEN, NEW or COMPLETED orders. Undoing a failed order returns it to CREATED, not NEW.

Every B2C Commerce order has an order status that moves through a fixed lifecycle. An order is CREATED from a basket and is then placed (NEW or OPEN) or FAILED. A placed order can later be CANCELLED. Developers drive these moves with OrderMgr methods. Merchants use Business Manager and the site's Order preferences to cancel, export, delete and automatically clean up orders.

The statuses an order tracks

An order tracks several separate statuses. Each status has its own constants on dw.order.Order:

  • Order status (status)
  • Export status (exportStatus)
  • Payment status (paymentStatus)
  • Shipping status (shippingStatus)
  • Confirmation status (confirmationStatus)

The order status is the one that moves through the lifecycle. Its constants are:

ConstantValueMeaning
ORDER_STATUS_CREATED0Created from a basket and not yet placed
ORDER_STATUS_NEW3Placed
ORDER_STATUS_OPEN4Same meaning as NEW
ORDER_STATUS_COMPLETED5No meaning by default, but custom implementations can use it. A synonym for NEW and OPEN.
ORDER_STATUS_CANCELLED6Cancelled after being placed
ORDER_STATUS_REPLACED7Related to BasketMgr.createBasketFromOrder(), which supports editing an order and replacing it
ORDER_STATUS_FAILED8Not placed because the order was not valid

In a replacement chain where Order1 is replaced by Order2, Order1 is the original order and Order2 is the current order.

Every status change is recorded in the anonymous Order Journal. The Order Journal is the base for GMV calculations.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a configuration for tasks, such as payment and shipping information, use Business Manager to enable shoppers to complete storefront orders

0/8

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers.