Build vs. Buy>Platform & Architecture>Function Input Query Design

Function Input Query Limits: Redesign the Data or Buy an App?

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

Function input query design is a CUSTOMIZE: restructure the data, because no app routes around the ceiling. Shopify caps an input query at 3,000 bytes excluding comments, a calculated query cost of 30, and 100 elements in any list argument. Metafields over 10,000 bytes are not returned. Summarize the values your rule needs into small, purpose-built metafields, and use a bulk editor from $9/month (verified Sep 2026) to populate them.

Your profile — see how the verdict shifts

VerdictCUSTOMIZE (redesign the metafield model, then buy bulk tooling from $9/month verified Sep 2026 to load it) · 3,000-byte input query, query cost 30, 100-element lists, 10,000-byte metafield cutoff · no app lifts any of those
Buy score
5.2
Build score
7.4
Confidence
HighThe ceilings are quoted from Shopify's Functions reference and were re-read on 2026-09-05. The maximum size for an input query, excluding comments, is 3000 bytes. Function input queries can have a maximum calculated query cost of 30. Field arguments and input query variables of list type can't exceed 100 elements. Metafields with values exceeding 10,000 bytes in size will not be returned. Around those sit the function's own budgets: function input 128 kB, function output 20 kB, compiled binary 256 kB, runtime linear memory 10,000 kB, runtime stack 512 kB, and 11 million execution instructions for carts of up to 200 line items. The page defines 1 kB as 1000 bytes. What verification also established is what the app market can and cannot do here. Metafields Guru (5.0★, 219 reviews, Built for Shopify) and Matrixify (4.9★, 1,594 reviews, Built for Shopify) are genuine, well-reviewed tools, and neither changes a single one of those limits, because the limits belong to the platform rather than to your data. What they change is how expensive the redesign is: bulk editing and importing metafields across a whole catalog by hand is the part that stops teams from doing this properly. Shopify's own guidance points the same direction, recommending a reserved prefix in your metafield namespace so other apps can't use your metafields, and noting that fetching data from metafields during checkout is more efficient than an external network call.
Reference scenario
$20M–$100M GMV · Shopify Plus · a discount or validation function reading customer, product and metaobject data · agency or in-house dev bench
As of
September 2026

Decision at a Glance

Your profileVerdictWhy
Rule reads one or two small metafieldsBUILDA query this narrow sits far under 3,000 bytes and a cost of 30. Write it, ship it, and spend nothing on tooling you don't need yet.
Rule reads several metafields plus customer or segment dataCUSTOMIZEQuery cost climbs faster than byte count here, and 30 is the number that bites first. Precompute the joins into summary metafields and buy bulk tooling to keep them current.
Rule depends on a large JSON metafield or a list over 100 elementsCUSTOMIZEValues above 10,000 bytes are not returned and list arguments stop at 100 elements, so the current model simply cannot be read. Splitting the blob is the work, and a bulk editor is how you do it once.
Rule needs live external data (ERP contract pricing, loyalty balance)BUILDNetwork access for functions has to be enabled by Shopify and isn't available on development stores or in a feature preview, with the fetch target limited to custom apps on Plus and Enterprise stores. Precomputing into metafields is usually faster to ship and cheaper to run.

What Function Input Query Design Actually Drives

OutcomeImpactHow it works
Revenue — directHighA rule reading an absent metafield prices the cart as though the customer qualifies for nothing, so contract pricing and loyalty tiers quietly stop applying at checkout.
Data & insightHighNamed summary metafields under a reserved namespace become readable by every other system, turning a function's private cache into a shared, queryable customer and product model.
Operational efficiencyMediumMerchandising can change a threshold by editing a metafield value rather than filing an engineering ticket for a function redeploy.
Customer experienceMediumBuyers see a price that reflects their actual entitlement, instead of a silently degraded default that support has to explain afterward.

Spend ceiling: The money belongs in the data model, not in tooling. A well-shaped set of summary metafields costs a few weeks once and keeps every future function inside 3,000 bytes and a cost of 30; tooling without that model just loads the wrong shape faster.

What buying enables (top apps)

  • + Bulk editing and importing metafields across the whole catalog, which turns a quarter of manual work into an afternoon
  • + Export of the current model so you can see what the function is really reading before you change it
  • + Unlimited metafields on Matrixify's free tier for a first exploratory export
  • + Repeatable import files that document how the model was shaped and loaded

What building additionally unlocks

  • + An input query with real headroom against 3,000 bytes and a calculated cost of 30
  • + Values split below the 10,000-byte cutoff, so nothing the rule depends on silently disappears
  • + Lists kept under the 100-element ceiling by summarizing rather than enumerating
  • + A metafield model every future function, theme and headless storefront can reuse

