How to Create Buy X Get Y Discounts on Shopify
Learn how to plan, configure, and test Shopify Buy X Get Y promotions, including product selection, quantities, repetition, and exclusions.
Buy X Get Y can increase basket size or introduce shoppers to another product. It can also produce unexpected results unless qualifying items, rewards, and repetition are defined precisely.
Define X and Y separately
Start by treating the qualifying purchase and the reward as two independent selections.
- X is the product or group of products the customer must buy.
- Y is the product or group of products that can receive the discount.
X and Y may point to the same selection, as in “buy two T-shirts and get a third T-shirt free.” They may also differ, as in “buy a coffee machine and get 50% off selected coffee capsules.”
Define both selections before configuring the reward so products intended only to qualify the cart are not discounted accidentally.
Choose the qualifying quantity
The quantity rule should answer two questions:
- How many qualifying units are required?
- Which units count toward that number?
For “buy two, get one free,” the qualifying quantity is two and the reward quantity is one. If variants belong to the same eligible selection, decide whether different variants can contribute to the threshold.
Be equally clear about excluded items. Clearance products, gift cards, subscriptions, or already discounted variants may need to be removed from the candidate selection before quantities are counted.
Decide how the reward repeats
Repetition is where many Buy X Get Y offers become ambiguous. If a customer adds six eligible products to a buy-two-get-one promotion, should the cart receive one free item or two?
Use either a single reward per cart or a repeating reward for every complete qualifying group. Repetition can encourage larger baskets, but test higher quantities to confirm the maximum possible discount.
Determine which Y item receives the discount
When several rewarded items are eligible, define how the discounted line is chosen. Many promotions discount the least expensive eligible item. Other campaigns apply the reward only to a particular product or variant.
Consider the following cart:
| Item | Price | Role |
|---|---|---|
| Product A | $40 | Qualifying X |
| Product B | $35 | Qualifying X |
| Product C | $30 | Eligible Y |
| Product D | $20 | Eligible Y |
If one Y item is free, the selection strategy determines whether Product C or Product D receives the reward. The result should match the promotion copy shown to customers.
Add campaign eligibility
After X, Y, and the reward work correctly, add customer, subtotal, market, channel, schedule, and usage restrictions. Keep them separate from product selection so failed tests are easier to diagnose.
Test the edges of the offer
Do not test only the perfect cart. Include:
- one unit below the qualifying quantity;
- exactly one complete qualifying group;
- multiple complete groups;
- extra eligible Y products;
- a mix of eligible and excluded variants;
- an ineligible customer or market;
- the moments immediately before and after the schedule.
Also remove an X item after receiving the reward: the Y discount should disappear. In storefront copy, state the quantities, eligible products, reward, and important limitations clearly.
Build Buy X Get Y visually
DiscountLab lets merchants model qualifying selections, rewarded selections, quantities, exclusions, and conditions as readable Shopify discount workflows. For implementation details, see the Buy X Get Y examples in our documentation or review the broader guide to advanced Shopify discounts without custom code.
Found this guide useful?
