Shopify Functions

Custom Shopify Discount Functions

Custom Shopify discounts built as Discount Functions: tiered and volume pricing, BOGO, free gifts, shipping discounts and customer-specific offers.

Order summaryLinen shirtQty 3 · $45.00 each$135.00Buy more, save more15% off2 items · 10%3 items · 15%5 items · 20%Subtotal$135.00Volume discount−$20.25ShippingFreeTotal$114.75

Shopify’s built-in discounts cover a percentage off, a fixed amount, or a simple buy X get Y. The moment a promotion depends on tiers across mixed products, on who the customer is, or on what else is in the cart, you need a Discount Function: custom discount logic that runs inside Shopify’s own checkout.

What a Discount Function can do

One Function can discount three things at once: the products in the cart, the order subtotal and shipping. It can apply automatically or behind a code, and it reads the cart, the customer and your own metafields to decide what applies.

  • Tiered and volume pricing. Spend $100 and save 10%, spend $200 and save 15%. Buy three from a collection and get the cheapest free.
  • Buy X get Y and gifts with purchase, with the exclusions and caps your promotion needs.
  • Shipping discounts by cart value, product, customer tag or destination.
  • Customer-specific pricing for VIPs, members or wholesale buyers.
  • Exclusions, like keeping engraved or already-reduced items out of a sale.

Built to combine the way you intend

Discount Functions run side by side, and Shopify decides how their results stack using the combination settings on each discount. We plan that up front, so a sitewide sale, a loyalty offer and free shipping interact exactly the way you expect, with no surprise double discounts.

Settings your team controls

Hard-coded thresholds were the weak point of Shopify Scripts. We keep tiers, percentages and eligible products in settings your team can edit in the admin, so the next promotion does not need a developer.

Replacing a line item Script?

Shopify Scripts stopped running on June 30, 2026, and most line item Scripts were discount logic. A Discount Function is where that logic lives now. See our Scripts to Functions migration service for how we rebuild it, and custom bundles and add-ons if your offer is really a bundle.

What we build

01

Tiered and volume pricing

Spend-more-save-more and buy-more-save-more tiers across products, collections or the whole order.

02

BOGO and gifts with purchase

Buy X get Y and free-gift offers with the exact conditions, exclusions and caps you need.

03

Shipping discounts

Free or reduced shipping by cart value, product, customer tag or destination.

04

Customer-specific offers

Pricing for VIPs, members or wholesale buyers, based on tags, order history or metafields.

Questions, answered

What is a Shopify Discount Function?

It is custom discount logic that runs inside Shopify's checkout. One Discount Function can reduce product prices, the order subtotal and shipping, either automatically or behind a discount code.

Why not just use Shopify's built-in discounts?

Native discounts handle the common cases well. A Discount Function is for the rules they cannot express, like tiers across mixed products, pricing that depends on who the customer is, or exclusions based on product data.

How many Discount Functions can a store run?

Shopify allows up to 25 active discount functions per store. They run independently, and Shopify combines their results using the combination settings on each discount.

Do I need Shopify Plus?

For a custom Discount Function built just for your store, yes. Shopify only runs custom apps with Functions on Plus. Stores on other plans, except Starter, can use public App Store apps built on the same Discount Function API.

Can my team change the tiers without a developer?

Yes. We keep thresholds, percentages and eligible products in settings your team can edit in the Shopify admin, so a new promotion is a settings change, not a development ticket.

Ready to build a store worth talking about?

Tell us where your store is today and where you want it to go. We reply within two working days with a clear next step.

Talk to us

Email us Start a project