Skip to main content

Order lifecycle BPM

The lifecycle of an order is at the core of every feature offered by NewStore. The lifecycle is represented by the diagram below using the

BPMN notation and relies on other concepts such as *order routing* or *order fulfillment*. These concepts are described in the Business process section.

This diagram refers to events that are emitted part of the event stream. See the entity model and the webhook.

Click here to download the BPMN image


For a representation of the lifecycle of an order when an external order management system (OMS) is managing orders in your business, see the BPM diagrams in the external OMS integration guide .

Order creation

An order can originate from 2 sources:

  • NewStore Associate App
  • e-commerce platform

In the case of a credit card payment, the amount is authorized on the customer's card.


When an order is placed via NewStore Associate App, NewStore manages the payment. See payment .

Regardless of the origin, an order entity is created inside NewStore and the order.created event is emitted. The grace period begins.

Once the grace period ends, the order.opened event is emitted.

Order routing and fulfillment

The order cannot be modified anymore and it is processed for routing. Routing consists in forwarding the order to a fulfillment location (a DC or store) via a fulfillment request. For more information, see About order routing .

When this happens, the fulfillment_request.assigned is emitted and the order moves to the fulfillment phase which can succeed or

fail .

Fulfillment (success)

Once a fulfillment location receives a fulfillment request that it can process and completes the fulfillment, the fulfillment_request.items_completed event is emitted. An order can be fulfilled by several fulfillment locations when no location has all the items in stock, therefore this event can be emitted several times for one order.

The invoice.created event is emitted when:

  • During store fulfillment , items have been packed, and relevant documents and labels to be sent with the shipment are ready for printing.
  • During DC fulfillment , when NewStore receives confirmation from the DC that the items have been shipped.

Once all the items have been fulfilled, the order.completed event is emitted.

The payment capture phase starts.

Fulfillment (failure)

Routing can fail if no fulfillment location is able to process the whole order or one of the order items. In this case, the order.items_cancelled event is emitted for each item that cannot be fulfilled. An associate can fix the issue in different ways using NewStore Omnichannel Manager:

  • If the associate chose to cancel the order, the order.cancelled event is emitted. The payment refund/revoke phase starts.
  • If the associate chose to swap items to replace the unavailable items, the order.items_swapped event is emitted and the order is processed for fulfillment again.

Payment workflow completion

Once the order has been fulfilled or canceled, the payment workflow can be completed. For more information on the payment lifecycle at NewStore, see Payment lifecycle BPM .

Capturing the amount

In the case one of the order items was fulfilled, a payment capture for the amount of the item is performed. When this happens, the payment_account.amount_captured is emitted. To learn more about payment integration, see Integrating a payment service provider .

Refunding the amount

In the case one of the order items was canceled, or if the whole order was canceled, the payment_account.amount_refunded event is emitted.

Order return workflow

For more information on how the NewStore platform processes items from an order returned by a customer, see Return lifecycle BPM .

Related topics