How do I make a sale price shut off automatically after the first 50 units sell?

Shopify discounts run on time windows and per-code redemption caps, not on a running count of units sold, so a "first 50 at this price" promo has to be assembled from parts rather than switched on.

pricinginventorydiscountsflash-sale

What's going on

A merchant wants to run a promo like "first 50 units at $19" and have the price snap back to normal the instant unit 51 sells, with no manual watching and no overselling the discount. Digging through Shopify's discount settings, there's no field for that. You can set a start and end date on a sale, and on discount codes you can cap how many times the code gets redeemed, but neither of those is the same as capping total units sold at a given price.

The confusion is understandable because the discount screens look like they should support this. A usage-limit setting sits right there on the discount code setup page, and it's easy to assume it counts items rather than orders. It doesn't. And automatic discounts, the kind that apply without a code, which is what most flash-sale promos use, don't have a usage-cap field at all; that option only exists for code-based discounts.

There's also a timing problem underneath. Even a self-built quantity cutoff has to account for multiple customers completing checkout within the same few seconds. Whatever mechanism turns the sale price off needs to tolerate a short window where more than one buyer legitimately still sees the old price, or you'll get complaints from someone who added to cart a second before the price changed.

Why it happens

Shopify's discount engine, both automatic discounts and discount codes, is built around three levers: eligibility rules for who or what qualifies, a value in percentage or fixed amount off, and either a date range or, for codes specifically, a redemption-count cap. None of those levers references a running tally of units sold at a price, which would require the discount to read live sales data and turn itself off mid-flight, something the native discount object isn't designed to do.

The usage-limit setting on a discount code counts how many times the code is applied at checkout, meaning orders, not how many units of the product get sold under it. A customer buying five units in one order still only consumes one use, so even the closest-sounding native setting doesn't map onto quantity sold.

Because this really is a gap, the common workaround moves the cutoff logic outside the discount object itself: into Shopify Flow watching inventory or order counts, into a third-party discount or inventory app that tracks units sold and disables itself, or into a dedicated variant that gets a small stock allocation and simply becomes unpurchasable once that allotment runs out.

5 ways to fix it

1

Give the sale price its own inventory-tracked variant or product

Create a separate SKU, such as a limited-run variant or a duplicate listing, priced at the sale rate, and set its tracked inventory to exactly the quantity you want sold at that price, say 50 units. Once that allocation sells out, Shopify's own out-of-stock handling takes over: the variant shows as unavailable, and shoppers fall through to the regular-priced item. This is the closest thing to a native fix because it relies entirely on Shopify's built-in inventory tracking rather than custom logic, and it inherits the same protection against overselling that any limited-stock item already has, since inventory is decremented per order. The tradeoff is you're now managing two SKUs or listings instead of one price on one SKU, which adds some collection and inventory-sync overhead.

2

Automate the cutoff with Shopify Flow

Shopify Flow, free on all plans, can watch a trigger such as an inventory change or order volume and, once a threshold is crossed, run an action, for example disabling the discount or tagging the product so a theme rule swaps the price. This gets you close to true quantity-triggered pricing without paying for a dedicated app, but plan for a short lag: Flow reacts to events after they happen, so there's a brief window, usually seconds, where an order or two might still land at the sale price after your threshold is technically crossed. For most flash-sale use cases that small overage is an acceptable cost of using free tooling; if you need zero overage, this isn't the option.

3

Cap orders with a discount code's usage limit, knowing what it actually counts

If your promo runs as a discount code rather than an automatic discount, you can set a limit on the total number of times the code is redeemed. Remember that this counts orders, not units. A customer buying five units in one order still only uses the code once, so if you expect most customers to buy a single unit per order, set the cap accordingly and check in periodically. This is the fastest thing to set up with no extra tools, but it's a proxy for units sold, not an exact match, and it doesn't work for automatic discounts at all, since those apply without a code and have no usage-limit field.

4

Use a discount or inventory app built for quantity-capped pricing

Several apps in the Shopify App Store specialize in first-N-buyers pricing or tiered quantity discounts, tracking actual units sold and auto-disabling the price at your threshold, with some showing shoppers a live count of how many remain at that price. This is worth it if quantity-triggered pricing is a recurring part of your merchandising calendar rather than a one-off promo, since it removes the manual monitoring that both the Flow and dual-SKU approaches still require. Check any app's description for how it handles simultaneous checkouts near the cutoff; the reliable ones decrement a counter atomically per order rather than checking a count and then updating it, which is what actually prevents overselling the discount during a rush.

5

Test for the race condition regardless of which fix you pick

Whatever mechanism ends the sale, test what happens when two or three customers check out within the same second near your cutoff. If your logic reads a running units-sold count and then decides whether to apply the price, rather than relying on Shopify's own inventory decrement, you can end up honoring the sale price for a few more units than intended during a traffic spike. The dedicated-variant approach sidesteps this because it's inventory-native; a custom Flow or manually tracked count is the version most likely to leak a handful of extra discounted orders, so budget for a small buffer rather than promising an exact cutoff.

Bottom line

There's no toggle for this because Shopify's discount system was never built to watch a running sales count; it watches dates and redemption totals, not units. The cleanest fixes route around that gap rather than fighting it: give the promo its own inventory-tracked variant so it sells out on its own, or use Shopify Flow to watch inventory or order volume and switch the discount off. If you need an airtight quantity cutoff with checkout-level race-condition safety and no manual babysitting, that's a case where a purpose-built pricing or inventory app, or a short custom build, earns its keep, and it's worth spec'ing out clearly before you build or buy anything.

Still Stuck?

Browse the rest of the problem library, run a free storefront scan to catch issues like this automatically, or email us and we'll work out a custom solution for it.