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
Trigger
Step 1Starts when inventory quantity changes
Condition
Step 2Condition checking if a single variant is out of stock
Action
Step 3Add a tag marking the variant as out of stock
Condition
Step 4Condition checking if all variants are out of stock across all locations
Action
Step 5Remove the product from the online store (channels: Not found)
Step-by-Step Setup
- 1
Create a new Flow and select the "Product variant inventory quantity changed" trigger.
- 2
Add a "Condition" to check if a single variant's inventory quantity is 0 at all locations.
- 3
For the single variant condition, add an "Action" to "Add product tag" (e.g., `oos-variant`) to the product.
- 4
Add a second, separate "Condition" to check if all variants of the product are out of stock at all locations.
- 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.
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 Get Email Alerts for Low Product Variant Inventory
Automate internal email notifications instantly when any product variant's inventory dips below your critical threshold, ensuring you never miss a restock opportunity.
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.
Automatically Republish Back-in-Stock Products
Automatically make products visible on your online store the moment they come back in stock, ensuring customers can purchase without delay.