Build vs. Buy>Email, SMS & Push>25-Function Cap Consolidation

Hitting Shopify's 25-Function Cap: Consolidate or Buy an App?

Written by Deploi EditorialReviewed by Martin Dejnicki, Director of SEO & AI SearchUpdated September 2026Pricing verified September 2026

Consolidating wins when one Function type nears its activation cap: Shopify allows a maximum of 25 active discount functions per store (verified Sep 2026), and no app raises that ceiling. Rebuild single-rule functions as one data-driven function per type reading rules from metaobjects, a $25,000–$70,000 refactor (Deploi estimate, illustrative). Each function still runs under 256 kB of binary and 11 million instructions, so split by concern when a limit bites.

Your profile — see how the verdict shifts

VerdictBUILD (consolidate into data-driven functions, one per type) · BUY a category app only for a whole Function type you refuse to own · WAIT below 20 active
Buy score
4.2
Build score
7.8
Confidence
HighSearched the App Store sitemap for 'function-cap' and 'consolidation' and browsed the Checkout category (BeSure Checkout Rules, SMART Checkout Rules & Upsells and Payflow: COD & Checkout Rules among its listings) on 2026-09-05. No product addresses Shopify's per-type Function ceiling, and none could, because the cap applies to a merchant's own custom Functions. The 25 active discount function limit and the per-function limits of 256 kB binary, 11 million instructions, 128 kB input and 20 kB output are verbatim from shopify.dev, API version 2026-07.
Reference scenario
$20M–$100M revenue · Shopify Plus · 22 active discount functions built one per campaign · agency dev bench
As of
September 2026

Decision at a Glance

Your profileVerdictWhy
Under 10 active functions on any one typeWAITThe cap is far away. Keep one function per concern, register what is active, and retire campaign functions on their end date. No refactor yet.
10–20 active, one new function per campaignBUILDStart the consolidation before the cap forces it. One data-driven discount function reading rules from metaobjects absorbs the campaign pattern and turns each launch into a data entry.
At or within 3 of the cap, rules still arrivingBUILDThe cap is hard and the next launch is blocked. Refactor now, retire duplicates first to buy headroom, and split by concern only when a per-function limit bites.
A whole type you would rather not own, such as payment gatingBUYA category app for that type removes the sprawl from your codebase. Confirm with the vendor whether its rules are function-backed and whether they count toward your store's cap.

What 25-Function Cap Consolidation Actually Drives

OutcomeImpactHow it works
Operational efficiencyHighA new promotion becomes a metaobject entry marketing can create, instead of a function a developer deploys and someone later forgets to retire.
Revenue — indirectMediumCampaign launches stop waiting on headroom under the cap, so the promotional calendar runs on marketing's schedule rather than the deployment queue.
Data & insightMediumRules stored as data are queryable: which rules fired, which expired, which overlap, without reading 22 codebases.
Customer experienceLowRules evaluated in one function compose predictably, so buyers stop seeing two discounts stack or cancel by accident.

Spend ceiling: Size the spend to how much you will keep building on Functions. A team that ships three new rules a quarter earns the refactor back in headroom and launch speed; a team that ships one a year should retire duplicates and wait.

What buying enables (top apps)

  • + A whole rule category configured by marketing in a vendor dashboard, live this week
  • + Vendor-maintained compatibility with checkout and API version changes
  • + One less codebase for a small dev bench to own

What building additionally unlocks

  • + Headroom under the cap: dozens of rules inside one function per type, with rules as data rather than deployments
  • + Rules that compose in one place, so stacking behavior is designed rather than discovered
  • + A queryable rule registry with end dates, so the sprawl never returns

Find Your Verdict in 3 Questions

  1. Are you within 5 of the activation cap on any one Function type?

    Yes: Go to question 2.

    No: Your verdict: WAIT — keep one function per concern, keep a registry of what is active, and retire campaign functions on their end date.

  2. Do the sprawling functions share a shape, such as many near-identical discount rules?

    Yes: Your verdict: BUILD — consolidate them into one data-driven function per type reading rules from metaobjects; each launch becomes a data entry.

    No: Go to question 3.

  3. Is the sprawling type one you would hand to a vendor entirely, such as payment gating?

    Yes: Your verdict: BUY — a category app for that type, after confirming its rules are not function-backed against the same cap.

    No: Your verdict: BUILD — split by concern rather than by rule, and port the heaviest path to Rust if the 11 million instruction budget is the constraint.

The TCC Scorecard — 12 Dimensions

TCC — Total Cost of Capability: what it actually costs to have this capability over three years, whichever way you get it. Each dimension is scored 0–5 for both paths. How we score →

