Promotional mechanics management
This article explains how to calculate refundable quantities per line item when different types of promotions are applied in Shopify, with a focus on Buy X Get Y (BuyXGetY) discounts.
Standard Promotions Management – Shopify
This article explains how to calculate refundable quantities per line item when different types of promotions are applied in Shopify, with a focus on Buy X Get Y (BuyXGetY) discounts.
Default Behavior (Standard Case)
Mandatory Return Policy for BuyXGetY
By default, when a BuyXGetY promotion is applied:
✅ Customers must return all items included in the promotion.
This means:
- Refunds are not calculated per individual item.
- The promotion is treated as a bundle.
- Partial returns are not allowed.
Optional Configuration: Discount Redistribution
The cases described below apply only if an optional configuration is enabled, allowing:
🔄 Proportional redistribution of discounts across items
This enables:
- Partial returns of items within a BuyXGetY promotion
- Fair allocation of discounts per item
- Calculation of refundable amounts per line item
General Principle (When Redistribution is Enabled)
- Identify all items belonging to the BuyXGetY promotion.
- Calculate the total price of those items.
- Calculate the total discount applied (including all promotions affecting those items).
- Determine each item's weight (proportion).
- Distribute the total discount proportionally.
- Subtract the allocated discount to get the refundable amount per item.
CASE I: Only BuyXGetY Discounts Applied
⚠️ This case represents the standard scenario, but redistribution applies only if partial returns are allowed via configuration.
Scenario
- Only BuyXGetY promotion is applied.
- No additional order-level or line-level discounts.
Order Details
- Item 1:
Price = 50€
Discount = 0€ - Item 2:
Price = 30€
Discount = 30€
Step 1: Identify Promotion Items
All items belong to the BuyXGetY promotion.
Step 2: Calculate Totals
- Total price = 80€
- Total discount = 30€
Step 3: Calculate Weight
- Item 1: 50 / 80 = 0.625
- Item 2: 30 / 80 = 0.375
Step 4: Allocate Discount
- Item 1: 0.625 × 30 = 18.75€
- Item 2: 0.375 × 30 = 11.25€
Step 5: Refundable Amount
- Item 1: 50 − 18.75 = 31.25€
- Item 2: 30 − 11.25 = 18.75€
CASE II: BuyXGetY + Order-Level Discount + Non-Promo Items
Scenario
- BuyXGetY promotion applied
- Additional order-level discount
- Some items are not part of the promotion
Order Details
- Item 1 (BuyXGetY + Order Discount):
Price = 50€
Discount = 10€ - Item 2 (BuyXGetY + Order Discount):
Price = 30€
Discount = 30€ - Item 3 (Only Order Discount):
Price = 50€
Discount = 10€
Step 1: Select Promotion Items
Items included: Item 1 and Item 2
Step 2: Totals (Promo Items Only)
- Total price = 80€
- Total discount = 40€
Step 3: Weight
- Item 1: 0.625
- Item 2: 0.375
Step 4: Allocate Discount
- Item 1: 25€
- Item 2: 15€
Step 5: Refundable Amount
- Item 1: 25€
- Item 2: 15€
Non-Promo Item
- Item 3: 50 − 10 = 40€
CASE III: BuyXGetY + Line Item Discount
Scenario
- BuyXGetY promotion applied
- Additional line-level discount on one item
Order Details
- Item 1:
Price = 80€
Discount = 0€ - Item 2:
Price = 60€
Discount = 60€
Step 1: Promotion Items
Both items belong to BuyXGetY
Step 2: Totals
- Total price = 140€
- Total discount = 60€
Step 3: Weight
- Item 1: 0.57
- Item 2: 0.43
Step 4: Allocate Discount
- Item 1: 34.28€
- Item 2: 25.72€
Step 5: Refundable Amount
- Item 1: 45.72€
- Item 2: 34.28€
Summary
| Scenario | Behavior |
|---|---|
| Default (no configuration) | All BuyXGetY items must be returned together |
| Redistribution enabled | Discounts are proportionally allocated |
| Mixed promotions | Include all discounts affecting promo items |
| Non-promo items | Calculated independently |