BFCM in 12 days

Free checklist & audit
Shopify Flow/Inventory & Restock/Automatically Tag Out-of-Stock Products by Inventory Location
Operational EfficiencyHigh Difficulty

Automatically Tag Out-of-Stock Products by Inventory Location

Automatically apply or remove 'out-of-stock' tags to products based on real-time inventory levels across all or specific locations, enhancing store management.

The Problem

Manually updating product tags when inventory changes is a tedious, error-prone task that leads to outdated product pages and missed sales opportunities. Without accurate tags, customers might order unavailable items, leading to frustrating cancellations and increased customer service overhead.

What This Automation Solves

This Shopify Flow automation triggers whenever a `product variant inventory quantity changed`. It then iterates through each location to precisely `add product tags` like 'out-of-stock-[location]' when stock hits zero, or `remove product tags` upon restock, while also managing a global 'out-of-stock' tag based on your `allow sell when out of stock` setting.

When to Use This Automation

  • You manage inventory across multiple physical locations or warehouses and need location-specific stock visibility.
  • You want to instantly hide or highlight products that are genuinely unavailable for purchase.
  • You need to segment products for marketing campaigns (e.g., 'email me when back in stock') or internal reporting.

Workflow

  1. Trigger

    Step 1

    This workflow starts when the inventory level changes for a specific product variant

  2. Loop

    Step 2

    Iterate over each of the inventory locations that stocks the item.

  3. Condition

    Step 3

    Check to see if the inventory levels for the iterated location is greater than 1.

  4. Action

    Step 4

    Tag the product when it's available for the location (True branch)

  5. Action

    Step 5

    Tag the product when it's available for purchase in the iterated location (False branch)

  6. Condition

    Step 6

    Check if the merchant allows the product to be sold when it's out-of-stock.

  7. Action

    Step 7

    Tag the product as out-of-stock

  8. Action

    Step 8

    If the product was previously tagged out-of-stock, remove that tag.

Step-by-Step Setup

  1. 1

    Initiate the workflow with the `Product variant inventory quantity changed` trigger.

  2. 2

    Add a `For each` loop action, iterating `For each inventory location` that stocks the variant.

  3. 3

    Within the loop, create a `Condition` to check if the `inventory quantity` at the iterated location is `equal to 0`.

  4. 4

    In the 'true' branch (out of stock at location), use `Add product tags` to tag the product with "out-of-stock-[location name]". In the 'false' branch (in stock at location), use `Remove product tags` for any existing "out-of-stock-[location name]" tag.

  5. 5

    After the loop, add a final `Condition` to check if the product variant's *total* `inventory quantity` across all locations is `equal to 0` AND if `allow sell when out of stock` is `false`. If true, `Add product tags` "out-of-stock". Otherwise, `Remove product tags` "out-of-stock".

Related Questions

How can I prevent customers from ordering out-of-stock items?
By instantly tagging products as 'out-of-stock' or 'sold-out', you can use theme customizations to hide these products, display clear 'sold out' messages, or disable the 'Add to Cart' button, preventing accidental purchases and managing expectations.
Can this Flow differentiate between low stock and zero stock?
Yes, you can modify or add additional `Condition` checks in the Flow. For example, check for inventory `less than 5` for a 'low-stock' tag, and a separate `equal to 0` check for an 'out-of-stock' tag, allowing for nuanced inventory management.
How do these tags help with marketing efforts?
Inventory status tags allow you to create dynamic product collections for targeted marketing (e.g., 'back in stock' email flows), pause ads for unavailable items, or filter products for specific promotions, ensuring your marketing is always relevant and effective.
What if I allow selling products when out of stock (backordering)?
If your `allow sell when out of stock` setting is true, you can adjust the Flow to `add product tags` like 'backorderable' instead of 'out-of-stock'. This differentiates products that are temporarily unavailable but still purchasable for future fulfillment.

Recommended Tools & Apps

Launch this automation

Open Shopify Flow and use this page as your setup blueprint.

Open Shopify Flow

Merchant Insight

Combine these inventory tags with your theme's collection conditions to automatically show/hide products or with other Flows to notify your team via Slack when a critical item hits zero stock at a specific warehouse. It’s about leveraging a

Related Automations