What does it realistically cost to have an agency build a custom Shopify Function for one discount use case?
No published figure exists. Here is the honest answer.
No published market rate exists for one custom Shopify Function. The Shopify Partner Directory publishes no hourly rates or budget bands (verified September 2026). Deploi's own Scripts-to-Functions record puts $5,000 to $25,000 on an audit-through-cutover for a one-to-six-rule inventory, illustrative and not a quote. Price the rule, not the word Function.
Why this page declines to publish a number
The Shopify Partner Directory lists partners by service, location and tier (Select, Plus, Premier, Platinum) and publishes no rate cards, no budget bands and no starting prices. Its instruction is "Communicate directly with the partner, set your project terms" (verified on shopify.com/partners/directory, September 2026).
So there is no market rate to report. Any article giving you one invented it or averaged a handful of anecdotes. We will give you our own illustrative band, clearly labelled, and then give you the thing that is more useful: the five variables that move a quote by an order of magnitude.
Deploi's own published band, with its label attached
Our Scripts-to-Functions decision record puts $5,000 to $25,000 on the whole path from audit through parity-tested cutover for a typical one-to-six-rule inventory, with an estimated 2 to 6 weeks to full cutover after the audit, and annual maintenance at roughly 15 to 20% of build cost (Deploi decision record, illustrative, September 2026). A single discount rule sits at the bottom of that band, not the middle.
That is a Deploi estimate from a small sample of engagements. It is not an average, not a quote and not a statement about what any other agency charges.
The five variables that actually set the price
1. How many facts does the rule read? A rule that reads line quantity is cheap. A rule that reads customer tags, product tags, a metafield table, the market and the delivery method is five integrations of context, each of which can be missing on some orders. Shopify caps the input query at 3,000 bytes excluding comments and rejects list-type field arguments over 100 elements (per shopify.dev, September 2026), so the fact-gathering has a hard ceiling that scoping has to respect.
2. How does it interact with other discounts? Stacking, precedence and mutual exclusion is where the hours go. A rule described in one sentence often needs four sentences about what happens when it collides with a code, an automatic discount and a B2B catalog price.
3. Does it need configuration, or are the numbers hardcoded? A Function with the tiers baked in is cheaper to build and more expensive forever, because every tier change is a deploy. A Function reading its tiers from metafields costs more once and turns every future change into a merchandising edit. This single decision moves both the quote and the three-year cost more than any other.
4. Cart size and language. Shopify's limits are dynamic up to 200 line items, with 11 million instructions, 128 kB input and 20 kB output (per shopify.dev, September 2026). Shopify recommends Rust and warns that JavaScript hits instruction limits sooner. A rule that must survive a 200-line wholesale cart is a different engineering problem from one that runs on a three-line D2C cart.
5. What ships alongside it. A Function with no observability is cheaper and is not finished. Shopify stores run data in the Dev Dashboard, truncates logs at 1 kB and ships no merchant-facing alert (per shopify.dev, September 2026). Our observability record scores that work CUSTOMIZE at $12,000 to $40,000 in year zero (Deploi decision record, illustrative, September 2026). Ask every quote whether it includes this. Most do not.
What a quote should itemize
- Discovery and rule specification, written down and signed off.
- The Function itself, with the language named and the reason.
- Configuration surface: hardcoded, metafield-driven, or an admin UI.
- Parity or acceptance testing against named scenarios, including the collision cases.
- Staged rollout plan.
- Logging, alerting and a runbook, or an explicit note that they are excluded.
- Who owns changes after launch, and at what rate.
A quote that is one line and one number is not cheaper. It is the same work with the risk moved onto you.
When NOT to commission this
- When an app does it. Check the App Store's Functions-based discount collection first. A $9 to $29 per month app beats any build on a common rule.
- When you are not on Plus. Custom apps containing Functions are Plus-only (per shopify.dev, September 2026).
- When the rule is not written down. Pay for the specification first, as a separate small engagement, then get the build quoted against it. Quotes against vague rules are priced for the vagueness.
The Deploi point of view
Our own position, from building on Shopify. Separate from the facts above.
- Our take: get the rule written down before you get anything quoted. The specification is the deliverable that makes every quote comparable, and it is cheap. We would rather sell a two-day specification and lose the build than quote a build against a sentence.
- What we’ve seen: the largest single driver of a Function's lifetime cost is variable three, hardcoded versus configurable, and it is almost never in the brief. Teams discover it the first time merchandising asks for a tier change and the answer is "that is a deploy."
- Where we disagree: the category publishes price ranges for "a Shopify Function" as though that were a unit of work. It is not. A Function is a container for a rule, and the rule is the thing with a price. A published range for the container is a number that cannot be wrong because it never said anything.
- What this page adds: that no published market rate exists and why, the five variables that actually set a quote, and the seven line items a comparable quote has to itemize. The parent answers who does the work; this page says what to hand them.
Reviewed by Martin Dejnicki, Director of SEO & AI Search. Facts verified 2026-09-14.
Where we worked this out
Our decision records