Explore Folio3
Explore Folio3 Network
×

Agentic AI, computer vision, generative AI

Web, mobile, and custom software

Engineering, warehousing, analytics

Farm, livestock, and crop software

Traceability and food supply chain

EHR, telehealth, and interoperability

ERP implementation and support

Dynamics 365 and Business Central

CRM consulting and integration

B2B ecommerce, ERP integrations and migrations

Last Updated: November, 2026

We Need Custom Discount Logic That Shopify’s Native Rules Can’t Handle, Like Buy X Get Y Across Specific Collections With Member Tiers. Is That Shopify Functions Territory And What Does It Cost?

7 MIN READ

Yes, this is Shopify Functions territory if native discounts and public apps cannot express it. A Function can read cart lines, customer data and metafields, so member tiers and collection rules are possible, though custom apps need Plus. Folio3’s planning estimate is roughly $5,000 to $15,000 to build one rule, plus upkeep for API version changes. Use an app when the rule is standard and the licence costs less.

Yes, this is Functions territory, unless an app already covers it. Check native automatic discounts first, then public apps built on Functions, and build a custom Function only when neither fits. A buy-X-get-Y rule across specific collections with member tiers is a good candidate, because it combines product rules with customer data.

Cost depends on rule complexity, the admin interface you need and testing.

Native, app or custom Function

Work down the table and stop at the first row that fits.

Option Good for Limits Cost
Native automatic discount Standard buy X get Y and percentage or amount off Limited tier logic Included in the plan
Public app built on Functions Common tiered, volume and bundle rules Fixed to what the app offers Monthly licence, often under about €200 (roughly $230)
Custom Function Unique rules, member tiers and collection logic Needs Plus, a build and upkeep Build cost plus maintenance

What Functions can and cannot do for discounts

The limits matter as much as the features.

Discount Function facts
  • One Function can apply product, order and shipping discounts.
  • It reads cart lines, buyer identity and metafields on the cart, customer, company and products.
  • Discounts can combine with others, based on the stacking rules set on the discount.
  • A store can run up to 25 active discount Functions.
  • Fetching outside data is limited to custom apps on Plus, and network access must be requested.
  • Functions run independently, so they do not know about each other.

How your rule would work

Five steps turn the business rule into a tested discount.

1
Store the member tier

How: keep the tier as a customer metafield or tag that the Function can read, set by your loyalty app, CRM or ERP. Check how soon a tier change reaches checkout.

2
Define eligible collections

How: have the Function check whether each cart line’s product is in the eligible collections, or mark eligible products with a tag or metafield.

3
Apply the offer

How: the Function reads cart lines and tier, then discounts or frees the qualifying items.

4
Set stacking rules

How: decide how the discount combines with codes and other automatic discounts.

5
Test the edge cases

How: mixed carts, tier changes, partial returns and sale items.

A worked example of the rule

This is an illustration of how a rule like yours is written down, not a client rule.

Example: buy X get Y with member tiers
  • Rule: buy 2 items from Collection A and get 1 item from Collection B free, for Gold members only.
  • Tier data: Gold is stored on the customer as a tag or metafield, set by your loyalty app, CRM or ERP.
  • Logic: the Function checks the customer’s tier, counts qualifying items from Collection A in the cart, then discounts one item from Collection B.
  • Tests: a Silver member with the same cart, a cart with sale items, a tier change before checkout and a cart that also has a discount code.

What it costs and what it takes to keep it

Budget for the build and for the first year of upkeep.

Item Planning range Notes
Build, one discount Function $5,000 to $15,000 Folio3 planning estimate, depending on logic, admin interface and testing
Published reference About €24,000 for four Functions (roughly $26,000 to $28,000) Around €6,000 each (roughly $6,500 to $7,000) in one agency example. Euro figures are approximate USD conversions.
Upkeep About €800 a month (roughly $900) for four Functions in that example Covers API version updates and small logic changes
App alternative Often under about €200 a month (roughly $230) Marketplace licence for standard rules
Maintenance implications
  • Each Function is tied to an API version, and Shopify typically gives about 12 months to migrate.
  • Every deploy creates a version you can roll back.
  • Monitor behavior with the Functions logs.
  • Name an owner for future rule changes.

App or build

Choose on how standard your rule is, not on how new it sounds.

