Skip to content

How to Set Up a Buy X Get Y Discount on Shopify

Configure Shopify's native Buy X get Y discount, learn why the free item never auto-adds, which item gets discounted, and how to cap cost per order.

How-to guidesThe diex team12 min read

"Buy 2 get 1 free" and "buy a jacket, get 20% off a hat" are the same Shopify discount type: Buy X get Y. Creating it takes about three minutes. What catches merchants out is everything that happens after you hit save, because the free item never lands in the cart on its own, the discount sometimes picks a cheaper item than you expected, and one large cart can claim far more free units than you budgeted for. This walks through the setup and then through the three settings that decide what the offer actually costs you.

What Buy X get Y actually does on Shopify

Buy X get Y is one of Shopify's native discount types, alongside amount off discounts and free shipping discounts. You create it from your Shopify admin under Discounts, then Create discount, then Buy X get Y, and you pick a method: a discount code the customer types in, or an automatic discount that applies on its own. The Shopify Help Center page for Buy X get Y discounts documents both paths.

The discount has two halves. "Customer buys" is the condition: what has to be in the cart for the offer to trigger. "Customer gets" is the reward: which items get discounted, how many of them, and by how much.

The important mental model is that Buy X get Y discounts items that are already in the cart. It is not a bundle builder and it is not an upsell widget. It watches the cart, and when the condition is met it marks down qualifying items. Everything below follows from that.

Set the "Customer buys" side: quantity or spend

In the "Customer buys" section you choose either Minimum quantity of items or Minimum purchase amount, then enter the number of items the customer must buy or the amount they must spend to be eligible. Then you pick the specific products or collections that count toward it.

Three documented details matter here, all from Shopify's Buy X get Y page:

  • If the discount applies to specific products or collections, only those products count toward the minimum purchase amount. Nothing else in the cart helps the shopper qualify.
  • Products count toward the minimum purchase amount at their full price, before any other discount is applied.
  • Shipping costs and taxes are never included in the amount.

That first point is the one people get wrong. If you set "spend $75 on Outerwear, get a free beanie," a shopper with $60 of outerwear and $30 of socks does not qualify. The $30 of socks is invisible to this discount.

As a rule of thumb, use the quantity trigger when the offer is about one product or one tight collection ("buy 2 tees"), and use the spend trigger when the qualifying side spans a wide price range, because two items can mean $30 or $300 and the cost of your gift does not change.

Set the "Customer gets" side: free, percentage, or amount off each

In "Customer gets" you set the quantity of items that receive the discount, pick the products or collections those items come from, and choose the discounted value: Percentage, Amount off each, or Free.

Discounted value Best for What it costs you per unit
Free Classic BOGO and gift-with-purchase on one specific item The full retail value of that item, every time
Percentage Cross-category offers where you want a visible headline number Varies with the price of whatever the shopper picks
Amount off each A "get" side that spans several price points Fixed and known in advance

Percentage off a broad collection is where cost per order gets unpredictable, because the shopper decides which item to claim it on. If your "get" collection runs from $20 to $200, "20% off" is somewhere between $4 and $40 of margin. Amount off each removes that variance entirely, which is why it is often the better pick for a wide reward collection even though "20% off" reads better in an email subject line.

The quantity field in this section is also the answer to the most common complaint about this discount type. It discounts exactly that many units and no more. A Shopify Community thread about Buy X get Y applying to only one product is merchants running into this: they wanted "buy one, get everything else in the collection 20% off" and the discount marked down a single item. If you want three units discounted, set the quantity to three. There is no "all remaining items" option.

The customer has to add the free item themselves

This is the single biggest reason these offers underperform, and Shopify states it plainly on the Buy X get Y page: customers must add all items to their cart manually, and the free or discounted "get" item is never added to the cart automatically.

So a shopper who buys the jacket and never puts the hat in the cart simply does not get a hat. The discount is working correctly. The offer still failed.

Shopify applies automatic discounts in the cart and at checkout once the conditions are met, as described on the automatic discounts page. That means the product page is silent about your offer unless you put something there yourself. Before you launch, make sure the instruction to add the second item appears in at least two of these places:

  1. The announcement bar or a homepage section, with a link straight to the "get" product or collection.
  2. The collection page or product description for the qualifying items, in one sentence: "Add any beanie to your cart and it is free."
  3. The cart page, where the shopper is one click from fixing it.
  4. The email or ad that drives the traffic, with the link pointing at the "get" item rather than the qualifying one.

If you have hit this before with other discounts, the same cause is behind a discount that does not show on the product page.

Which item gets the discount when several qualify

Shopify's rule is specific: if the product or collection in "Customer gets" is the same as the one in "Customer buys," then the lower-priced item the customer chose is the item that gets discounted.

That is exactly what you want for a true BOGO on one product. It is not what you want if you put a wide collection in both sections. "Buy 2 from Candles, get 1 from Candles free" on a collection that runs $15 to $60 means the shopper pays for the two expensive candles and takes the $15 one free, or pays for one expensive candle plus one cheap one and still takes a cheap one free. Either way you give away the cheapest unit, which is the good news for your margin and the bad news if you assumed shoppers would claim the item you were trying to clear.

Two practical consequences:

  • To control what gets given away, narrow the "Customer gets" collection to the items you are willing to lose. A dedicated collection with three gift-eligible products is more predictable than your entire catalog.
  • To clear specific slow stock, put only that stock in "Customer gets," not in both sections.

Cap the cost with uses per order and active dates

Under "Customer gets" there is an option to set the maximum number of uses per order, where you enter the maximum number of times the promotion can apply to each order. Use it. Without it, the offer scales with the cart.

