Delay Shopify Back-in-Stock Alerts Until Inventory Reaches a Minimum Threshold

Delay Shopify Back-in-Stock Alerts Until Inventory Reaches a Minimum Threshold

A customer joins your waiting list for a sold-out product. A few days later, one returned unit becomes available, and your notification system emails hundreds of subscribers.

That single unit sells almost immediately. Everyone else clicks through to another sold-out product.

The email was technically accurate when it was sent, but the experience still feels broken.

A better approach is to separate “available to purchase” from “ready to announce.” A variant might be purchasable when one unit becomes available, while its back-in-stock campaign stays paused until inventory reaches ten units.

This guide explains how to implement that distinction, from checking your existing notification app to designing a custom notification service.

  1. Define the release rule before changing your setup

“Delay the email” can describe two different requirements.

A time delay means waiting a fixed period after a restock. An inventory threshold means waiting until enough stock is available.

These rules solve different problems. Waiting 30 minutes does not help if inventory is still only one unit.

For a threshold-based release, your core condition should look like this:


Send eligibility:
Available inventory >= minimum notification quantity

For example:


Minimum notification quantity: 10

Inventory changes:
0 → 1: Keep notifications paused
1 → 6: Keep notifications paused
6 → 10: Eligible to release notifications
10 → 14: Do not restart the same campaign

Be explicit about the comparison. “At least ten” means >= 10. “More than ten” means > 10.

You can add a stabilization delay as a second condition:


Available inventory reaches 10
→ Wait 15 minutes
→ Fetch current inventory again
→ Release notifications only if inventory is still at least 10

The second inventory check matters. Orders, corrections, and transfers can change stock during the waiting period.

  1. Start with your existing back-in-stock app

The simplest solution is an app-level minimum inventory rule, if your current app supports one.

Setting names vary. Look for concepts such as minimum restock quantity, minimum inventory, notification threshold, or restock release rules. These are examples of terminology, not universal Shopify settings.

Before enabling anything, confirm exactly what the setting controls.

Does it evaluate each variant separately? Does it count stock across every location? Does it check inventory again before sending? Does it release the entire waiting list or send in batches?

Those details matter more than the setting’s name.

A useful support question is:

Can I hold back-in-stock notifications until an individual variant has at least ten available units at eligible online fulfillment locations? Does that rule apply to the initial release and subsequent batches?

If the app supports the required behavior, use its built-in rule rather than adding a second automation system.

If it only supports a time delay, do not assume that delay provides a stock threshold. Ask whether it supports conditional release through an integration or API.

  1. Count the inventory customers can actually buy

A threshold is only useful when it measures the right stock.

Suppose a variant has:


Online fulfillment warehouse: 3 available
Retail-only location:         18 available
Notification threshold:      10

A combined count of 21 could release emails even though the relevant online fulfillment location has only three units.

For notification purposes, define an eligible inventory pool. That might be one warehouse, several online fulfillment locations, or a region-specific pool.

A useful application-level model is:


Notification inventory =
Sum of available units at eligible locations

If you also maintain an operational safety buffer:


Notification inventory =
max(0, eligible available units - notification buffer)

Treat the buffer as an intentional business rule. Do not subtract quantities twice if the inventory value you read already accounts for units that are unavailable.

Also keep the rule at variant level. Restocking a medium blue shirt should not release notifications for the large blue shirt just because they belong to the same product.

For multi-market stores, a global count can still be misleading. If fulfillment availability differs by customer region, consider separate eligibility rules for each relevant inventory pool.

  1. Use automation as a gate, not as an assumed customer-email sender

An automation layer can evaluate inventory changes and decide when a variant becomes eligible for notifications.

Shopify Flow provides a Product variant inventory quantity changed trigger. It supplies the affected product and variant, plus the previous inventory quantity. Its documentation also explains how to inspect inventory at a specific location.

However, detecting the inventory change and sending the customer notification are separate jobs.

A conceptual workflow looks like this:


Variant inventory changes
→ Evaluate inventory threshold
→ Check whether a notification cycle is already active
→ Optionally wait
→ Recheck current inventory
→ Release notifications through a supported integration

The final step depends on your notification provider. A product tag or variant metafield will not automatically pause or release an app’s emails unless that app explicitly supports it.

Likewise, Flow’s Send internal email action is intended for fixed recipients such as staff. It is not a substitute for a variant-specific customer waiting list.

Use automation to control eligibility only when there is a verified connection to the system that owns the subscriptions and sends the alerts.

  1. For custom implementations, build a state machine

A custom service needs more than an inventory comparison.

It should track whether a restock cycle is waiting, eligible, actively sending, or finished. Without that state, every inventory update above the threshold could trigger another campaign.

A minimal model might include:


Variant notification state:
- variant_id
- inventory_pool_id
- release_threshold
- cycle_id
- state
- last_evaluated_at

Waiting-list subscription:
- subscription_id
- variant_id
- recipient_reference
- subscribed_at
- status

