Auto-Delete Out-of-Stock Variants After 7 Days
Automatically cleans up your catalog by deleting product variants that remain out of stock for a full week, streamlining inventory management and improving site performance.
The Problem
Lingering out-of-stock product variants clutter your catalog, making product management tedious and potentially confusing customers who encounter unpurchasable items. This forces manual cleanup efforts, wasting valuable staff time, and a bloated catalog can subtly degrade site speed and search relevance over time.
What This Automation Solves
Shopify Flow automates this by triggering when a 'Product variant out of stock' event occurs. It then waits seven days and uses a condition to verify the 'Product variant inventory quantity is equal to 0' before the 'Delete product variant' action removes it, ensuring only truly unavailable variants are purged.
When to Use This Automation
- You frequently sunset product lines or seasonal inventory.
- You want to prevent old, unsellable variants from cluttering your site search.
- You're a dropshipper or reseller with rapidly changing supplier stock.
Workflow
Trigger
Step 1Starts when a variant goes out of stock.
Wait
Step 2Waits seven days.
Condition
Step 3Checks if still out of stock after the wait.
Action
Step 4Deletes the variant.
Step-by-Step Setup
- 1
Add the "Product variant out of stock" trigger.
- 2
Set a "Wait for 7 days" action.
- 3
Add a "Product variant inventory quantity is equal to 0" condition.
- 4
Connect the "Delete product variant" action to the 'Yes' path of the condition.
Related Questions
- What happens if a variant comes back in stock during the 7-day wait period?
- If the variant is restocked, the Flow's "Product variant inventory quantity is equal to 0" condition will evaluate to 'No' after the wait, preventing the deletion.
- Can I receive a notification before a variant is permanently deleted?
- Yes, insert an action like "Send internal email" or "Send Slack message" right before the "Delete product variant" step to get an alert.
- Will this Flow delete an entire product if all its variants are gone?
- This Flow only deletes specific *variants*. The main product itself will remain, even if all its associated variants are eventually removed.
- How can I undo or recover a product variant deleted by this automation?
- Variants deleted via Flow are permanent and cannot be recovered or restored directly from Shopify. You would need to manually recreate the variant from scratch.
Recommended Tools & Apps
Launch this automation
Open Shopify Flow and use this page as your setup blueprint.
Merchant Insight
Consider setting a slightly longer wait period (e.g., 14 days) for high-value items or those with unpredictable restock times. This provides a buffer against accidental deletions and allows more time for potential supplier updates.
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.