DimensionBuyBuildWhy
Cost
Acquisition & implementationA category app installs in a day but each rule has to be re-entered; the consolidation is a 6–12 week refactor with test coverage (Deploi estimate, illustrative).
Recurring feesTwo to four category apps at an illustrative $10–$100/month each add up; the consolidated functions carry upkeep and no subscription.
Maintenance & upgradesVendors absorb API version churn; a consolidated function needs quarterly attention and instruction-budget monitoring as carts grow.
Switching & exitRules handed to apps live in each vendor's configuration; rules stored as metaobjects survive any function rewrite and export as data.
Risk
Vendor riskEach category app is a vendor whose rules cannot see your other rules; the consolidated function has no vendor beyond Shopify.
Security & compliance surfaceEvery app adds scopes over cart, customer and order data; a Function runs inside Shopify with no external call.
Platform-deprecation exposureBoth paths sit on Functions, Shopify's sanctioned layer since Scripts stopped executing on 2026-06-30; API versions still cycle on both.
Value
Fit to requirementNo app addresses the cap itself; only a refactor does. Apps fit when you want to stop owning a whole type, not when you want headroom.
Time to marketAn app unblocks one launch this week; the refactor takes two to three months and then makes every later launch a data entry.
Performance & scaleOne function carries all rules within 11 million instructions on carts up to 200 line items, scaling above; JavaScript reaches that budget sooner than Rust, per shopify.dev.
Data ownership & AI-readinessRules as metaobjects are queryable, reportable data; rules inside four vendors' dashboards are not.
Focus & opportunity costA refactor is a quarter of a dev bench's attention, spent on plumbing; it pays back only if you keep building on Functions.

The App Landscape

AppStatusPricingBest for
Checkout rules appsCategoryThe Checkout category sells packaged validation, payment and delivery rules, including BeSure Checkout Rules, SMART Checkout Rules & Upsells and Payflow: COD & Checkout Rules. Nothing there addresses a Function cap, and each app's rules run as that vendor's own Functions. Useful only when you want to hand an entire type to a vendor.Varies by listing; budget an illustrative $10–$100/month per app and confirm on the current listingHanding one whole Function type, such as payment gating, to a vendor
Discount appsCategoryThe overflow lane most Plus teams reach for when discount functions sprawl. Before switching, confirm with the vendor whether its discounts are function-backed and whether they count toward your store's 25 active discount functions; a discount app that does cannot give you headroom.Varies by listing; illustrative $20–$300/month by order volume, confirm on the current listingCampaign mechanics you want configured by marketing, not deployed by developers
Rules-as-data consolidation (custom)Build laneOne data-driven function per Function type, reading its rule set from metaobjects or app-owned metafields, replacing a function per rule. Adding a rule becomes a data entry. Split by concern only when the 256 kB binary, 11 million instruction or 20 kB output limits bite.$25,000–$70,000 refactor plus upkeep (Deploi estimate, illustrative)Any Plus team that intends to keep building on Functions

The Build Path

  • Rules as data, one function per type: Replace a function per rule with one function per type that reads its rule set from metaobjects or an app-owned metafield namespace. Metafields above 10,000 bytes are not returned to a function, so shard large rule sets across entries.
  • Split by concern when a limit bites: Each function runs under 256 kB of compiled binary, 11 million instructions for carts up to 200 line items, 128 kB of input and 20 kB of output, with a 3,000-byte input query at cost 30 or less. Split tiered pricing from bundle logic before splitting by rule.
  • Rust for the heavy path: Shopify's docs say JavaScript functions run into instruction limits sooner than Rust. Port the hot path, then test with the CLI's function run and replay commands against logged inputs.
  • Governance so the sprawl does not return: Keep a registry of active functions per type, give every campaign rule an end date in its metaobject, and expire it automatically so the count trends down between launches.
Effort band
$25,000–$70,000 refactor (Deploi estimate, illustrative); lands in the $25–75K contact-form band
Typical timeline
6–12 weeks (Deploi estimate, illustrative), driven by how many single-rule functions exist and how much test coverage they carry
Maintenance, honestly
~15–20% of build cost per year, roughly $4,000–$14,000/yr (Deploi estimate, illustrative): API version bumps, rule schema changes, and instruction-budget monitoring as carts grow. Adding a rule is a data entry, not a deployment.
What you own — and what you take on
You own: the rule schema, every active rule as queryable data, and the headroom under the cap. You take on: the discipline to keep one function per type and the quarterly API check.

3-Year Total Cost of Capability

Buy (app path)Build (custom path)
Year 0 (setup)$1,000–$4,000 (re-entering rules, reconciling stacking)$25,000–$70,000
Years 1–3 (recurring)$2,000–$14,000$12,000–$42,000 (maintenance)
3-year total≈$3,000–$18,000≈$37,000–$112,000
Illustrative cumulative cost over 36 months$0$19k$39k$58k$78kMo 0Mo 12Mo 24Mo 36Buy (app path)Build (custom path)
Illustrative cumulative cost: the app path is cheaper in cash and pays in control. Every rule handed to a vendor is one that cannot be composed with the others inside one function, and the cap itself is untouched.
  • All figures illustrative samples for the reference scenario — not quotes, not verified pricing.
  • App path: two to four category apps absorbing overflow rules, with staff time to re-enter and reconcile them.
  • Build path: a rules-as-data refactor of 20-plus single-rule functions, three-year horizon with upkeep at 15–20% of build cost.