Delivery record:
- cycle_id
- subscription_id
- delivery_status
- provider_message_id

Possible campaign states:


WAITING
  → ELIGIBLE
  → SENDING
  → PAUSED or COMPLETED

The following JavaScript illustrates eligibility logic only. The functions are application-defined helpers, not Shopify API methods:


async function evaluateRestock(variantId, inventoryPoolId) {
  return withVariantLock(variantId, inventoryPoolId, async () => {
    const config = await loadNotificationConfig(
      variantId,
      inventoryPoolId
    );

    const available = await fetchCurrentEligibleAvailability(
      variantId,
      inventoryPoolId
    );

    const cycle = await loadOpenNotificationCycle(
      variantId,
      inventoryPoolId
    );

    if (!cycle || available < config.releaseThreshold) {
      return { eligible: false };
    }

    await enqueueCycleOnce({
      cycleId: cycle.id,
      variantId,
      inventoryPoolId,
      idempotencyKey: `restock-cycle:${cycle.id}`
    });

    return { eligible: true };
  });
}

The important pieces are the current inventory read, the variant-level lock, and the idempotent enqueue operation.

A production implementation also needs authenticated event ingestion, durable storage, retry handling, access controls, and monitoring. An event should prompt evaluation, not serve as permanent proof that stock is still available.

  1. Separate the initial release threshold from batch rules

Ten units might justify starting a campaign. That does not mean you should email every subscriber immediately.

A better design separates three settings:


Initial release threshold: 10 units
Minimum stock to continue: 3 units
Notification batch size:  25 subscribers

The first rule decides when the campaign starts. The second decides whether it should continue. The third limits how many people are contacted at once.

For example:


Available inventory reaches 12
→ Release the first batch of 25 notifications
→ Wait for the configured interval
→ Fetch inventory again

If inventory is at least 3:
    Evaluate the next batch

If inventory is below 3:
    Pause the campaign

Batch size should reflect demand, expected conversion, typical order quantity, and how quickly stock sells.

A rough planning formula is:


Estimated audience capacity =
(notification inventory)
÷ (expected conversion rate × units per order)

If notification inventory is eight units, expected conversion is 10%, and customers typically buy one unit, the estimated audience capacity is 80 subscribers.

That is a planning estimate, not a safe-send guarantee. Conversion can spike, and shoppers outside the waiting list can buy the same stock. Start conservatively and adjust using actual results.

  1. Prevent duplicate sends and inventory race conditions

A threshold alone does not make the system reliable.

Use a unique delivery key for each subscription in each restock cycle:


delivery_key = cycle_id + subscription_id

Persist that key before submitting a send job. Keep provider message identifiers so you can reconcile uncertain outcomes.

A timeout does not necessarily mean an email failed. If the provider accepted the message but your application missed the response, blindly retrying can create duplicates. Use provider-supported idempotency or delivery reconciliation where available.

Also remember that notification eligibility does not reserve inventory.

Even after a fresh stock check, another shopper can purchase the remaining units before a subscriber clicks the email.

Avoid wording such as “Your item is reserved” unless your system actually reserves it. Prefer:

The variant you requested is available again. Availability may change before you complete checkout.

  1. Test the failure cases before launch

Test the boundaries, not just the successful restock.

  • Change inventory from zero to one. Notifications should remain paused.
  • Increase inventory to one below the threshold. It should still remain paused.
  • Reach the exact threshold. One notification cycle should become eligible.
  • Increase stock again. The same subscribers should not receive duplicate alerts.
  • Drop below the threshold during a stabilization delay. Release should be blocked.
  • Restock a different variant. The original variant’s waiting list should remain untouched.
  • Add inventory at an excluded location. It should not unlock the campaign.
  • Deliver the same inventory event twice. Only one release job should be created.
  • Simulate an email-provider timeout. Delivery reconciliation should prevent blind duplicate sends.
  • Unsubscribe a recipient before dispatch. The pending send should respect the subscription’s current status.

Include a scheduled reconciliation process if you build a custom service. It can identify eligible variants that were missed because an event or background job failed.

  1. Measure whether the threshold is helping

The goal is not simply to send fewer emails. It is to make the notifications more useful.

Track inventory at release, waiting-list size, batch size, time to sell out, repeat sends, and the percentage of notified customers who arrive after the variant has sold out again.

If customers still encounter sold-out pages too often, increase the release threshold, shrink batches, or lengthen the interval between batches.

If stock remains available for days while subscribers stay queued, your rules may be too conservative.

The practical recommendation

Start with a minimum inventory rule in your existing notification app. Confirm that it applies to the correct variant and inventory locations, then add conservative batch sending if supported.

Use a custom integration only when you need more control over inventory pools, campaign state, or release timing.

The central principle is simple: one available unit can make a product purchasable, but it does not necessarily make a large back-in-stock campaign ready to send.

Back to blog

Leave a comment