Scripts to Functions

Which of the five Shopify Functions categories (discount, shipping, payment, validation, fulfillment) should a mid-market brand tackle first if we can only afford one custom build this year?

Short answer

Discount, not fulfillment, is the Shopify Function to build first for most mid-market brands, because a discount rule maps straight to margin. Shopify documents seven kinds of Function, the custom code that runs at checkout. Only Shopify Plus stores can use custom apps that contain them (shopify.dev, October 2026). Validation goes first when your operations team fixes failed orders by hand.

Function APIs Shopify documents
7 in API version 2026-10, not 5Discount, Cart and Checkout Validation, Delivery Customization, Payment Customization, Fulfillment Constraints, Order Routing Location Rule and Cart Transform; two pickup generators are unstable only.Source: Shopify developer docs (Function APIs)
Plan gate for a custom build
Shopify PlusOnly Plus stores can use custom apps that contain Shopify Function APIs. Stores on any plan can use public App Store apps that contain functions.Source: Shopify developer docs (Function APIs)
Order Routing Location Rule access
Beta, by request, Plus onlyOnly available by request for merchants on a Plus plan, and merchants must be enrolled in the Partners program to deploy their own custom apps and location rules.Source: Shopify developer docs (Order Routing Location Rule Function API)
Discount apps built on Functions
34 in Shopify's App Store collectionShopify's curated collection of discount apps that run on Functions; check it before you commission a discount build.Source: Shopify App Store (Discount Apps built on Shopify Functions)

Deploi’s call

Discount first for most, validation first for anyone whose ops team runs a daily fix list. Fulfillment and routing last, not because they are low value but because they are the highest-blast-radius change in the set. A first build should not be the one that reroutes inventory.

BuildMake discount or validation the first build when

  • A discount rule that no packaged app expresses is leaking margin you can name. Deploi's custom discount types record scores that case BUILD (Deploi decision record, October 2026).
  • Your operations team fixes failed orders by hand, or three or more checkout-gating apps overlap. Deploi's validation record scores the second case BUILD on Shopify Plus (Deploi decision record, October 2026).
  • Your store is on Shopify Plus, the only plan whose stores can use custom apps that contain Function APIs (application programming interfaces) (shopify.dev, October 2026).
  • Someone owns the alerting, because a failing Function prices or blocks carts until somebody notices.

WaitLeave fulfillment, routing and bundles for later while

  • The build is your first Function, so it should not be the one that decides where inventory ships from.
  • Order Routing Location Rule is still a beta that Plus merchants get only by request (shopify.dev, October 2026).
  • A bundle app covers your bundles. Deploi's Cart Transform record scores bundle pricing BUY (Deploi decision record, October 2026).

Basis: Should You Build or Buy Custom Discount Types on Shopify Plus?, our Build vs. Buy decision record, scored BUILD.

How do discount, shipping, payment, validation and fulfillment map onto Shopify's Function APIs?

Discount, shipping, payment, validation and fulfillment map onto six of the seven Function APIs (application programming interfaces) in Shopify's current reference, because fulfillment splits into two: Fulfillment Constraints and Order Routing Location Rule (Shopify developer docs, October 2026). Cart Transform, which reshapes cart lines into bundles, is the seventh. Who writes the Function is a separate staffing decision, in-house or agency.

Six of Shopify's seven Function APIs cover the usual five categories, and Cart Transform is the seventh
Shopify Function APICategory it coversWhat it changes at checkout
DiscountDiscountProduct, order and shipping discounts, from one function
Cart and Checkout ValidationValidationBlocks checkout when the cart breaks a rule
Delivery CustomizationShippingRenames, sorts or hides delivery options
Payment CustomizationPaymentRenames, reorders or hides payment methods; on Plus it also sets payment terms
Fulfillment ConstraintsFulfillmentLimits which locations can fulfill cart items
Order Routing Location RuleFulfillmentRanks locations for order routing; a beta, by request, Plus only
Cart TransformNone of the fiveChanges cart line pricing and presentation, such as bundles
Sources: Shopify developer docs (Function APIs, Order Routing Location Rule Function API, Discount Function API, Cart and Checkout Validation Function API, Delivery Customization Function API, Payment Customization Function API, Fulfillment Constraints Function API, Cart Transform Function API). Verified October 8, 2026.Two pickup option generators exist only in the unstable API version (Shopify developer docs, October 2026).

Which Shopify Function should be your one custom build this year?

Discount is the one custom Shopify Function to build first for most mid-market brands, because a discount rule has a number attached and that number is margin. Validation overtakes discount when your operations team keeps a manual list of orders to fix every morning.

1. Discount, for most brands. Whether a discount rule worked is answerable from an order report in a week. Discount also has its own App Store collection: Shopify's Discount Apps built on Shopify Functions lists 34 apps (Shopify App Store, October 2026), so a packaged app often covers the rule. Deploi's custom discount types record scores the discount Function BUILD only when no packaged app expresses the rule (Deploi decision record, October 2026).

2. Cart and Checkout Validation, if you are losing orders at checkout. A validation Function blocks a cart that cannot be fulfilled, enforces a wholesale minimum or refuses an address your third-party logistics (3PL) provider rejects. The return is orders that stop failing downstream, not margin. Deploi's validation record scores BUILD once three or more checkout-gating apps overlap (Deploi decision record, October 2026).

Why do delivery, payment, fulfillment and Cart Transform Functions rank below discount and validation?

