Implementing an automated order workflow

The Drupal Commerce shopping cart and checkout systems handle advancing an order from the Shopping cart status through the various Checkout: #### statuses and finally to the Pending order status. While the Order module defines additional order statuses for Canceled, Processing, and Completed orders, it does not implement any rules specifically to place orders into these statuses. The only way orders will get to these statuses out of the box is if an administrator were to move the order to that status from its edit form.

When you build your store, it is up to you to implement your automated order workflow beyond what the shopping cart and checkout systems provide. You can do this via direct module integration or Rules configurations that interact with various events, such as moving an order that has been paid in full to the Processing status for fulfillment or directly to Completed if fulfillment is automated (e.g. in the case of a digital commerce site).

The primary thing to keep in mind is that an order may complete the checkout process without having been paid in full. This means any automated workflow steps that result in the fulfillment of the order should use the When an order is first paid in full event or hook_commerce_payment_order_paid_in_full() instead of the checkout completion event / hook. This is primarily the case when a site integrates a payment gateway that supports delayed payment (e.g. PayPal eCheck payments) or performs authorization only transactions during checkout that are meant to be captured later.

You do not have to use all the order statuses provided by default, and you can create your own either through code or a contributed module like Commerce Customer Order Statues.

For more information, refer to the related checkout documentation.