Scripts to Functions

Once we factor in ongoing maintenance (not just the initial build), does a custom Shopify Function ever actually beat a third-party discount app's subscription cost over 2-3 years?

Short answer

A custom Shopify Function, code Shopify runs at checkout, does not beat a discount app's three-year cost on one common rule. Deploi's Scripts-to-Functions record puts an illustrative three-year build cost, upkeep included, at $7,250 to $40,000, against $1,800 to $16,700 on apps (Deploi record, October 2026). So stacking closes the gap: the same record finds two or three app subscriptions close it around year three.

Record estimate, 3-year custom Function
$7,250 to $40,000Scripts-to-Functions record: $5,000 to $25,000 from audit through cutover, plus upkeep at 15 to 20% of build cost a year; illustrative, not a quote.Source: Deploi Build vs. Buy (Should You Build or Buy Your Shopify Scripts-to-Functions Migration?)
Record estimate, 3-year app path
$1,800 to $16,700Scripts-to-Functions record: $0 to $500 of setup plus one to three rule-app subscriptions; stacked subscriptions close the gap around year three.Source: Deploi Build vs. Buy (Should You Build or Buy Your Shopify Scripts-to-Functions Migration?)
Record estimate, one new rule, 3 years
$12,500 to $40,000 build vs. $860 to $3,800 appCustom discount types record: one new discount Function with settings against a mid-tier packaged app; illustrative, not a quote.Source: Deploi Build vs. Buy (Should You Build or Buy Custom Discount Types on Shopify Plus?)
Function API version support
At least 12 months per versionShopify releases a new API version every three months; a Function left on an unsupported version is removed from all merchant stores.Sources: Shopify developer docs (About Shopify API versioning, Monitoring and handling errors in production)

Deploi’s call

Rarely: on three-year cost alone, a discount app beats a custom Shopify Function for most common rules, and below an order-priced app's top plan it is not close. Cost alone almost never justifies the build, because upkeep and alerting land on the build side too.

BuyKeep the app subscription when

  • The rule fits one app, such as Dealeasy, which tops out at $29 USD a month for 1,000 or more orders (Dealeasy listing, October 2026).
  • One builder subscription can hold the whole rule set, such as SMART Functions Creator's Pro plan at $39.99 USD a month (SMART Functions listing, October 2026).
  • Nobody will fund the alerting a custom Function needs.

BuildBuild the Function when

  • Over three years, the margin an app leaks by approximating your rule would exceed the build's illustrative $7,250 to $40,000 (Deploi Build vs. Buy, October 2026).
  • Two or three order-priced subscriptions would cost more by year three than one custom Function covering the same rules.
  • The pricing logic is itself your competitive advantage.

Basis: Should You Build or Buy Your Shopify Scripts-to-Functions Migration?, our Build vs. Buy decision record, scored BUILD.

What do a custom Function and a discount app cost over three years?

Deploi's Scripts-to-Functions record puts an illustrative $7,250 to $40,000 on three years of a custom Shopify Function, code Shopify runs at checkout, upkeep included. Its illustrative app path costs about $1,800 to $16,700 over the same three years (Deploi Build vs. Buy, October 2026). Who builds it is the in-house or agency staffing decision.

A custom Function costs more than the app path at both ends of the record's three-year range
Cost lineApp path, record estimate (illustrative)Custom Function, record estimate (illustrative)
Year 0$0 to $500 of configuration and testing time$5,000 to $25,000, audit through tested cutover
Years 1 to 3$1,800 to $16,200 for one to three rule-app subscriptions$2,250 to $15,000 of upkeep
Three-year totalAbout $1,800 to $16,700About $7,250 to $40,000
Source: Deploi Build vs. Buy (Should You Build or Buy Your Shopify Scripts-to-Functions Migration?). Verified October 8, 2026.Illustrative record estimates for a Plus store porting its old Shopify Scripts rules, not quotes. The record states no currency.

One common rule costs far less on an app. Dealeasy, a volume discount app, is free up to 50 orders a month, then $9 to $29 USD a month as orders rise (Dealeasy listing, October 2026). At $29 a month, three years cost $1,044 (Deploi arithmetic), so no custom build competes for that rule. A new discount Function starts higher than a port: see what an agency charges to build one.

When does a custom Function overtake the app subscriptions?

