Platform Shopify Functions

Custom Checkout Logic That Runs Inside Shopify

“Scripts logic still missing.”

Shopify Functions are custom backend logic that runs inside Shopify for discounts, shipping, payments, and validation; Shop Techs designs and builds them.

Quick answer

Shopify Functions: the short answer

Shopify Functions are custom backend logic that runs inside Shopify for discounts, shipping, payments, and validation; Shop Techs designs and builds them.

Shopify Functions let developers customize Shopify's backend logic with code that runs inside Shopify's infrastructure. Functions are compiled to WebAssembly, commonly written in Rust or JavaScript, and execute within strict performance limits during cart and checkout. Available Function APIs cover discounts, delivery and payment method customization, cart and checkout validation, cart transforms for bundles, fulfillment constraints, order routing, and pickup point options. Merchants on any plan can use Functions through public apps.

Functions are the replacement for Shopify Scripts, and they are more capable: they work across the online store, checkout, and other surfaces, and merchants can configure them through admin settings rather than editing Ruby. We design Functions around your actual pricing and operational rules, expose clean configuration through metafields so your team can adjust thresholds without a developer, and test them against the edge cases that break checkout logic: mixed carts, B2B buyers, and stacked discounts. Every Function ships with tests and documentation.

Inside the work

What we actually ship.

  1. 01 UI extension Delivery notes and gift options.
  2. 02 Upsell Offered right before payment.
  3. 03 Extensibility No checkout.liquid left.

Sound familiar?

From broken to fixed.

  1. 01 Scripts logic still missing. OPEN
  2. 02 Discount stacking surprises. OPEN
  3. 03 Strict execution limits. OPEN
BEFORE · ISSUE 01

Scripts logic still missing.

AFTER · FIXED

Custom discount Functions.

BEFORE · ISSUE 02

Discount stacking surprises.

AFTER · FIXED

Delivery and payment customization.

BEFORE · ISSUE 03

Strict execution limits.

AFTER · FIXED

Cart and checkout validation.

What's included

Everything in the scope.

Recent work

Chubbies

Shopify Functions
Shopify Functions projects
17
Brands served
11
Delivering since
2014
  • Manage Email + SMS Preferences
  • Rust Conversion: Cart Transform
  • Rust Conversion: Exact Price

Timeline

Kickoff to launch.

  1. Step 01

    Rule discovery

    We document every discount, shipping, payment, and validation rule you need, including how they should combine and which edge cases matter.

  2. Step 02

    Function design

    We map rules to Function APIs, define input queries and configuration, and confirm plan requirements for custom app deployment. Limits are checked before code is written.

  3. Step 03

    Build and unit test

    We write Functions in Rust or JavaScript with automated tests that cover mixed carts, B2B buyers, and stacked discount scenarios.

  4. Step 04

    Deploy and monitor

    We deploy through a custom app, activate in the admin, and review Function run logs to catch errors after launch.

Where it goes wrong

What we fix first.

01

Scripts logic still missing

Brands that relied on Shopify Scripts for tiered discounts, gift-with-purchase, or shipping rules had to rebuild them as Functions. Partial rebuilds can leave promotions behaving differently than intended, which is hard to spot.

02

Discount stacking surprises

Functions interact with Shopify's discount combination rules, automatic discounts, and codes. Without careful design, customers may receive unintended stacked discounts or lose expected ones, both of which damage margin or trust.

03

Strict execution limits

Functions run with limits on execution time, memory, and input size. Logic that queries too much cart data or performs heavy computation can fail, so performance has to be considered from the start.

04

Logic only a developer can change

Hard-coding thresholds, product lists, or messages into a Function means every promotion change needs a deployment. Merchants need configuration in the admin to adjust rules on their own schedule. Developers become a bottleneck.

FAQ

Questions, answered.

What are Shopify Functions?

Shopify Functions are small programs that customize Shopify's backend logic, such as discounts, shipping and payment method rules, cart validation, and bundles. They are compiled to WebAssembly and run inside Shopify's infrastructure during cart and checkout. Developers deliver them through apps, and merchants activate and configure them in the Shopify admin.

Are Shopify Functions replacing Shopify Scripts?

Yes. Shopify Functions are the replacement for Shopify Scripts, which Shopify retired. Scripts were Plus-only Ruby code that ran at checkout; Functions are more performant, work across more surfaces, and can be configured in the admin. Any logic previously implemented in Scripts, such as tiered discounts or shipping rules, needs to be rebuilt as Functions.

Do Shopify Functions require Shopify Plus?

Not always. Merchants on any plan can use public apps from the Shopify App Store that include Functions. Custom apps containing Functions, built specifically for your store, have historically required Shopify Plus. If you need logic unique to your business, Plus is usually required, though checking current Shopify plan details is worthwhile.

What languages can Shopify Functions be written in?

Shopify Functions compile to WebAssembly, and Shopify officially supports Rust and JavaScript, with JavaScript compiled through Shopify's tooling. Rust generally performs better against Functions' execution limits, which matters for complex logic or large carts. JavaScript is quicker to develop for simpler rules. We choose based on the complexity and performance needs of each Function.

Can Shopify Functions handle product bundles?

Yes. The cart transform Function API can expand a bundle product into its component items or merge components into a single bundle line. This keeps inventory tracked at the component level while customers see a single bundle in the cart. Shopify's Bundles app uses this approach, and custom Functions support more specialized bundle logic.

Explore

Shopify Functions, wherever you need it.

Pairs well with

Related platforms.

ALL 5 PLATFORMS

Platform

Let’s fix it properly.