BFCM in 12 days

Free checklist & audit
Shopify Flow/Inventory & Restock/Auto-Tag Out-of-Stock Products for Better Inventory Visibility
Operational EfficiencyMedium Difficulty

Auto-Tag Out-of-Stock Products for Better Inventory Visibility

This automation consistently tags all current out-of-stock products, improving data accuracy and simplifying inventory management for marketing and merchandising.

The Problem

Manually identifying and tagging every out-of-stock product across a large Shopify catalog is a huge time sink. This leads to outdated product collections, frustrated customers seeing 'sold out' items, and missed opportunities to market restocks effectively, costing time and potentially sales.

What This Automation Solves

This Shopify Flow efficiently backfills 'Out of Stock' tags across your catalog. Triggered every 10 minutes, it uses an advanced query to fetch products that are currently out of stock and haven't been processed yet. It then iteratively adds 'Out of Stock' and a unique `flow-tag-backfill` tag, ensuring your product data is consistently up-to-date for newly out-of-stock items without re-processing previously tagged products.

When to Use This Automation

  • You need to quickly identify and manage all currently unavailable products for reporting or marketing campaigns.
  • You're revamping your inventory tagging system and need to apply 'Out of Stock' tags consistently to your existing catalog.
  • You want to automatically hide out-of-stock products from collections or trigger restock notifications.

Workflow

  1. Trigger

    Step 1

    Every 10 minutes, does not end

  2. Action

    Step 2

    Get products using an advanced query sorted by created at, in ascending order

  3. Loop

    Step 3

    item in getProductData

  4. Action

    Step 4

    Add the following product tags: Out of Stock, flow-tag-backfill

Step-by-Step Setup

  1. 1

    Set the trigger to 'Scheduled time' to run 'Every 10 minutes' and 'Does not end'.

  2. 2

    Add a 'Get product data' action. Configure an advanced query to retrieve products where 'Inventory quantity is 0' OR 'All variants are out of stock' AND 'Tags does not include flow-tag-backfill'. Sort by 'created at' ascending.

  3. 3

    Insert a 'For each' loop to iterate through the products found by 'Get product data'.

  4. 4

    Within the loop, add an 'Add product tags' action. Specify 'Out of Stock' and 'flow-tag-backfill' as the tags to add.

Related Questions

Why is 'flow-tag-backfill' added?
This internal tag acts as a processing flag. Once a product is identified as out of stock and tagged by this Flow, `flow-tag-backfill` is added to prevent it from being re-processed unnecessarily in subsequent runs, ensuring efficiency.
How do I remove the 'Out of Stock' tag when a product is restocked?
You'll need a separate Shopify Flow. Trigger it when inventory quantity changes (e.g., 'Inventory quantity changed'), check if the quantity is above zero, and then use the 'Remove product tags' action to take off both 'Out of Stock' and `flow-tag-backfill`.
Can this Flow affect my live collections?
Absolutely. If your collections are configured to automatically include or exclude products based on the 'Out of Stock' tag (e.g., hiding out-of-stock items), this Flow will keep those collections updated, improving customer experience.
What does 'only run once per product' mean with an every 10-minute trigger?
This means *this specific Flow* will only add its tags to a particular product *once*. The Flow runs repeatedly to catch any *new* products that become out of stock since the last run, or products that didn't have the `flow-tag-backfill` yet, rather than constantly re-processing already-tagged items.

Recommended Tools & Apps

Launch this automation

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

Open Shopify Flow

Merchant Insight

Use this 'Out of Stock' tag to automatically hide products from collections, power email alerts for restocks (via Klaviyo), or even create a dedicated 'Sold Out' collection. This improves customer experience by not showing unavailable items

Related Automations