A custom Shopify Function overtakes the app path in four cases, and dropping one subscription is rarely one of them.

  1. One rule set needs several subscriptions. Deploi's Scripts-to-Functions record, which prices porting old Shopify Scripts, warns that "One Script often becomes two or three subscriptions." Such stacks "close the gap around year three" (Deploi Build vs. Buy, October 2026). One no-code Function builder can hold several rules instead: SMART Functions Creator's Pro plan runs unlimited active functions for $39.99 USD a month (SMART Functions listing, October 2026).
  2. The app prices on the orders it discounts, and you are growing. Regios Automatic Discounts runs from $34.99 a month for up to 500 discounted orders to $249.99 a month for unlimited orders, in USD (Regios listing, October 2026). Three years on the top plan cost $7,500 to $9,000 (Deploi arithmetic), level with the record's cheapest build.
  3. The app cannot express the logic. Deploi's Scripts-to-Functions record warns that "Preset builders flatten stacked logic, and the near-miss shows up as margin leakage, not an error message." That leak, not the subscription, can exceed the build cost, because it lands on every order the app gets wrong.
  4. The rule is a competitive asset. In our judgment, pricing logic nobody else can copy is not a cost line at all.

What does a custom Function cost to maintain after launch?

A custom Shopify Function costs about 15 to 20% of its build cost a year to maintain in Deploi's Scripts-to-Functions record, before any alerting (Deploi Build vs. Buy, October 2026). Two cost lines make up the bill:

  • Upkeep. The record's illustrative share covers API (application programming interface) version upgrades and re-testing when promotions change, so it recurs every year the Function runs. Values hardcoded into a Function add a deploy to every routine change, as a shipping Function that needs a deploy for every new location shows.
  • Alerting. Shopify's monitoring guide describes no merchant-facing alert (Shopify monitoring guide, October 2026), and Deploi's observability record found no App Store app that monitors Function runs. The record puts alerting at an illustrative $12,000 to $40,000 in year zero and $5,000 to $12,000 a year. That band covers two or three live Functions, so one Function costs less (October 2026).

What does a discount app cost beyond its subscription?

A discount app costs more than its subscription, because the vendor holds your rule and your exit path.

  • Vendor risk on a pricing path. In our judgment, an app that changes its pricing model or gets acquired turns into a checkout migration.
  • Configuration you do not own. A packaged app's campaign settings live in the vendor's admin, and "the discounts a packaged app created stop when the app is removed" (Deploi Build vs. Buy, October 2026).
  • An exit you cannot export. Deploi's Scripts-to-Functions record warns that app-side rules leave as screenshots, and "re-porting later means re-specifying from scratch" (Deploi Build vs. Buy, October 2026).

When should you not build a custom Function to save money?

Deploi’s point of view

Our own position, from building on Shopify. Kept apart from the sourced facts above.

What we’ve seen
The build cases that pay back are the ones where somebody could name the margin the app was leaking. The build cases that disappoint started from "we do not want another subscription," which is a preference, not a business case.
Where we disagree
Build-versus-buy content on this topic compares build cost against subscription cost and stops. The comparison is incomplete without the alerting line on the build side and the near-miss line on the buy side, and in our judgment those two are usually larger than the difference being argued about.
What this page adds
The actual three-year totals from Deploi's own records on both paths, the price bands common discount apps sit in, and the four named cases in which a build overtakes the subscriptions. The parent answers a staffing question; this page prices it.

When this answer changes

  • Deploi re-scores its Scripts-to-Functions or custom discount types record, or their illustrative three-year totals move.
  • Order-priced discount apps change their tiers: Regios runs $34.99 to $249.99 and Dealeasy $9 to $29 USD a month as of October 2026.
  • SMART Functions Creator changes its Pro plan, $39.99 USD a month for unlimited active functions as of October 2026.
  • Shopify changes the Function API support window, at least 12 months per version as of October 2026.
  • Shopify adds a merchant-facing alert for failing Functions, which would cut the alerting line on the build side.

Related questions

This follows from Who actually builds custom Shopify Functions? Do we need an in-house developer or can an agency do it?

More in Scripts to Functions

Sources

Every figure on this page traces to one of these. Official and vendor pages are checked on the date shown; Deploi records are our own published decisions.

  1. Shopify developer docs, About Shopify Functionsshopify.dev · checked October 8, 2026
  2. Shopify developer docs, Monitoring and handling errors in productionshopify.dev · checked October 8, 2026
  3. Shopify developer docs, About Shopify API versioningshopify.dev · checked October 8, 2026
  4. Logbase, Dealeasy: Volume Discounts App on the Shopify App Storeapps.shopify.com · checked October 8, 2026
  5. SMART Functions, SMART Functions Creator on the Shopify App Storeapps.shopify.com · checked October 8, 2026
  6. Regios Technologies, Regios Automatic Discounts on the Shopify App Storeapps.shopify.com · checked October 8, 2026
  7. Deploi Build vs. Buy, Should You Build or Buy Your Shopify Scripts-to-Functions Migration?deploi.ca · checked October 8, 2026 · Deploi research
  8. Deploi Build vs. Buy, Build or Buy Observability for Checkout Functions on Shopify?deploi.ca · checked October 8, 2026 · Deploi research
  9. Deploi Build vs. Buy, Should You Build or Buy Custom Discount Types on Shopify Plus?deploi.ca · checked October 8, 2026 · Deploi research