What the Sticker Price Hides

On the buy path

  • An app's discounts may be function-backed and count toward the same 25, so the cap moves nowhere; confirm with the vendor first
  • Rules in four vendors' dashboards cannot see each other, and stacking conflicts surface as customer complaints rather than test failures
  • Two to four apps at an illustrative $10–$100/month each is a permanent line for rules you used to own

On the build path

  • A consolidated function on a large cart can hit the 11 million instruction budget; JavaScript reaches it before Rust, per shopify.dev
  • Rule config over 10,000 bytes in one metafield is silently not returned, so shard the schema from day one
  • ~$4,000–$14,000/yr upkeep (Deploi estimate, illustrative)

What Merchants Say

Plus teams describe a discount function per campaign accumulating until the activation cap blocks the next launch, with nobody certain which of the active functions still matter.
community-reported (2026 research corpus)
Rule apps draw 1–2★ reviews when an app's discount and a custom function both fire on the same cart, stacking or cancelling in ways neither side can debug.
app-store 1–2★ review theme

If You Change Your Mind Later

If you bought and outgrow it

Every rule you handed to an app comes back only by re-entering it somewhere else, because it lives as vendor configuration. Budget staff time per app to document the rules before uninstalling, and expect the activation count to rise again the day you bring them home.

If you built and want out

The rules live as metaobjects, so a future rewrite of the function, or a retreat to an app, starts from exported data rather than from memory. Nothing is stranded, and the function itself is a compiled artifact you can delete in a minute.

When This Answer Changes

We're watching for:

  • Shopify raising the 25 active discount function limit or another type's activation cap (25 for discounts as of September 2026)
  • Changes to the 11 million instruction budget or the 256 kB binary limit, which set how much one function can absorb
  • Function tooling changes to run, replay and log streaming, which decide how debuggable a consolidated function is

Verdict change log:

No changes since first publication (September 2026).

Common Questions

How many Shopify Functions can a store activate?

Shopify's developer docs state that you can activate a maximum of 25 discount functions on each store (verified Sep 2026). Payment customizations, delivery customizations, validations and fulfillment constraints carry their own per-store activation caps on their API reference pages; confirm the current figure for your type before you architect around it. The cap counts activated functions, not the rules inside them, which is why rules-as-data is the escape.

How much logic fits in one Shopify Function?

One function runs under a 256 kB compiled binary, 11 million instructions for carts up to 200 line items, a 128 kB input and a 20 kB output (verified Sep 2026). The input query is capped at 3,000 bytes and a calculated cost of 30, and metafields over 10,000 bytes are not returned. Instructions on large carts run out first, and JavaScript reaches that budget sooner than Rust, per shopify.dev.

Should you offload overflow rules to an app instead of consolidating?

Offload only a whole Function type you no longer want to own, such as payment gating. An app's rules run as the vendor's own Functions, so confirm before switching whether its discounts are function-backed and whether they count toward your store's 25 active discount functions. A category app costs an illustrative $10–$100/month; a rules-as-data refactor runs $25,000–$70,000 (Deploi estimate, illustrative) and turns every later rule into a data entry.

Your Next Steps

If you're going with BUILD(matches your selected profile)

  1. List every active function per type with its owner, purpose and end date; retire the dead ones for immediate headroom
  2. Design the rule schema as metaobjects, sharded below the 10,000-byte metafield return limit
  3. Build one data-driven function per type and replay logged inputs against it with the CLI before switching over
  4. Measure instructions per run on your largest carts and port the hot path to Rust if the budget is close
  5. Automate rule expiry so campaign rules leave the active set without a deployment

If you're going with BUY

  1. Pick the one Function type you are willing to hand over entirely
  2. Ask the vendor whether its rules are function-backed and whether they count toward your store's activation cap
  3. Test stacking between the app's rules and your remaining functions on a staging store
  4. Diary a re-decision when the second type approaches its cap

Official Docs & Sources

Official documentation linked for verification — our verdicts and estimates are our own.

Ready to get 20 rules into one Function?

A rules-as-data refactor is a bounded Plus project: one data-driven function per type, rules in metaobjects, and the activation cap stops deciding your campaign calendar.

Contact us today

Ecommerce development at Deploi

Verdict scored for the reference scenario above. Estimates are not quotes; app pricing carries its verification date and gets re-verified quarterly. Full scoring anchors: see the TCC methodology.

Read how we score these decisions (the TCC Framework). No affiliate links, no paid placement — no app vendor pays to appear here.

No affiliate links. No paid placement. We make money building and integrating solutions — not on referral fees.