Shopify Discount Functions: The No-Code Explainer (2026)

Discount Functions replaced Shopify Scripts as the standard way to build custom checkout logic. Here's what they are and how to build one without a developer.

Most guides to Shopify Discount Functions are written for developers with a Shopify CLI window open. This one is for the merchant who just wants the tiered discount live by Friday.

Somewhere in your app's changelog or a Shopify Partner's invoice, the phrase "Discount Function" has probably shown up attached to a price tag. That's fair, technically. Discount Functions are code. But the code already exists inside free apps that most merchants never open the documentation for, and the gap between "I need this discount live" and "I understand WebAssembly" is smaller than it looks.

What Are Shopify Discount Functions?

Shopify Discount Functions are server-side modules that calculate and apply discounts directly inside checkout, running as compiled WebAssembly instead of theme code or a script. They replaced Shopify Scripts, which stopped executing entirely on June 30, 2026. A Function receives structured data about the cart (line items, quantities, customer tags, shipping address), runs custom logic against it, and returns the discount Shopify should apply. Shopify triggers this automatically whenever the cart changes; nobody has to click a button to make it run.

There are six Function types in total, though only three deal with discounts directly, according to a developer-focused breakdown from Skai Lama:


Function type

What it discounts

Product Discount

Specific products, variants, or cart lines

Order Discount

The entire cart subtotal

Shipping Discount

Shipping rates at checkout

Cart Transform

Not a discount, merges or expands cart lines for bundles

Delivery Customization

Not a discount, reorders or hides shipping methods

Payment Customization

Not a discount, reorders or hides payment methods

The distinction matters because it's easy to see "Discount Function" everywhere and assume it's one monolithic thing. It's three separate discount scopes, plus three adjacent Function types that get bundled into the same conversation because they run on the same underlying infrastructure.

Discount Functions vs. Scripts vs. Native Discounts

Shopify has offered three different ways to build a discount, and only one of them is still fully alive.



Native Discounts

Shopify Scripts

Discount Functions

Coding required

None

Ruby

None, if using an app

Plan required

Any

Plus only

Any, via public app

Status

Active

Deprecated June 30, 2026

Active, the current standard

Logic complexity

Basic, one condition per discount

Advanced, multi-variable

Advanced, multi-variable

Runtime

Standard

Sandboxed Ruby

WebAssembly, sub-5ms

Native discounts have always been the easiest path and the most limited one: a single condition, a single action, no branching logic. Scripts filled that gap for a decade until Shopify shut them down. Discount Functions are the permanent replacement, and the part most coverage buries is that a merchant on any Shopify plan, not just Plus, can install a public app built on Functions and get Script-level logic without writing anything.

Do You Need a Developer to Build One?

No. A growing set of free apps compile visual, drag-and-drop rules straight into Discount Functions, with no Shopify CLI, no GraphQL mutation, and no repo. Discount Functions Flow from Subscribfy is one of them, and it's free rather than a monthly-fee tool: a canvas where you connect a Start node to Condition nodes (cart subtotal, item count, line quantity, product tag, product vendor, collection, variant SKU, delivery country, customer segment, customer tag, order count) combined with AND, OR, or NOT, then route to an action: percentage off, fixed amount off, free shipping, or buy X get Y. Save it, and the flow writes into the same discount object native Shopify discounts use.

The tradeoff runs the other direction from what people expect. A custom Function, built by a developer from scratch, costs somewhere between $2,000 and $10,000 once the logic gets genuinely complex: B2B pricing matrices, multi-zone shipping rules, payment gating. A no-code flow builder covers the much larger set of cases that just need conditions stacked cleanly: tiered spend thresholds, VIP tag discounts, market-specific shipping. Most merchants asking "how do I build a Discount Function" are describing the second category and getting quoted for the first.

Install Discount Functions Flow free from the Shopify App Store and test that claim against your own catalog before paying anyone for a custom build.