Delivery, payment and Cart Transform Functions rank below discount and validation because packaged apps already cover them, and fulfillment Functions rank last of the five categories because they carry the highest risk.

3. Delivery Customization, if shipping options confuse buyers. Hiding a delivery option that should not appear is a cheap conversion fix, and Deploi's delivery customization record scores it BUY (Deploi decision record, October 2026).

4. Payment Customization, if a payment method costs you on some carts. Hiding a method above or below an order value is narrow, with a small return for most. Deploi's payment customization record also scores BUY (Deploi decision record, October 2026).

5. Fulfillment Constraints and Order Routing, last of the five categories. These Functions decide how orders split and where they ship from, so they touch your warehouse, your third-party logistics (3PL) provider and finance. Order Routing Location Rule is a beta "only available by request for merchants that have a Shopify Plus plan" (Shopify developer docs, October 2026). Deploi's fulfillment constraints record scores BUILD for location-restricted products (Deploi decision record, October 2026), but a first build should not reroute inventory.

6. Cart Transform, only when bundles are the business. Merging components into a bundle changes what customers see and what inventory does. Deploi's Cart Transform record scores bundle pricing BUY, because bundle apps already run on Cart Transform (Deploi decision record, October 2026).

Which three questions override any ranking of Function categories?

Three questions override any ranking of Shopify Function categories, including the discount-first order, because a named leak, an existing app or a monthly edit outweighs a category's position:

  1. Where is money leaking right now, and can you name the amount? The category with a named number wins, whatever its rank. A two-week Shopify Flow rehearsal counts the orders a rule would touch before anyone quotes a build.
  2. Can an app do it? Public App Store apps that contain functions run on any Shopify plan (Shopify developer docs, October 2026), so check the pre-built discount apps and Function builders before any build.
  3. Which rule will you change every month? Build the Function you will edit. Buy the one you will set once.

When should you not build any Shopify Function this year?

Skip a custom Shopify Function this year when the checkout problem is presentation, when the rule patches a data problem, or when nobody will fund the alerting.

Deploi’s point of view

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

What we’ve seen
The single-build budget is usually spent on the most visible category rather than the leakiest one. The leakiest one is almost always findable in an ops team's manual workaround, and nobody thinks to ask them.
Where we disagree
The standard ranking treats these as a feature menu. They are not comparable purchases. Discount changes a number, validation changes which orders exist, and fulfillment changes where inventory goes. Ranking them on effort is the wrong axis; rank them on blast radius against named leakage.
What this page adds
The parent answer decides who builds a custom Function. This page decides which one to build first: how the question's five categories map onto Shopify's seven Function APIs, why Order Routing is still a by-request beta, Deploi's record verdict on each category, and the three questions that override any ranking.

When this answer changes

  • Shopify opens Order Routing Location Rule beyond its by-request beta for Plus merchants.
  • Shopify adds a Function API, or moves the pickup option generators out of the unstable version.
  • Shopify lets stores below Plus use custom apps that contain Function APIs.
  • Deploi re-scores its discount, validation, delivery, payment, fulfillment constraints or Cart Transform record.
  • Shopify ships a merchant-facing alert for failing Functions, which lowers the cost of owning any of them.

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, Function APIsshopify.dev · checked October 8, 2026
  2. Shopify developer docs, Order Routing Location Rule Function APIshopify.dev · checked October 8, 2026
  3. Shopify developer docs, Discount Function APIshopify.dev · checked October 8, 2026
  4. Shopify developer docs, Cart and Checkout Validation Function APIshopify.dev · checked October 8, 2026
  5. Shopify developer docs, Delivery Customization Function APIshopify.dev · checked October 8, 2026
  6. Shopify developer docs, Payment Customization Function APIshopify.dev · checked October 8, 2026
  7. Shopify developer docs, Fulfillment Constraints Function APIshopify.dev · checked October 8, 2026
  8. Shopify developer docs, Cart Transform Function APIshopify.dev · checked October 8, 2026
  9. Shopify App Store, Discount Apps built on Shopify Functionsapps.shopify.com · checked October 8, 2026
  10. Deploi Build vs. Buy, Should You Build or Buy Custom Discount Types on Shopify Plus?deploi.ca · checked October 8, 2026 · Deploi research
  11. Deploi Build vs. Buy, Should You Consolidate Checkout Rules into Validation Functions?deploi.ca · checked October 8, 2026 · Deploi research
  12. Deploi Build vs. Buy, Build or Buy Observability for Checkout Functions on Shopify?deploi.ca · checked October 8, 2026 · Deploi research
  13. Deploi Build vs. Buy, Checkout Blocks vs. Built Checkout UI Extensions: Rent or Own?deploi.ca · checked October 8, 2026 · Deploi research
  14. Deploi Build vs. Buy, Build or Buy Delivery Customization Functions on Plus?deploi.ca · checked October 8, 2026 · Deploi research
  15. Deploi Build vs. Buy, Build or Buy a Payment Customization Function on Plus?deploi.ca · checked October 8, 2026 · Deploi research
  16. Deploi Build vs. Buy, Should You Build or Buy Fulfillment Constraints on Shopify Plus?deploi.ca · checked October 8, 2026 · Deploi research
  17. Deploi Build vs. Buy, Cart Transform vs. a Bundle App: Who Owns Pricing?deploi.ca · checked October 8, 2026 · Deploi research