How can I add a column to my Shopify order export showing the order status?
The Shopify Order API doesn't have a field for the order's current status, but what we can do instead is look at the closed_at
and cancelled_at
fields to determine the order status:
- Open -
closed_at
andcancelled_at
are blank - Closed -
closed_at
is not blank - Cancelled -
cancelled_at
is not blank
Note that the "Archived" status is the same as "Closed". It's also possible that an order is both "Closed" and "Cancelled".
In the Calculated Fields section of the Data Settings, you can use this formula to add an Order Status column using the logic mentioned above:
"Closed and Cancelled" if ({{ closed_at }} and {{ cancelled_at }}) else "Closed" if {{ closed_at }} else "Cancelled" if {{ cancelled_at }} else "Open"
The output will look something like this:
App: EZ Exporter