Find Your Verdict in 3 Questions

  1. Does the input query already sit near 3,000 bytes or a calculated cost of 30?

    Yes: Go to question 2.

    No: Your verdict: BUILD — write the query directly against the resources you need; the ceilings are not in play at this size.

  2. Can the values the rule needs be precomputed into small, named metafields?

    Yes: Your verdict: CUSTOMIZE — build the summary model, then buy bulk tooling from $9/month (verified Sep 2026) to backfill and maintain it.

    No: Go to question 3.

  3. Does the rule genuinely need live external data at checkout time?

    Yes: Your verdict: BUILD — request network access from Shopify, noting it is unavailable on development stores and limited to custom apps on Plus and Enterprise stores.

    No: Your verdict: CUSTOMIZE — split any metafield above 10,000 bytes and narrow the query, because no app lifts these ceilings.

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 & implementationBulk metafield tooling installs the same day; remodeling the data and rewriting the input query runs 4–10 weeks (Deploi estimate, illustrative).
Recurring feesMetafields Guru runs $9–$59/month and Matrixify $20–$200/month (verified Sep 2026); the redesigned model itself carries no subscription.
Maintenance & upgradesSummary metafields need a job that keeps them fresh, and that job becomes part of your catalog operations rather than the vendor's problem.
Switching & exitMetafields live on Shopify resources, so both paths leave the data in place; only the tooling subscription stops.
Risk
Vendor riskMatrixify carries 1,594 reviews and Metafields Guru 219, both Built for Shopify, so vendor risk is low; a data model you own has none.
Security & compliance surfaceBulk tooling reads and writes across your whole catalog, which is broad access for a job you run occasionally.
Platform-deprecation exposureMetafields and input queries are current platform, but the ceilings can move with an API version, so a query at 2,900 bytes has almost no margin.
Value
Fit to requirementNo app lifts the 3,000-byte query, the cost ceiling of 30, or the 10,000-byte metafield cutoff, so only the redesign actually solves the problem.
Time to marketA bulk import runs this afternoon; the model that makes the import worth running takes a few weeks to design.
Performance & scaleSmall purpose-built metafields keep query cost low as the catalog grows, while reading fat generic blobs degrades as soon as a product gets richer.
Data ownership & AI-readinessStructured, named metafields under a reserved namespace are readable by every other system you own, not just by the function that prompted them.
Focus & opportunity costData modeling is unglamorous work that pays off across every future function, which is exactly why it keeps getting postponed.

The App Landscape

AppStatusPricingBest for
Metafields GuruLiveLightweight bulk editor for cleanup and one-off jobsFree plan; $1–$590/mo paid tiers at entry volumes; scales with volume (verified Sep 2026)Editing and loading the small purpose-built metafields a function reads
MatrixifyLiveThe bulk import/export workhorse many 'internal tools' secretly areFree (10 records per file); $20/month Basic, $50/month Big, $200/month Enterprise with unlimited records at entry volumes; scales with volume (verified Sep 2026)Reshaping a whole catalog's metafields in a single migration pass
Function network access (fetch)NativeFirst-party path for data the input query cannot carry. Network access for functions needs to be enabled by Shopify, and is not available on development stores or in a feature preview; the fetch target is limited to custom apps installed on Shopify Plus and Enterprise stores. Shopify notes that fetching from metafields during checkout is more efficient because it avoids an external network call.Included with Shopify Functions, subject to Shopify enabling accessValues that genuinely cannot be precomputed into metafields
Summary metafields plus a narrow input queryBuild lanePrecompute the joins your rule needs into small, named metafields under a reserved namespace prefix, then write an input query that reads only those. Keeps the query well inside 3,000 bytes and a calculated cost of 30, and sidesteps the 10,000-byte value cutoff entirely.$10,000–$30,000 one-time for the model, the sync job and the query rewrite (Deploi estimate, illustrative)Any rule whose data needs have outgrown a single generic metafield

The Build Path

  • Precompute joins into summary metafields: Work out what the rule actually decides on, then store that answer rather than its ingredients. A loyalty tier as one string beats a 40-entry purchase history the query cannot afford.
  • Split large values under a reserved namespace: Values above 10,000 bytes are not returned, so a fat JSON blob has to become several named fields. Shopify recommends a reserved prefix in the namespace so other apps can't use your metafields.
  • Keep a sync job honest: Summary metafields are a cache, and a cache needs an owner. A webhook-driven job plus a nightly reconciliation keeps the values the function reads from drifting away from the truth.
Effort band
$10,000–$30,000 one-time (Deploi estimate, illustrative); lands in the $10–25K contact-form band for one function's data, and above it when several functions share the model
Typical timeline
4–10 weeks (Deploi estimate, illustrative): model design first, backfill second, then the query rewrite and the sync job
Maintenance, honestly
$4,000–$10,000/yr (Deploi estimate, illustrative): keeping the sync job current, re-measuring query cost after schema changes, and re-checking the model at each API version bump.
What you own — and what you take on
You own: a named metafield model that every other system can read, and an input query with headroom against 3,000 bytes and a cost of 30. You take on: a cache with a freshness problem, and the discipline to keep new fields from creeping back into the query.

3-Year Total Cost of Capability

