Shopify Flow/Inventory & Restock/Automate Hiding Out-of-Stock Products & Variants from Store
Operational EfficiencyMedium Difficulty

Automate Hiding Out-of-Stock Products & Variants from Store

Automatically hides products or individual variants from your online store the moment their inventory hits zero across all locations, ensuring customers only see available items.

The Problem

Showing out-of-stock products or variants on your storefront frustrates customers, leading to poor user experience and abandoned carts. This costs you potential sales, increases customer service inquiries, and wastes valuable marketing budget driving traffic to unpurchasable items.

What This Automation Solves

This Flow triggers immediately when a product variant's inventory changes. If a 'single variant is out of stock', it adds a tag (e.g., 'oos-variant') to mark it. Crucially, if 'all variants are out of stock' across all locations, the product is automatically unpublished, ensuring customers only see available items and improving conversion.

When to Use This Automation

  • You sell products with multiple variants (sizes, colors) and want to hide only the unavailable ones.
  • You want to completely remove products from your store once all options for that product are gone.
  • You're focused on maintaining a clean, frustration-free shopping experience for your customers.

Workflow

  1. Trigger

    Step 1

    Starts when inventory quantity changes

  2. Condition

    Step 2

    Condition checking if a single variant is out of stock

  3. Action

    Step 3

    Add a tag marking the variant as out of stock

  4. Condition

    Step 4

    Condition checking if all variants are out of stock across all locations

  5. Action

    Step 5

    Remove the product from the online store (channels: Not found)

Step-by-Step Setup

  1. 1

    Create a new Flow and select the "Product variant inventory quantity changed" trigger.

  2. 2

    Add a "Condition" to check if a single variant's inventory quantity is 0 at all locations.

  3. 3

    For the single variant condition, add an "Action" to "Add product tag" (e.g., `oos-variant`) to the product.

  4. 4

    Add a second, separate "Condition" to check if all variants of the product are out of stock at all locations.

  5. 5

    For the 'all variants out of stock' condition, add an "Action" to "Unpublish product" from your Online Store sales channel.

Related Questions

How do I prevent customers from buying out-of-stock items on Shopify?
This Flow helps by automatically hiding variants or entire products once their inventory reaches zero, preventing customers from adding unavailable items to their cart and reducing customer frustration.
Can I hide only specific sizes or colors when they sell out?
Yes, the Flow's initial condition and 'Add product tag' action specifically addresses this, allowing you to mark or hide only the individual variant (e.g., size Large) that's out of stock, while other variants remain visible.
What happens if an out-of-stock product comes back into stock?
This specific Flow only handles items going out of stock. You would need a separate, inverse Flow to re-publish products or remove 'oos-variant' tags once inventory is replenished and available for sale again.
How does hiding products impact my SEO?
For temporarily out-of-stock items, unpublishing can lead to 404 errors for search engines. Consider redirecting to relevant category pages, or using the variant tagging for better SEO preservation while maintaining user experience.

Recommended Tools & Apps

Launch this automation

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

Open Shopify Flow

Merchant Insight

Combine this Flow with a theme that visually hides or grays out variants based on the 'oos-variant' tag. This provides a smoother experience than just unpublishing, especially for products with many variants, as customers can still see the

Related Automations

How to Automate Hiding Out-of-Stock Products & Variants from Store | Shopify Flow Library