When you look at Shopify's order processing interface, you'll see that it's possible to filter your orders to make them easier to find. For example, by default, you'll see paid, pending, archived, etc. orders.
But if you want to identify all orders that contain a certain product or that match a specific criteria, for example all orders that contain a product that is not in stock, you will need to “tag” the orders. We will learn how to do this automatically with Shopify Flow which is a free app for Shopify that is now available on all plans.
The goal? Filter all orders in one click, directly in the Shopify back office. This tutorial can be easily adapted to change the tagging based on your preferred conditions.
Step 1: Install Shopify Flow

If you haven't already, you'll need to install Shopify Flow on your store first, like many Shopify apps, it's very quick and easy.
You can go to the appstore here to find Shopify Flow, type it into your search bar or on Google or other search engine.
The link is here: https://apps.shopify.com/flow
You will then need to grant it the necessary rights to work on your Shopify store. The application is free and therefore you will not be charged.
Step 2: Build the Shopify Flow scenario
We will start by building the first “Flow” (scenario). We must therefore create a new scenario by clicking on the “create a new workflow” button and choose a trigger. Since we will be tagging orders, we will use the “order created” trigger.
Please note that while part of the interface is in French, this is not the case for many of the instructions, documentation, and the "core" of Shopify Flow. Furthermore, many apps compatible with Shopify Flow do not offer French translations. But of course, they are 100% functional regardless of the language of your store.
Step 3: Add a trigger condition
Next, we'll add a condition. In our example, if one of the products is not in stock, in the case where short selling is allowed, for example, I want to indicate this via a tag on the order.
We will therefore check each product line of the order to check the stock.
Since we are going to use only one condition in this example, we can leave it as “If all conditions are met”.

We'll look for the value "lineItems_item.variant.inventoryQuantity" in our example. Of course, this is where the somewhat complicated part of Shopify Flow lies. You'll either have to search, know, or read the Shopify documentation to identify the correct condition. A good Shopify partner expert or your favorite Shopify agency can help you with this if you don't want to do it alone.
Here we will say: check if one of the product lines of the order has a “remaining inventory” below zero, if it is yes, then you will be able to launch an action.
Step 4: Add an action
We will now indicate the action to be carried out, here in our example it is to add a tag to an order. We will therefore look for the action “Add order tag” and we will create the desired tag. Here I called it “Stock<0” (remember to press enter to validate).

Step 5: Name the scenario
Essential for finding your way around as soon as you have several scenarios in place, remember to name your workflow. It is called New Workflow by default, the name is free but think of something simple to find your way around.
Here I will call it: “Tag of orders without stock”
Then click on “Activate Workflow”. And that’s it!
Step 6: Debug and verifications
Despite the simplicity of this first scenario, it may happen that it doesn't work as intended or that the scenario doesn't trigger as you intended. This is the debugging phase.
It is possible to view the “logs” of each workflow for several days. 7 for the moment.
By clicking on an execution you will be able to see why the flow did or did not trigger.
Sometimes the conditions are not right, sometimes it's completely normal.
In our example, if all products are in stock, the flow will stop without placing a tag on the order.
In short, it's up to you to check that the flow works according to your needs.
Additionally, you can also restart a failed scenario or go to a particular command and restart the scenario.
Step 7: Create your filter for orders
So for the moment, we have an automatic tag on each order but now we need to create the corresponding view in “orders” to filter them quickly.
Nothing could be simpler, go to “Orders” then “search and filter” we add a filter “contains the tag” and type “Stock<0” if that is what you used in Shopify Flow

Then, remember to click “save as” to save the view. This will make it much easier to return to it later.
And there you have it, your first automation has been created in Shopify. You can create thousands of them to make your life easier. Feel free to leave any automation ideas you might need in the comments so we can do a little tutorial on them in future Pikka articles!