Use an app if
The rule is standard
✓
An app already offers the rule.
✓
The licence costs less than a build.
✓
You do not need custom admin screens.
✓
You can accept the app’s update pace.
Build a Function if
The rule is yours alone
✓
Tiers and collections combine in a unique way.
✓
You need your own admin interface.
✓
You want control over performance and updates.
✓
Several apps would be needed to fake it.

Rule of thumb: if you need more than one app to imitate a single rule, a custom Function is usually cheaper over a year.

How to vet an agency for custom discount logic

Four questions separate agencies that have shipped this from those that have not.

Questions to ask
  • Ask for a live example of custom discount logic and how it was tested.
  • Ask how tier data reaches checkout and how quickly a tier change takes effect.
  • Ask how stacking with codes and other automatic discounts is handled.
  • Ask who maintains the Function when Shopify changes the API version, and what that costs.

Before you ask for a quote

Having these six answers ready makes a cost range faster and more accurate.

What to prepare
  • The rule in one sentence, with the exact items that must be bought and the reward.
  • Your tier names, and the system that decides which tier a customer is in.
  • The collections involved, and whether they change often.
  • How the discount should combine with codes and other automatic discounts.
  • Your Shopify plan, since custom apps with Functions need Plus.
  • The edge cases that matter most, such as returns, sale items and tier changes.

Custom logic in practice

Easilocks (Shopify Plus, B2C and B2B)

Shopify Functions differentiate payment and delivery methods for B2B and B2C buyers on one store.

Read more: our Easilocks Shopify Plus case study

Rose Inc (Shopify, custom promotions)

A custom mini-cart with pre-checkout promo validation and bundles built as variants. Promo code redemption rose from 18 percent to 32 percent, and the custom build saved more than $500 a month in app costs.

Read more: our Rose Inc Shopify case study

Next step

Share the exact discount rule, your tiers and your collections, and our Shopify Plus development agency team will tell you whether native settings, an app or a custom Function fits, with a cost range.

Frequently Asked Questions

Do I need Shopify Plus for custom Functions?

Custom apps that use Functions or fetch external data need Plus. Public apps built on Functions work on any plan.

Can Functions handle member tiers?

Yes. A Function can read customer data and metafields, so a tier can be stored on the customer and used in the rule logic.

How many discount Functions can a store run?

Up to 25 active discount Functions per store.

How much does a custom discount Function cost?

Folio3’s planning estimate for one rule is $5,000 to $15,000 to build, depending on logic, admin interface and testing. One published agency example put four Functions at about €24,000 (roughly $26,000 to $28,000) with about €800 a month (roughly $900) for upkeep across all four. Our Shopify Plus development agency team can scope it.

When should I use an app instead?

When the rule is standard, an app covers it and the licence costs less than building and maintaining a Function.

What are Shopify Functions?

Small pieces of code that customize discount, shipping and payment logic at checkout, running on Shopify’s infrastructure.

Can Shopify do buy X get Y across collections without custom code?

Native automatic discounts handle buy X get Y on specific products or collections. Member tiers are where you usually need a public app built on Functions or a custom Function.

How do I create a custom discount in Shopify?

Check native discounts first, then public apps built on Functions, and build a custom Function only if neither fits.

Do custom discount Functions work on Basic or Advanced plans?

Public apps built on Functions work on any plan. A custom app that uses Functions, such as a bespoke member-tier discount, needs Shopify Plus.

Sources and further reading

Shopify’s own documentation is the reference for the platform limits on this page.

People Also Ask

1. What are Shopify Functions?
2. Can Shopify do buy X get Y across collections?
3. Do Shopify Functions require Shopify Plus?
4. How do I create a custom discount in Shopify?
5. How much do Shopify Functions cost to build?

NOC Folio3

Talk to Folio3

If this question maps to a live catalog, ERP or checkout constraint, Folio3 ecommerce experts can review the architecture.

Folio3 eCommerce Experts

Have a Similar B2B Commerce Challenge?

Talk to a team that's connected ERP, pricing, and inventory systems for 150+ B2B brands across Shopify Plus, BigCommerce, and Adobe Commerce.

Related Answers

Where Do You Start Migrating An Old PrestaShop Store With No Documentation?

If no one knows how your store works, book a discovery call to scope a safe route before any data moves.

Our Organic Traffic Is Still Down After Migrating To Shopify. Is It Recoverable?

If traffic has not recovered, book a discovery call to run a post-migration SEO audit on your top pages.

How Do You Migrate A High-Volume Store Without Any Downtime?

If you cannot afford downtime, book a discovery call to plan your cutover and freeze window with real order data.
.