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.
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
Tiered and volume pricing
Spend-more-save-more and buy-more-save-more tiers across products, collections or the whole order.
BOGO and gifts with purchase
Buy X get Y and free-gift offers with the exact conditions, exclusions and caps you need.
Shipping discounts
Free or reduced shipping by cart value, product, customer tag or destination.
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.
Further reading
- Shopify Functions vs. apps: when to build custom back-end logic Functions, a custom app, or an off-the-shelf app? A practical guide to choosing the right way to change how your Shopify store behaves, at checkout and beyond.
- Shopify Scripts are gone. Here is what replaces them Shopify Scripts stopped running on June 30, 2026. Here is what replaced line item, shipping and payment Scripts, and how to rebuild them as Shopify Functions.
Related services
Bundles and Add-ons
Product bundles, kits and paid add-ons that stay correct through cart, checkout and fulfillment.
Learn moreScripts to Functions Migration
Rebuild the discount, shipping and payment logic your Shopify Scripts used to run, as supported Shopify Functions.
Learn moreShopify Functions Development
Custom back-end logic for discounts, payments, delivery and validation, built on Shopify Functions.
Learn moreReady 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.