EzyStudio ADF

Tiered Discount

Overview

The Tiered Discount function follows the principle “the more you buy or spend, the bigger the discount.” It defines a series of escalating thresholds, and the customer automatically receives the highest tier they qualify for.

  • Discount Classes: Product, Order, Shipping
  • Billing: Pro plan and above
  • Condition Support: Reduced set — customerTag, cartSubtotal, cartTotalQuantity, market, productTag, collection

Tiered discounts are ideal for volume incentives, spending rewards, and wholesale pricing structures where you want to encourage larger orders.


Tier Types

The function supports three tier types, each measuring a different metric to determine which tier the customer qualifies for.

Tier TypeMetricScopeBest For
cartQuantity (default)Sum of all cart line quantitiesCart-wide — all eligible items receive the same tier discountVolume discounts across the entire cart
cartSubtotalCart subtotal amount (before discounts)Cart-wide — same as aboveSpending threshold rewards
lineQuantityQuantity of each individual cart linePer-line — each line is evaluated independently and may land on a different tierWholesale or per-SKU quantity breaks

Choosing the Right Tier Type

  • Use cartQuantity when you want the total number of items in the cart to determine the discount level. Example: “Buy 5+ items, get 15% off everything.”
  • Use cartSubtotal when the dollar amount matters more than the item count. Example: “Spend $100+, get 10% off.”
  • Use lineQuantity when each product should be evaluated on its own. Example: “Buy 10+ of the same SKU for wholesale pricing.” With this type, a customer buying 12 of Product A and 2 of Product B would get the 10+ tier on Product A only.

Tier Resolution Algorithm

Tiers are resolved using a simple descending-threshold algorithm:

  1. Sort all tiers in descending order by their threshold value.
  2. Walk through the sorted list and return the first tier where the measured metric is greater than or equal to the threshold.
  3. If no tier matches, fall back to the rule group’s base discount (if defined).

Example

Given tiers with thresholds at 3, 6, and 10, and a cart quantity of 7:

Tier ThresholdCart Quantity (7) >= Threshold?Result
107 >= 10? NoSkip
67 >= 6? YesMatch
3(not evaluated)

The customer receives the tier-6 discount.


Real-Life Use Cases

1. Volume Quantity Discount

Encourage customers to add more items to their cart with escalating percentage discounts.

  • Buy 2+ items: 10% off
  • Buy 5+ items: 20% off
  • Buy 10+ items: 30% off

Tier type: cartQuantity

2. Spending Threshold Rewards

Reward higher-value carts with better discounts, incentivizing customers to reach the next spending level.

  • Spend $50+: 5% off
  • Spend $100+: 10% off
  • Spend $200+: 20% off

Tier type: cartSubtotal

3. Wholesale Per-Line Pricing

Offer quantity breaks on a per-product basis, commonly used for B2B or wholesale storefronts.

  • Buy 10+ of the same item: 15% off that item
  • Buy 25+ of the same item: 25% off that item
  • Buy 50+ of the same item: 35% off that item

Tier type: lineQuantity

4. Tiered Shipping Discounts

Reduce shipping costs as the order value increases, with free shipping at the top tier.

  • Spend $50+: $5 off shipping
  • Spend $100+: Free shipping (100% off)

Tier type: cartSubtotal, Target: Shipping


Step-by-Step Setup

The following walkthrough creates a volume quantity discount with three tiers.

Step 1: Create the Discount

Navigate to Shopify Admin > Discounts > Create discount. Choose either Automatic discount or Discount code. In the app selection, pick Tiered Discount Function.

Step 2: Select the Tier Type

In the rule builder, set the tier type to Cart Quantity. This tells the function to sum all item quantities in the cart when resolving tiers.

Step 3: Define the Tiers

Add three tiers:

TierThresholdDiscount TypeValueMessage
13Percentage10%“Buy 3+ save 10%“
26Percentage15%“Buy 6+ save 15%“
310Percentage20%“Buy 10+ save 20%“

Step 4: Set a Base Discount (Optional)

You can define a base discount at the rule group level that applies when no tier is reached. For example, a 5% base discount for any cart with at least 1 item. If you do not need a base discount, you can skip this step.

Step 5: Set the Target

  • Class: Product
  • Scope: All (every item in the cart benefits from the tier discount)

Step 6: Add Conditions (Optional)

If you want to restrict the tiered discount to certain customers or products, add conditions. For example, add a customerTag condition with value ["wholesale"] to limit the discount to wholesale-tagged customers.

Step 7: Save

Click Save to activate. The function immediately begins evaluating carts against your tier thresholds.


Configuration Example

The following JSON represents a volume quantity discount with three tiers and a base discount.

{
  "version": "1.0",
  "strategy": "first",
  "ruleGroups": [
    {
      "id": "rg_001",
      "name": "Volume Discount",
      "enabled": true,
      "conditionLogic": "and",
      "conditions": [],
      "targets": {
        "product": { "scope": "all" }
      },
      "discount": {
        "type": "percentage",
        "value": 5,
        "message": "Volume discount"
      },
      "tierType": "cartQuantity",
      "tiers": [
        {
          "threshold": 3,
          "discount": { "type": "percentage", "value": 10 },
          "message": "Buy 3+ save 10%"
        },
        {
          "threshold": 6,
          "discount": { "type": "percentage", "value": 15 },
          "message": "Buy 6+ save 15%"
        },
        {
          "threshold": 10,
          "discount": { "type": "percentage", "value": 20 },
          "message": "Buy 10+ save 20%"
        }
      ]
    }
  ],
  "rejectionRules": []
}

Key Fields

FieldPurpose
tierTypeDetermines which metric is measured: "cartQuantity", "cartSubtotal", or "lineQuantity".
tiersArray of tier objects. Each has a threshold, a discount definition, and an optional message.
thresholdThe minimum value the metric must reach for this tier to activate.
discount (rule group level)The base discount applied when no tier threshold is met. Acts as a fallback.
tiers[].discountThe discount applied when this specific tier is matched. Overrides the base discount.

Message Priority

When the function builds the discount message shown to the customer, it follows this priority order:

  1. tier.message — The top-level message on the matched tier object (highest priority).
  2. tier.discount.message — A message defined inside the tier’s discount object.
  3. ruleGroup.discount.message — The base discount message on the rule group (lowest priority, used as fallback).

This allows you to set a generic fallback message on the rule group while providing specific, context-aware messages on each tier. For example, the base message might say “Volume discount” while tier-specific messages say “Buy 3+ save 10%” or “Buy 10+ save 20%”.


Tiered Shipping Discount Example

Reduce shipping costs based on order value, with free shipping at $100+.

{
  "version": "1.0",
  "strategy": "first",
  "ruleGroups": [
    {
      "id": "rg_001",
      "name": "Tiered Shipping Savings",
      "enabled": true,
      "conditionLogic": "and",
      "conditions": [],
      "targets": {
        "shipping": { "scope": "all" }
      },
      "discount": {
        "type": "fixedAmount",
        "value": 0,
        "message": "Shipping discount"
      },
      "tierType": "cartSubtotal",
      "tiers": [
        {
          "threshold": 50,
          "discount": { "type": "fixedAmount", "value": 5 },
          "message": "Spend $50+ save $5 on shipping"
        },
        {
          "threshold": 100,
          "discount": { "type": "percentage", "value": 100 },
          "message": "Free shipping on $100+"
        }
      ]
    }
  ],
  "rejectionRules": []
}

Notice that tier discount types can differ within the same rule group. The $50 tier uses a fixed amount ($5 off shipping) while the $100 tier uses a percentage (100% off, meaning free shipping).


Next Steps