For example, say you run "buy 2 get 1 free" on a $25 candle with no cap. A shopper adds 12 candles. The promotion applies four times, so four candles are free and you have given away $100 of retail in one order. With the maximum set to 1, the same cart gives away $25.

Set it to 1 unless you have a specific reason to allow more. If you do want stacking (say, up to three free units for a stock clearance), pick the number from your own order data rather than leaving it open.

Two more limits worth setting on the same screen. If you are using a discount code, Shopify lets you limit the number of times the discount can be used in total and limit it to one per customer, which it tracks by email or phone number, as documented on the amount off discounts page. And set an end date. Shopify notes that the start and end times follow the time zone set in your admin, and that a discount with no end date does not expire.

Code or automatic, and what it can combine with

Automatic is the right method for a promotion you are advertising on the storefront, because there is nothing for the shopper to remember. Keep in mind that Shopify allows a maximum of 25 active automatic discounts, including app-based ones, as stated on the automatic discounts page.

Use a code when the offer is for a segment, an email list, or a partner. If you need a different code per recipient, diex bulk discount codes generates many unique codes at once (count, optional prefix, length) or imports a list, including the buy X get X type, with minimum purchase requirements and usage limits. They are regular Shopify discount codes once created.

Combinations are where Buy X get Y is more restricted than merchants expect. Shopify's discount combinations page documents the rules:

  • A customer can use a maximum of 5 product or order discount codes and 1 shipping discount code on the same order.
  • Product discounts apply first to individual items, order discounts apply to the revised subtotal after product discounts, and shipping discounts apply last.
  • On all plans except Shopify Plus, all products that are part of a Buy X get Y discount are ineligible for further product discounts. If a customer enters a code that applies to any of those products, Shopify applies the best overall value for the customer.
  • On Shopify Plus, the "customer gets" product is eligible for combining product discounts on the same line item.
  • Discounts can only be combined on orders made through the Online Store, Storefront API, and Shopify POS.

In practice, on a non-Plus store, running a sitewide 15% off code at the same time as a BOGO means shoppers get one or the other, whichever is worth more to them. Plan for that rather than discovering it in your reports. There is more detail in our breakdown of what actually stacks in Shopify discount combinations.

What the offer costs you per order: a worked example

Buy X get Y looks cheap because the giveaway is an item rather than a percentage. Run the numbers in unit cost, not retail.

For example, say a candle sells for $25 and costs you $8. A shopper who would normally buy two candles spends $50 against $16 of cost, so $34 of gross profit. Run "buy 2 get 1 free" and the same shopper spends $50 against $24 of cost, so $26 of gross profit. Revenue is unchanged and you are $8 worse off. The offer only pays if it moves people from one candle to three, or brings in a shopper who was not buying at all.

Now the cross-sell version. Say a jacket sells for $120 at a cost of $48, and a hat sells for $40 at a cost of $14. "Buy a jacket, get a hat free" with a maximum of one use per order turns a $120 jacket order from $72 of gross profit into $58. The offer costs $14, not $40, as long as the shopper was not going to buy the hat anyway. If they were, you lost the $26 of margin that hat would have earned. That is the real risk with gift-with-purchase: pick a "get" item that shoppers rarely add on their own.

Before you launch, write down two numbers: your worst-case giveaway per order (the highest-priced item in the "get" collection, times the maximum uses per order) and the share of orders you expect to claim it. If worst case per order is larger than the gross profit on a typical qualifying order, tighten the "get" collection or switch to amount off each. Our guide to how deep a discount can go has the breakeven math.

When a quantity discount is the better offer

Buy X get Y is the right native tool when the reward is a specific extra item, and especially for gift-with-purchase and single-product BOGO. It is the wrong tool when the goal is "buy more of the same thing, get a better price," for two reasons: the customer still has to add the free unit by hand, and nothing on the product page tells them the deal exists.

For that goal, quantity tiers fit better. The shopper sees the price improve as they increase quantity, with no extra item to remember. diex volume discounts set tiers like 5% off from 10 items and 10% off from 20, with a "count quantity across" setting that decides whether a tier is earned per cart line, across all variants of a product, across a collection, or across the whole cart. They run as Shopify Functions, so Shopify applies them in the cart and at checkout, and the storefront blocks include a product page pricing table that can follow the chosen quantity and show how many more units the shopper needs for the next tier. For the standard "free extra item" offer, Shopify's native Buy X get Y is the right answer and you do not need an app for it.

Set this up this week

  1. Pick one offer and write it as a sentence: who qualifies, what they get, and how many times per order.
  2. Build it in Discounts with Buy X get Y, choosing the quantity trigger for same-product offers and the spend trigger for cross-category ones.
  3. Narrow the "Customer gets" collection to items you are willing to give away, and remember the lower-priced chosen item is what gets discounted if the same collection sits on both sides.
  4. Check the maximum uses per order box and set it to 1 unless you have a reason not to.
  5. Add an end date, and a total usage limit if it is a code.
  6. Put the "add the free item" instruction in at least two storefront places, with a link to the "get" product.
  7. Place a test order on the storefront, deliberately forgetting the free item first, to confirm what a real shopper sees.

Sources

  1. Shopify Help Center: Buy X get Y discounts
  2. Shopify Help Center: Amount off discounts
  3. Shopify Help Center: Discount combinations
  4. Shopify Help Center: Automatic discounts
  5. Shopify Community: How to fix 'Buy X Get Y' discount applying to only one product?

Drafted with AI from the sources above and checked automatically against them and our product facts. Spotted a mistake? Email help@diex.app.

More articles

Run the promotions you actually want to run

Install diex from the Shopify App Store. One plan at $29.99 a month, billed by Shopify.