Most Shopify stores get this wrong — and it costs them revenue.
Shopify Functions: Unlock Customization for Your Store
Shopify Functions let you customize discounts, checkout, shipping, and payments with serverless code that runs inside Shopify. Here is when, why, and how to use them.
We typically work with Shopify and Shopify Plus stores doing $500k+ in annual revenue.
For years, customizing Shopify checkout meant either accepting Shopify's defaults or upgrading to Shopify Plus and editing checkout.liquid. That model is gone. Today the right way to customize Shopify — at any tier, but especially on Plus — is Shopify Functions.
If you run a serious Shopify or Shopify Plus store, this is one of the most important platform shifts of the last five years.
What are Shopify Functions?
Shopify Functions are small, serverless pieces of code you (or your developers) write that Shopify executes at key points in the storefront and checkout flow. They run on Shopify's infrastructure — not yours — which means they are fast, scalable, and don't add a single millisecond of latency to your checkout.
You write a Function in Rust, JavaScript, or TypeScript, compile it to WebAssembly, and deploy it inside a Shopify app. From that point on, Shopify runs your code every time the relevant event happens.
Where Functions can run
Shopify currently exposes Functions in these areas:
| Function area | What you can customize |
|---|---|
| Discounts | Custom discount logic (BOGO, tiered, exclusive bundles, hidden codes) |
| Cart & Checkout Validation | Block checkout if the cart violates business rules |
| Cart Transform | Bundle, expand, or hide line items in the cart |
| Delivery Customization | Rename, reorder, hide, or sort shipping methods |
| Payment Customization | Rename, reorder, or hide payment methods |
| Order Routing | Choose which location fulfills which item |
| Fulfillment Constraints | Force items to ship together / separately |
Each Function replaces what used to require either a custom checkout build (Plus only) or a third-party app that slowed down the storefront.
Why this matters for Shopify Plus brands
Three concrete wins:
- Performance. Functions run inside Shopify's edge — faster than any external app or webhook-based solution.
- Maintainability. Logic lives as versioned code in your repo, not in app dashboards or
checkout.liquidoverrides. - Cost. Replace 4–6 paid apps with a handful of Functions. We've reduced the app stack of clients by 30–50% by migrating to Functions.
A real example: a hidden VIP discount
Suppose you want logged-in VIP customers to automatically get 15% off, with no discount code and without exposing the rule to other shoppers.
Pre-Functions, you'd need a third-party discount app (slow + monthly fee) or custom Plus checkout code (high cost + Plus-only).
With a Discount Function the entire logic is ~40 lines of Rust:
// Pseudocode-ish: real Function uses Shopify's GraphQL input schema
fn run(input: Input) -> Output {
let is_vip = input.cart
.buyer_identity
.customer
.as_ref()
.map(|c| c.has_tag("vip"))
.unwrap_or(false);
if !is_vip {
return Output::no_discount();
}
Output::percentage_discount(15.0, "VIP 15%")
}
Deploy it once. Every VIP customer automatically gets the discount applied at the cart line level — no code, no app, no checkout.liquid.
Another example: hide express payment for high-AOV carts
Express payment buttons are great for low-AOV carts but a checkout-conversion liability when the cart is $500+ and the customer needs to review shipping carefully.
A Payment Customization Function can hide Apple Pay / Shop Pay when cart.total > $500. ~20 lines of code, no app required.
When to use a Function vs. an app
Use a Function when:
- The logic depends on cart, customer, or order state.
- You want to keep checkout fast.
- You want the logic versioned in code.
- You'd otherwise need a paid app for a single rule.
Use an app when:
- You need a UI for non-technical staff to configure rules.
- The functionality lives outside the cart/checkout flow (e.g. reviews, loyalty UI, post-purchase upsells).
How to build and deploy a Function
The high-level workflow:
- Install Shopify CLI (
npm install -g @shopify/cli @shopify/app). - Generate an app:
shopify app init. - Generate a Function:
shopify app generate extension→ pick the Function type. - Write your logic in Rust or TypeScript using the auto-generated GraphQL input/output types.
- Test locally with
shopify app function run. - Deploy:
shopify app deploy— Shopify compiles to WASM and ships it. - Activate the Function in your store admin (Discounts → Create discount → choose your Function).
Limits and trade-offs
- 5 ms execution budget per Function call. Keep logic tight — no external HTTP calls.
- Maximum 256 KB compiled WASM.
- No mutable storage inside a Function — they are pure functions of input.
These constraints are what make Functions fast. Heavier logic should run in a normal backend (or a Shopify Flow workflow) and write the result into customer or product metafields, which the Function reads.
Migrating from checkout.liquid and Script Editor
Shopify has officially deprecated checkout.liquid and Script Editor in favor of Functions and the new Checkout Extensibility. If you're on Plus and still relying on either:
- Audit every customization currently in
checkout.liquidor Scripts. - Map each one to a Function or Checkout UI Extension.
- Plan a migration sprint — Shopify is enforcing the deadline.
We've migrated several Plus brands. Done well, the new architecture is faster, cheaper to maintain, and unlocks features Scripts never could.
Final thoughts
Shopify Functions are the new foundation of Shopify customization. Every Plus brand should have a small library of Functions that codify their unique business rules — VIP pricing, B2B logic, fulfillment constraints, regional rules, fraud blocks.
If you'd like our team to audit your current customizations and migrate them to Functions, request a quote — we ship Functions for Shopify Plus brands every week.
Keep reading
Related resources

Shopify Collabs: A Comprehensive Guide to Boost Your Brand
A practical guide to launching a Shopify Collabs creator program: install the app, design commissions, recruit the right creators, and scale revenue from influencer partnerships.

Shopify Migration Timeline for Established DTC Brands
What replatforming to Shopify or Shopify Plus actually looks like when you're doing $1M+/year — phases, risks, and how to avoid SEO and revenue loss during cutover.

Custom Shopify Solutions for Established Brands
Five places where off-the-shelf Shopify stops scaling — and the custom solutions we build for established DTC brands on Shopify and Shopify Plus.
