Order Status Management in Magento 2

Managing order statuses in Magento can be smooth and easy without going into the application code as long as we understand how those statuses work.


First off, I’d like to point out that Magento has order statuses and order states; two concepts that are very similar to each other. The main difference between them is that order states are responsible for putting an order in the flow of the ordering process and are not visible to the user. This is in contrast to statuses, which users can see. Magento 2 (like Magento 1) has its own “flow” of order statuses, which is shown in the figure below. By default, Magento will not allow us to change order states or statuses manually. They are set automatically depending on the action we perform (as shown in the picture). This means that if we create an invoice for an order, its state and status will change automatically.

Figure 1. Order flow process.

Default order states in Magento include:

  • Pending Payment – assigned to an order for which the payment has been initiated but is awaiting confirmation
  • New – assigned to new orders that have not been paid for
  • Processing – assigned to orders for which an invoice or delivery has been created (but not both)
  • Complete – for orders with invoice and delivery
  • Closed – for orders that are “returned” and the user has received a refund
  • Canceled – assigned by the store administrator or payment gateway when the order has not been paid
  • On Hold – a state set manually by the store operator
  • Payment Review – for orders that await payment confirmation.

In turn, default order statuses include, for example:

  • Processing
  • Pending Payment
  • Suspected Fraud
  • Payment Review
  • Pending
  • On Hold
  • Complete
  • Closed or Canceled.

As you can see, some of the state names coincide with status names, usually specifying the same place in the flow of information about an order.

Each state can be assigned one or more order statuses. This makes order management easier and more flexible. For example, depending on the payment method chosen by the customer, the “Pending Payment” status may have the following order statuses assigned to it:

  • Pending Payment Card
  • Pending Payment PayPal
  • Pending Payment Store Credit

As system operators, without going into the application code, we have only a limited ability to manage order statuses. However, we can create new statuses and assign them to specific states. In this way, we can replace individual order statuses.

Changing the order to a custom status after creating Invoice and Shipping

To manage the order statuses, we need to log in to the administration panel, and then select stores and order status from the left-hand menu.

Figure 2. Creating a new order status

This is where we can manage order statuses.

Let’s add a new status (the “Create new status” button); the “status code” field means the status ID used by Magento (and the programmer) – it not visible to the customer; what the customer can see, is the “Status Label” field.

Figure 3. Our new order status

As we want to use only this order status for each completed order, first we detach the “Complete” status from the “Complete” state, which means that the order for which Invoice and Shipping were created.

Figure 4. Assigning a status to a state

The final step is to assign the newly created status to the state. Let’s remember to select “Use order status as default” and “Visible in the store”. With this configuration, Magento will automatically assign the “Customer Complete” status for each completed order.

Our Experts
/ Knowledge Shared

19.11.2024

PIM + AI = Success / Optimizing PIM Systems With Artificial Intelligence

Artificial Intelligence

In today’s rapidly changing business world, managing product information has become one of the key challenges, especially for companies operating across multiple markets. Although artificial intelligence is a hot topic, much of the available material focuses mainly on theory or the distant future. We’re taking it a step further – below, we present...

Ilustracja przedstawiająca robota reprezentującego sztuczną inteligencję, otoczonego symbolami wyzwań i błędów w sztucznej inteligencji. Obraz zawiera pomarańczowy mózg, zepsutą żarówkę i cyfrowe piksele, symbolizujące dane i zagrożenia etyczne związane z awariami sztucznej inteligencji
30.10.2024

The Complex World of AI Failures / When Artificial Intelligence Goes Terribly Wrong

Artificial Intelligence

AI has revolutionized industries, offering impressive capabilities in efficiency, speed, and innovation. However, as AI systems become more integrated into business operations, it becomes evident that these tools are not without flaws. From minor glitches to significant ethical issues, AI failures highlight the fragility of these systems. Businesses must...

AI w optymalizacji łańcucha dostaw materiałów budowlanych
28.10.2024

Application of Artificial Intelligence in Optimizing the Supply Chain of Building Materials

Artificial Intelligence

Can artificial intelligence revolutionize the management of building materials supply chains? Learn how AI can help optimize demand forecasting, manage orders and inventory, minimize risks, and personalize customer offerings. Discover the future of AI in the construction industry. The supply chain in the building materials industry is a complex and...

Expert Knowledge
For Your Business

As you can see, we've gained a lot of knowledge over the years - and we love to share! Let's talk about how we can help you.

Contact us

<dialogue.opened>