Cart & Order flows

A Cart/Order flow is a set of states through which a cart or an order progresses – e.g. New, Paid, Goods dispatched, and Completed – before it is converted to an order or marked as complete.

Cart and order flows are therefore used to keep track of and control how a cart or an order should be processed:

  • Cart flows are typically used on solutions where multiple carts are being created over an extended period, and where multiple parties have a say on when the cart should be checked out. This could be a B2B setup where e.g. apparel stores spent a few days adding spring collection items to a cart before finalizing their order.
  • Order flows are used on most B2C solutions to control the order processing procedure – e.g. the timespan between an order being placed and it being delivered to the customer. This typically involves steps such as Order received, order collected, tracking generated, order shipped, and perhaps completed.

Of course, each flow can (and should) be tailored to the solution in question – and in some cases a solution will use both cart flows and order flows at the same time to control the procedure both before and after an order is placed.

To create an order or cart flow:

  • Go to Settings > Ecommerce > Orders > Order flows/Cart flows as appropriate
  • Click New order flow/New cart flow in the toolbar
  • Provide a name and optionally a description
  • If this should be the default flow check the Default checkbox
  • Save

This creates a new – but empty – order or cart flow. Next you must add states to it – the individual steps in the flow. 

Click New state in the toolbar to open the edit view (Figure 2.1).

Figure 2.1 Creating a new order state

From here, you must:

  • Name the state, and optionally provide a description for it.
  • Check the default checkbox, if you want new carts/orders to be created with this state set.
  • Decide if you want to include or exclude the state from the Ecommerce statistics.

In the Notification area you can set up automatically sending an email to your customer (or others) when a cart or order enters this state. 

To set up email notifications:

  • Specify a subject, a sender name and sender email. Use {OrderID} in the subject to include the order ID.
  • Check the send to customer checkbox to send the email notification to the customer who created the cart or placed the order (provided you have an email address to send to) – or add other emails to the send to others area manually.
  • Select (or create/modify) an email template to use for your notification emails – you can use different templates for customers and other recipients.

Once you are happy with your settings, save the state – and repeat as necessary until the cart or order flow contains all the states you need.

database

These are the database tables relevant for order flows & order states:

EcomOrderFlow

Contains order flow setup from Settings -> Ecom -> Orders -> Order flows.

Field name Data type Length
OrderFlowId int 4
OrderFlowIsDefault bit 1
OrderFlowName nvarchar 255
OrderFlowDescription nvarchar Max
OrderFlowOrderType int 4

EcomOrderStates

Contains definitions of individual order states in an order flow (OrderFlowId).

Field name Data type Length
OrderStateId nvarchar 50
OrderStateName nvarchar 255
OrderStateDescription nvarchar Max
OrderStateIsDefault bit 1
OrderStateDontUseInstatistics bit 1
OrderStateIsDeleted bit 1
OrderStateMailTemplate nvarchar 255
OrderFlowId int 4
OrderStateMailSender nvarchar 255
OrderStateMailSenderName nvarchar 255
OrderStateMailSubject nvarchar 255
OrderStateAutoId int 4
OrderStateSendToCustomer bit 1
OrderStateOthersMailTemplate nvarchar 255
OrderStateOthersRecipients nvarchar Max
OrderStateSortOrder int 4
OrderStateOrderType int 4
OrderStateAllowOrder bit 1
OrderStateAllowEdit bit 1

EcomOrderStateRules

Defines flow between order states (OrderStateRuleFromState -> OrderStateRuleToState).

Field name Data type Length
OrderStateRuleId int 4
OrderStateRuleFromState nvarchar 50
OrderStateRuleToState nvarchar 50