How to Create Magento 2 Order Status & Order State

How to Create Magento 2 Order Status & Order State

The Magento 2 orders have an order status that is linked with a state in the order processing flow. When there are thousands of orders to be managed, the correct idea of Magento 2 Order status and order state and the steps to create them can be helpful.

Difference between Order Status & Order State in Magento 2:

Magento 2 order state is the position of the order in the current processing workflow.

Pre-defined Order State:

  1. New
  2. Processing
  3. Complete
  4. Pending Payment
  5. Cancelled
  6. Closed
  7. Payment Review
  8. On hold
  9. Fraud

However, for order status, you can create Magento 2 custom order status too. Each order state can have more than one order statuses assigned to it for making things simpler! The status of each order is displayed in the Status column of the Order grid in the backend.

Understand the below order status workflow:

How to Create Magento 2 Order Status & Order State 1

Source: Magento Tech Resources

Steps to Create Magento 2 Order Status & Order State:

  1. Login to admin panel
  2. Go to Stores > Settings > Order Status
    How to Create Magento 2 Order Status & Order State 2
  3. Click “Create New Status
  4. Under Order Status Information,
    1. Status Code – The first character must be a letter (a-z), and the other can be a combination of letters and numbers while underscore is to be used instead of space.
    2. Status Label – This is shown on the admin backend and the storefront
      How to Create Magento 2 Order Status & Order State 3
  5. If you need any labels for different store views, enter it in the Store View Specific Labels section as shown here:
    How to Create Magento 2 Order Status & Order State 4
  6. Click Save Status

Steps to Assign An Order Status to a State:

  1. On the Order Status page, click “Assign Status to State
  2. Under Assignment Information,
    1. Order Status – Select the order status that you want to assign which are listed by status label
    2. Order State – Set Order State to the place in the workflow where the order status belongs.
    3. Visible on StoreFront – Tick the checkbox if you want to make this status visible from the frontend.
  3. Click Save Status Assignment

Steps to Edit Order Status in Magento 2:

  1. Click on the Order Status that you want to edit from the backend Order grid
  2. Change the order status settings as required
  3. Click Save Status

Steps to Remove Order Status from an assigned state:

  1. Consider the Order Status you want to unassign on the Order Status grid.
  2. Click on the Unassign link in the Action column.

The terms can be tricky but you can always reach out using the Comments section for the doubts.

I’d be happy to help you out.

Also, do not forget to share the post with the Magento community via social media.

Thank you.

Get E-commers Updates in Your Inbox

Thank you for subscribing.

Something went wrong.

5
(based on 8 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a reply:

Your email address will not be published.