Shopify Flow/Inventory & Restock/How to Automatically Hide Out-of-Stock Products on Shopify
Operational EfficiencyLow Difficulty

How to Automatically Hide Out-of-Stock Products on Shopify

Automatically unpublish products from your online store when inventory hits zero, and republish them when restocked, ensuring customers always see available items.

The Problem

Customers quickly get frustrated seeing products they can't buy, leading to higher bounce rates and lost sales. Manually unpublishing and republishing stock is a continuous, error-prone chore that drains your team's time, impacting operational efficiency and customer trust.

What This Automation Solves

This Shopify Flow automation eliminates manual effort by instantly responding when a 'Product variant inventory quantity changed'. It uses a 'Condition' to check if the product is 'out of stock' (inventory quantity is zero). If true, the 'Unpublish product' action automatically hides it, ensuring customers only see available items.

When to Use This Automation

  • You want to avoid showing "sold out" labels on your product pages.
  • You frequently sell out of popular items and need dynamic visibility.
  • You manage a large product catalog where manual updates are unsustainable.

Workflow

  1. Trigger

    Step 1

    Starts when inventory quantity changes

  2. Condition

    Step 2

    Condition checking if the product is out of stock

  3. Action

    Step 3

    Remove the product from the online store

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 'Product variant inventory quantity' is 'less than or equal to 0'.

  3. 3

    Under the 'Yes' branch of the condition, add an 'Unpublish product' action.

Related Questions

What happens if a product has multiple variants and only one is out of stock?
The Flow triggers per variant change. If only one variant is out of stock, the product typically remains published, but that specific variant option will show as unavailable on the product page.
Can I hide specific collections or products, not all?
Yes, you can add an additional condition (e.g., "Product tag is 'seasonal'" or "Product collection is 'clearance'") *before* the "Unpublish product" action to apply this rule selectively.
How do I automatically republish products when they come back in stock?
Create a separate Shopify Flow. Use the same "Product variant inventory quantity changed" trigger, but set the condition to check if inventory is "greater than 0", then use the "Publish product" action.
Will unpublished products still appear in my Shopify admin?
Yes, this Flow only removes products from your *online store sales channel*. They remain fully visible and editable within your Shopify admin for your team.

Recommended Tools & Apps

Launch this automation

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

Open Shopify Flow

Merchant Insight

Remember to create a *second* Shopify Flow to automatically *republish* products once restocked. This completes the cycle, ensuring your online store always shows available items without manual checks, improving customer experience and savi

Related Automations