To migrate Shopify Scripts tiered discounts, document the old rule’s eligibility, thresholds, targets, exclusions, and stacking behavior. Then recreate it with a Shopify Functions app or custom Function, test every threshold and mixed-cart edge case, and confirm that storefront messaging matches checkout.
Shopify Scripts stopped executing on June 30, 2026. If your store previously used a line item script for rules such as “buy 3, save 10%; buy 5, save 15%,” that promotion now needs a Shopify Functions replacement.
The goal is not to translate old Ruby line by line. A successful Shopify Scripts migration for tiered discounts starts by documenting the business rule, then rebuilding it with a Functions-based app or a custom Function, testing the new calculation, and checking the customer-facing message from product page to checkout.
This guide gives Shopify merchants a practical migration process, including a worked tier example and a launch checklist.
Which guide should you use? Use this article when replacing a retired Shopify Script. If you are building a new cart-value campaign, read how to create tiered discounts on Shopify. For unit-based offers, use the guide to Shopify quantity breaks and volume discounts.
What changed after the Shopify Scripts sunset?
Shopify Scripts were Ruby programs created in the Script Editor app. Line item scripts could change prices based on cart contents, product tags, quantities, customer information, and other conditions. That made them useful for bulk discounts and tiered promotions, but Scripts were limited to Shopify Plus.
As of June 30, 2026, Shopify has deprecated Scripts and deactivated any that remained published. Shopify’s supported replacement is Shopify Functions. Functions run inside Shopify’s commerce platform and are delivered through apps. A merchant can either:
- install an existing app built with Shopify Functions; or
- have a developer build and maintain a custom Functions-based app.
For current discount development, Shopify provides a unified Discount Function API. One discount can produce product, order, and shipping savings, depending on its configuration. Shopify explicitly lists tiered discounts based on qualifying items, subtotal, and delivery requirements as a Function use case.
Start with the old outcome, not the old code
Your retired script is useful evidence, but it should not be the new specification. Before choosing a replacement, rewrite its behavior in plain language. If you are designing a new order-value campaign rather than reproducing an old rule, start with the separate guide to create tiered discounts on Shopify.
For each promotion, record:
- Trigger: quantity, eligible subtotal, customer, product, collection, market, selling plan, or another condition.
- Tiers: the exact threshold and reward at every level.
- Scope: which products or cart lines qualify and which are excluded.
- Counting rule: whether quantity is counted per variant, per product, across a collection, or across the full cart.
- Reward rule: percentage off, fixed amount off, free gift, order discount, or shipping discount.
- Tier behavior: whether only the highest earned tier applies or rewards accumulate.
- Combination rule: which product, order, and shipping discounts may combine.
- Customer message: what appears on the product page, in the cart, and at checkout.
- Exceptions: subscriptions, gift cards, sale items, B2B customers, POS, draft orders, and multi-currency carts.
For example, “bulk discount for coffee” is too vague. A migration-ready rule looks like this:
Count eligible coffee bags across the selected collection. Apply 10% to those bags at 3–5 units, 15% at 6–8, and 20% at 9 or more. Apply only the highest tier. Exclude subscriptions and gift cards. Allow the product discount to combine with an eligible shipping discount.
That description is clear enough to configure in an app, hand to a developer, and turn into test cases.
Choose an app or a custom Shopify Function
Both routes use Shopify Functions, but they fit different operating needs.
Use a Functions-based discount app when
- your tiers use common quantity, product, order-value, gift, or shipping conditions;
- a merchant needs to change thresholds without a developer;
- product-page and cart messaging are part of the offer;
- you want vendor support and an admin interface; or
- the cost and maintenance of a custom app are hard to justify.
Before installing, verify the app’s actual support for your counting method, exclusions, discount combinations, sales channels, subscription behavior, markets, and storefront messaging. “Tiered discounts” can describe several different calculations.
Build a custom Function when
- eligibility depends on store-specific data or unusual cart attributes;
- the rule cannot be represented safely in an existing app;
- your team can own development, tests, API-version upgrades, monitoring, and merchant configuration; or
- the logic is strategically important enough to justify custom maintenance.
A custom build is an application project, not a snippet pasted into Shopify admin. Shopify states that Functions are installed as part of an app. The function receives the cart data requested by its input query and returns discount operations for Shopify to evaluate.
For most merchants replacing a conventional quantity or spend ladder, evaluating a Functions-based app first is the shorter path. Escalate to a custom build only when the documented rule proves that you need it.
Map a tiered discount to Shopify Functions
Think of the replacement as four layers.
| Layer | Migration question | Example |
|---|---|---|
| Input | What must the discount read? | Cart-line quantity, product or collection identity, price, selling plan |
| Qualification | Which tier has the cart earned? | 3–5 units = 10%; 6–8 = 15%; 9+ = 20% |
| Output | What receives the discount? | Eligible coffee-bag cart lines |
| Presentation | How does the shopper understand it? | Tier table on product page and “Add 1 more for 15% off” in cart |
The current Discount Function API can read cart context including lines, quantities, prices, and buyer identity, then return operations that add product or order discounts. A custom implementation can store merchant-configurable tiers in app-owned data rather than hard-coding every threshold.
The important merchant decision is whether the reward applies to eligible products or the order subtotal. A product tier discounts only the qualifying lines. An order tier can reward the whole eligible order once a subtotal is reached. Do not switch between these models during migration without checking the margin impact.
Also define the selection behavior. If a cart qualifies for 10%, 15%, and 20%, most tier ladders should apply only the best earned tier. Accidentally accumulating all three would turn a planned 20% discount into a much larger giveaway.
A worked Shopify Scripts replacement example
Suppose the retired line item script gave a percentage discount based on the total number of eligible skincare products. Merchants building a new unit-based offer can use the step-by-step guide to Shopify quantity breaks and volume discounts; the steps below focus on migration equivalence.
- 2–3 items: 10% off eligible products;
- 4–5 items: 15% off eligible products;
- 6 or more items: 20% off eligible products.
The replacement process is:
- Define eligibility. Choose the products or collection and document whether variants are pooled. Exclude gift cards and any selling plans that should not participate.
- Define thresholds. Store the three quantity ranges and percentage values in the app configuration.
- Define the winner. Return the single highest tier earned by the eligible quantity.
- Target eligible lines. Apply the product discount only to qualifying skincare items, not unrelated products in the cart.
- Set combinations. Decide whether the product discount can combine with order or shipping discounts and configure the discount accordingly.
- Add messaging. Display the tier ladder before purchase and show progress toward the next tier in the cart.
- Test boundaries. Verify carts with 1, 2, 3, 4, 5, and 6 eligible items, then repeat with an excluded item and another discount.
This is a functional equivalent only if the old script used the same eligibility, quantity pooling, targeting, and combination behavior. Compare outputs from historical examples rather than relying on the tier labels alone.
Rebuild with Multiscount when the rule fits
Multiscount: Tiered Discounts is built with native Shopify Functions and supports volume discounts, order goals, free gifts, and shipping discounts. Its App Store listing also describes product-page and cart widgets, checkout messaging, discount stacking, and tiered product and order discounts.
That makes Multiscount a natural option for common Script replacements such as:
- quantity breaks on selected products;
- product discount tiers;
- order-value discount tiers;
- gift tiers;
- shipping rewards; and
- customer-facing promotion widgets.
It does not create draft orders during the discount process. Still, do not assume that any app reproduces a custom script automatically. Compare your migration specification with the app’s current settings, test every exception, and contact support when the old logic has an unusual condition.
If your promotion fits the supported model, configure one rule at a time. Start with the eligible products or order scope, add thresholds and rewards, choose combination behavior, then make the storefront message match the calculation.
Test the new discount before you call the migration complete
A tier table that looks correct is not enough. Build a test matrix from the rule specification.
Threshold tests
Test immediately below, exactly at, and immediately above every threshold. For a 3/6/9-unit ladder, include quantities 2, 3, 5, 6, 8, and 9. Confirm both the rate and the cart lines receiving it.
Eligibility tests
Mix eligible and excluded products. Check variant pooling, collections, sale items, gift cards, subscriptions, customer segments, and any tag- or metafield-driven conditions.
Combination tests
Shopify discount Functions run concurrently and do not know the output of other discount Functions. Shopify applies the candidates according to the combination and stacking rules configured on their discount nodes. Test every combination you intend to allow instead of assuming one discount can react to another.
Channel and checkout tests
Test the Online Store, accelerated checkout, mobile cart, and any other channel you promise to support. Shopify’s current Function documentation marks some surfaces—including parts of draft orders, order editing, pre-orders, and recurring subscription orders—as partial or unsupported. Check the current compatibility table for your specific use case.
Presentation tests
The displayed tier must agree with the checkout result. Verify:
- the product-page tier table uses the same thresholds as the Function;
- cart progress updates after quantity and product changes;
- excluded items do not create false progress;
- the discount title is understandable at checkout; and
- removing an item correctly removes or lowers the reward.
Performance and monitoring
Test during a realistic cart flow and record screenshots or expected totals for regression checks. After launch, monitor discount usage, average order value, gross profit, conversion, support tickets, and unusually large discount amounts. A technically correct tier can still be commercially unprofitable.
Use a safe cutover sequence
Because Scripts have already stopped executing, stores with an unresolved migration should treat the gap as a live promotion issue. Use this cutover sequence:
- Export and review the Shopify Scripts customizations report. Shopify keeps a report of the customizations that were active before deprecation, including source links and suggested Function resources or apps.
- Prioritize active promotions. Remove rules you no longer need instead of rebuilding everything by default.
- Write the migration specification. Capture triggers, tiers, scope, exclusions, combinations, and messages.
- Choose the implementation. Evaluate a Functions-based app against the specification before commissioning custom work.
- Configure in a safe environment. Use a development store or controlled promotion where possible.
- Run the full test matrix. Save expected and actual totals for every important case.
- Confirm analytics and support ownership. Decide who watches redemption, margin, and customer reports after launch.
- Launch and verify a real checkout. Check that the live discount and storefront message agree.
Do not keep a duplicate replacement active as a “backup.” Two overlapping discounts can create a different result from either rule on its own.
Common migration mistakes
- Translating Ruby instead of documenting behavior: Old code can contain obsolete exceptions and hidden assumptions.
- Counting the wrong items: Per-variant quantity, per-product quantity, and pooled collection quantity produce different tiers.
- Discounting the whole order by accident: A product-specific Script replacement should not silently become an order-wide reward.
- Stacking tiers: Apply the intended winning tier unless the promotion explicitly promises cumulative rewards.
- Ignoring combinations: A correct standalone discount can behave differently alongside product, order, or shipping offers.
- Forgetting storefront messaging: Shoppers cannot aim for a tier they cannot see, and inaccurate progress damages trust.
- Skipping margin checks: Rebuilding an old rule is a chance to confirm that its thresholds still make economic sense.
- Assuming every checkout surface behaves identically: Validate the channels, subscription flows, and order types your store actually uses.
Shopify Scripts migration checklist for tiered discounts
- [ ] Export and review the Scripts customizations report.
- [ ] Decide which retired rules still deserve a replacement.
- [ ] Document triggers, thresholds, rewards, targets, exclusions, and combinations.
- [ ] Choose a Functions-based app or a maintained custom app.
- [ ] Rebuild one promotion at a time.
- [ ] Match storefront and checkout messaging to the real calculation.
- [ ] Test below, at, and above every tier.
- [ ] Test mixed carts, excluded products, currencies, subscriptions, and discount combinations.
- [ ] Verify the live checkout result on supported channels.
- [ ] Monitor redemption, gross profit, conversion, and support issues after launch.
Rebuild the rule—and make it easier to operate
The end of Shopify Scripts is not only a code migration. It is an opportunity to turn undocumented promotion logic into a rule that merchants can understand, test, and measure.
Start with the outcome your old script produced. Specify every threshold and exception, choose the simplest Functions-based implementation that reproduces it, and verify the result at the edges. If your retired Script used conventional product, order, gift, or shipping tiers, evaluate Multiscount on the Shopify App Store as a no-code, Shopify Functions-based replacement path.
Install Now