The Stacking Rule Almost Nobody Explains Correctly

Each Discount Function used to run in isolation, unaware of any other Function targeting the same product, until Shopify changed that in July 2026. For over a year after Functions replaced Scripts, this was the single biggest behavioral gap merchants hit during migration: a loyalty discount and a promotional discount could no longer both land on the same line item the way they could inside one Ruby Script. Shopify decided which discount won using a strategy (FIRST, MAXIMUM, or ALL), and for product-level discounts, only one could apply per item.

That changed on July 15, 2026, when Shopify shipped native support for combining multiple product discounts on the same item: overlapping promotions without cart conflicts or manual workarounds. If a migration guide you're reading describes the old one-discount-per-line-item ceiling as a permanent limitation, it's describing a Shopify that no longer exists. Worth checking the combination settings on any Function-based discount before assuming it can't stack.

Shopify's discount combination limits still apply on top of this: a maximum of 25 active automatic discounts per store, and customers can use up to 5 product or order discount codes plus 1 shipping code on a single order. Those ceilings rarely bind for a typical DTC catalog, but they're worth knowing before building a promotion calendar that assumes unlimited stacking.

Building a Tiered Discount Without Writing Code

A tiered order discount (5% off over $100, 10% over $250, 15% over $500) is the single most requested Discount Function among merchants migrating off Scripts, and it takes four steps in a no-code flow.

  1. Choose the Order discount class, since the rule targets the cart subtotal rather than individual products.

  2. Add three Condition branches on Cart Subtotal, one per threshold, connected with OR logic so only the highest qualifying tier fires.

  3. Set each branch's action to Percentage Off at the matching rate.

  4. Save. The flow becomes a live discount in Shopify Admin, editable and versioned without ever touching the Script Editor that no longer exists.

Compare that to the code path: scaffolding a Product Discount extension with the Shopify CLI, writing the run.js or run.ts logic, defining the GraphQL input query, deploying the app, then activating it through a discountAutomaticAppCreate mutation. Both roads reach the same Function running on the same infrastructure. One of them requires knowing what a mutation is.

Frequently Asked Questions

Is a Shopify Discount Function the same as a Shopify Script?

No. Scripts were Ruby code exclusive to Plus stores, and Shopify stopped executing them on June 30, 2026. Discount Functions are their replacement: compiled WebAssembly, available to any plan through a public app, and the current standard going forward.

Can I build a Discount Function without hiring a developer?

Yes, for the majority of common use cases: tiered pricing, BOGO, VIP tag discounts, shipping promos by country or spend. Free and paid apps built on Functions handle these through a visual interface. Genuinely custom logic involving external data lookups still needs a developer, since Functions can't make network calls at runtime.

Can two Discount Functions apply to the same product at once?

As of Shopify's July 2026 update, yes. Multiple product discounts can now combine on the same line item, reversing the one-discount-per-item ceiling that defined the first year of the Functions era. Combination settings still need to be enabled on each discount.

How many automatic discounts can run on one store?

Up to 25 active automatic discounts at once, including app-based ones. Customers can apply up to 5 product or order discount codes and 1 shipping discount code to a single order.

Try It on Your Store

Discount Functions Flow is free to install from the Shopify App Store. No trial clock, no plan upgrade to unlock conditions. Start from a template or a blank canvas and the first flow is usually live in under ten minutes. If the logic you're replacing is genuinely custom, the kind that would otherwise mean a developer quote, grab time with the Subscribfy team and we'll figure out the right approach together.

Subscribfy builds this the same way it builds its membership platform: checkout-native, no redirects, nothing sitting outside Shopify's own infrastructure that a future deprecation could break. It's the same lesson the team learned running paid membership at Adore Me for a decade before Victoria's Secret bought it. The mechanics only matter if they still work five years from now.

Image

Book a meeting with our sales team now!

Create predictable revenue from the customers you already have.