Skip to main content
A volume discount bundle rewards customers for buying more: the discount grows as they cross quantity or spend thresholds. For example, “Buy 3, save 10% · Buy 6, save 20%”. Appstle applies the best matching tier automatically. This guide covers running a volume discount bundle from your own storefront UI. You use the same metafield, cart-line attributes, and Shopify Function that Appstle’s built-in widget uses — only the UI is yours. Read the headless overview first for the automatic-discount model.

How pricing works

The tiers live in the rule’s tieredDiscount field as a JSON-encoded string. Parse it into an array of tier objects: Tier selection — Appstle evaluates every qualifying tier and applies the one with the highest discount:
  1. Among QUANTITY tiers, keep those where cartQuantity ≥ value.
  2. Among AMOUNT tiers, keep those where subtotal ≥ value.
  3. From all qualifying tiers, apply the one with the largest discount.

Step 1 — Read the rule and parse the tiers

Read the active rules from the appstle_bundles.bundle_rules shop metafield — the Shopify-native source, with no call to Appstle’s servers (see Reading bundle configuration). Filter to volume discount bundles by bundleType, then parse the tieredDiscount JSON string.
Fields you need:

Step 2 — Render the tier ladder

Build your own UI from the parsed tiers:
  • Show the ladder (e.g. “Buy 3 → 10% off · Buy 6 → 20% off”) using value, discount, and the optional labels.
  • Track the running quantity and subtotal, highlight the tier the customer currently qualifies for, and nudge them toward the next one.

Step 3 — Add to cart

Add the eligible variants with the bundle attributes. For volume discount, _appstle_bundles_type is VOLUME_DISCOUNT.

Tier restriction (optional)

When the merchant enables tier restriction, the discount is pinned to one explicitly chosen tier rather than auto-selecting the best qualifying one. In that mode, also attach the selected tier’s identifier:
Only attach _appstle_bundle_combo_id when tier restriction is enabled for the bundle. Without restriction, omit it and the Function applies the best qualifying tier automatically.

Step 4 — Discount applies automatically

Appstle’s automatic discount evaluates the qualifying tiers against the cart and applies the best one (or the pinned tier, under restriction) in cart and checkout. As the customer adds or removes quantity, the applied tier updates automatically — no calls from your side.

Previewing the discount

Replicate the best-tier selection for a live preview (cart prices in cents):
This preview is display-only. The Shopify Function applies the authoritative discount at checkout from the same tiers, so they agree as long as you read tieredDiscount from the live rule.

Checklist

1

Bundle is Active in the Appstle admin

2

tieredDiscount parsed from its JSON string

3

Every line carries _appstle-bb-id and _appstle_bundles_type = VOLUME_DISCOUNT

4

_appstle_bundle_combo_id attached only when tier restriction is enabled

5

Verify the applied tier in the cart matches your preview

Next steps

Fixed pricing bundle

Sell a curated set for one fixed price.

Dynamic pricing bundle

Build-your-own with a percentage or amount discount.