Buy (app path)Build (custom path)
Year 0 (setup)$0–$400 (illustrative)$10,000–$30,000 (Deploi estimate, illustrative)
Years 1–3 (recurring)$324–$2,400 (illustrative)$12,000–$30,000 (Deploi estimate, illustrative)
3-year total≈$324–$2,800 (illustrative)≈$22,000–$60,000 (Deploi estimate, illustrative)
Illustrative cumulative cost over 36 months$0$11k$21k$32k$43kMo 0Mo 12Mo 24Mo 36Buy (app path)Build (custom path)
Illustrative cumulative cost: the tooling line is cheap and never crosses the build line, because the two do different jobs. The redesign is what makes the rule work at all; the subscription is what makes the redesign finish this quarter instead of next year.
  • All figures illustrative samples for the reference scenario — not quotes, not verified pricing.
  • App-only path: bulk metafield tooling on a mid tier, which loads data but never lifts an input query ceiling.
  • Build path: model design, a catalog backfill, a sync job and one query rewrite; three-year horizon.

What the Sticker Price Hides

On the buy path

  • Bulk tooling loads data beautifully and lifts no function limit at all — buying it without the redesign changes nothing
  • Metafields Guru's ROOKIE tier charges $1 per 1,000 app credits used for bulk operations (verified Sep 2026), so a large backfill is metered
  • Matrixify's per-file record caps step by plan, and a 50K-product reshape needs the $50/month Big tier (verified Sep 2026)
  • Both apps read and write across the whole catalog, which is broad access for an occasional job

On the build path

  • Summary metafields are a cache, and a stale cache prices carts wrongly without raising an error
  • Query cost climbs with joins faster than byte count does, so 30 is usually the ceiling you hit first
  • A value that passes today can cross 10,000 bytes next season and silently stop being returned
  • $4,000–$10,000/yr to keep the sync job and the model current (Deploi estimate, illustrative)

What Merchants Say

The failure teams describe is quiet: the function shipped, the metafield grew past 10,000 bytes months later, and the rule started reading nothing at all without an obvious error.
community-reported (2026 research corpus)
Bulk metafield tooling gets bought late, after someone has already spent two weeks editing values by hand and discovered the shape was wrong anyway.
community-reported (2026 research corpus)

If You Change Your Mind Later

If you bought and outgrow it

Cancelling bulk tooling costs you nothing structural, because the metafields it wrote live on Shopify resources and stay there. Keep the import files you used, since they are the cheapest record of how the model was shaped and what got loaded when.

If you built and want out

Nothing is stranded: a named metafield model under your own namespace is readable by any app, any function and any future headless storefront. The sync job is the only piece to rehome, and it is a small service with one clear contract.

When This Answer Changes

We're watching for:

  • Shopify changing the 3,000-byte input query cap, the calculated query cost of 30, or the 10,000-byte metafield cutoff in a future API version
  • Any metafield your function reads approaching 10,000 bytes, which is the point it stops being returned
  • Network access for functions becoming available beyond custom apps on Plus and Enterprise stores

Verdict change log:

No changes since first publication (September 2026).

Common Questions

What are the limits on a Shopify Function input query?

Shopify caps an input query at 3,000 bytes excluding comments, with a maximum calculated query cost of 30. Field arguments and input query variables of list type can't exceed 100 elements. Metafields with values exceeding 10,000 bytes in size will not be returned. The whole function input caps at 128 kB, and function output at 20 kB.

What happens when a metafield is too big for a function?

Shopify returns nothing for that metafield: values exceeding 10,000 bytes in size will not be returned. Shopify's wording is not returned rather than truncated, so the rule has to handle an absent value. Split the value into smaller, purpose-built metafields under a reserved namespace prefix, which Shopify recommends so other apps can't use yours. The input query itself caps at 3,000 bytes excluding comments.

Can an app get around the input query limits?

No app changes what a Shopify Function is allowed to read, because the ceiling belongs to the platform. Metafields Guru (5.0★, 219 reviews) and Matrixify (4.9★, 1,594 reviews) restructure and bulk-load metafields at $9/month and $20/month (verified Sep 2026), which makes the redesign practical rather than optional. Network access exists for functions, but Shopify has to enable it and it adds an external call.

Your Next Steps

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

  1. Measure the live input query against 3,000 bytes excluding comments and a calculated cost of 30
  2. List every metafield the rule reads and check each value against the 10,000-byte cutoff
  3. Design summary metafields under a reserved namespace prefix, one field per decision the rule makes
  4. Backfill with Metafields Guru or Matrixify rather than by hand, then rewrite the query against the new fields
  5. Add a webhook-driven sync job plus a nightly reconciliation so the summaries stay true

If you're going with BUILD

  1. Confirm the data genuinely cannot be precomputed before requesting network access from Shopify
  2. Check eligibility: custom apps on Plus and Enterprise stores only, and not on development stores
  3. Design a fallback for the call failing, because checkout still has to price the cart
  4. Keep metafield reads as the default path, since Shopify names them the more efficient one
  5. Load-test the fetch path at your peak cart rate, not at your average

Official Docs & Sources

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

Is your function reading the data it thinks it is?

We measure a live input query against 3,000 bytes and a cost of 30, find the metafields that stopped being returned, and reshape the model so the rule reads what it needs. Usually less work than the rewrite everyone assumes.

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.