Shopify Flow/Inventory & Restock/Auto-Delete Out-of-Stock Variants After 7 Days
Operational EfficiencyMedium Difficulty

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

  1. Trigger

    Step 1

    Starts when a variant goes out of stock.

  2. Wait

    Step 2

    Waits seven days.

  3. Condition

    Step 3

    Checks if still out of stock after the wait.

  4. Action

    Step 4

    Deletes the variant.

Step-by-Step Setup

  1. 1

    Add the "Product variant out of stock" trigger.

  2. 2

    Set a "Wait for 7 days" action.

  3. 3

    Add a "Product variant inventory quantity is equal to 0" condition.

  4. 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.

Open Shopify Flow

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