App development

Shopify Functions: custom rules for discounts, shipping and payment

A discount should only apply to certain combinations, a shipping method only to certain carts, a payment method only to certain customers. With Shopify Functions, rules like these can be anchored directly in Shopify. We check whether a ready-made app is enough and build the rule if none exists.

How to tell that you need a custom rule

Shopify comes with many settings for discounts, shipping and payment. Merchants come to us when their business has a condition that can’t be set up there:

  • A quantity discount should only apply if the items come from the same product line.
  • A shipping method must not appear as soon as bulky goods or refrigerated items are in the cart.
  • Pay by invoice should only be offered to business customers or regular customers.
  • An item may be purchased at most twice per order.
  • Shopify Scripts used to handle this task, and they no longer exist.

Shopify Functions are small programs that implement exactly such rules. Shopify runs them on its own servers, at fixed points between cart and order completion. For your customers, the result looks like a normal feature of the store: the discount shows in the cart, the shipping method is missing or the payment method is hidden.

What you can control with Functions

Shopify specifies where custom logic may step in. The ones that matter most to merchants:

Discounts
Custom discount types for products, order or shipping, such as tiers, combinations or discounts for certain customer groups.
Shipping
Hide, rename or reorder shipping methods depending on the cart or customer.
Payment
Hide, rename or reorder payment methods according to rules.
Cart
Merge line items into a set or split a set into its components.
Validation
Check the cart and checkout and stop with an understandable message, for example for minimum and maximum quantities.
Inventory and fulfillment
Help decide which warehouse an order is fulfilled from and which items are shipped together.

What Functions don’t do: they don’t change the look of checkout. Additional fields, notices or upsell offers are a topic of their own, which we describe under Customize Shopify checkout. In practice, the two often go together.

Functions replace Shopify Scripts

Many stores on Shopify Plus used to solve their special rules with Shopify Scripts. Shopify discontinued Scripts and the Script Editor app as of June 30, 2026. Since then, Scripts no longer run in any store.

Anyone who missed the switch usually notices through the consequences: a tiered discount no longer applies, a shipping method shows up again that had long been hidden. There is no automatic migration, because Functions are built differently. We read out of your old Scripts which rules they contained and rebuild them. While we’re at it, it is worth asking which of them are still needed today.

Who can use what

Whether you need Shopify Plus for your rule doesn’t depend on the rule, but on where the Function comes from.

Feature App from the App Store Custom app
Available on every Shopify plan Shopify Plus
Rule configurable as far as the app allows exactly to your specification
Fits when your requirement is common, such as tiered discounts or shipping rules no app covers your condition
Maintenance by the app vendor by us

For merchants without Plus, this means the route is a ready-made app. For many common rules, such apps exist, and we select the right one with you. One restriction applies regardless of the route: overriding the price of an item in the cart is allowed by Shopify only in stores on Shopify Plus.

If your requirement goes beyond what apps can do, what remains is the custom app and with it the Shopify Plus plan. Whether the switch pays off for this alone, we tell you honestly. There is often a simpler route, such as a different product structure or an automation after the order with Shopify Flow.

What matters in implementation

The data has to be in Shopify. A Function works with what Shopify knows about cart, customer and products. If a rule should depend on the product line or a customer group, that information has to be maintained cleanly, ideally as a metafield.

Rules collide. A custom discount has to work with coupon codes, automatic discounts and prices for business customers. We define in advance what can be combined and what takes precedence.

Errors must not stop sales. For every rule, we clarify what should happen if it can’t be executed for once: keep selling without the rule or stop checkout.

How we implement Shopify Functions

  1. Write down the rule. You describe the condition in your own words, with the special cases from your day-to-day business. We keep asking until it is unambiguous.
  2. Check the route. We clarify whether Shopify already includes the rule, whether an app covers it and what your plan allows.
  3. Set up or build. We set up the app or build the Function as a custom Shopify app.
  4. Test with real carts. Before launch, we run through the cases that actually occur at your store, including coupons and business customers.
  5. Maintain. Shopify keeps developing Functions. We keep custom builds up to date.

FAQ

Frequently asked questions

Do I need the Shopify Plus plan for Shopify Functions?

That depends on the route. Apps from the Shopify App Store that contain Functions run on every plan. A custom app with Functions, built only for your store, requires Shopify Plus. That's why a solution through a ready-made app can often be found even without Plus.

Our Shopify Scripts no longer run. What now?

Shopify discontinued Scripts and the Script Editor as of June 30, 2026, and since then they no longer run in any store. The rules have to be rebuilt as Functions, either with a suitable app or as custom development. We look at what your Scripts did and rebuild it.

Do Functions make the store slower?

Functions are run by Shopify itself, not in your customers' browsers. Shopify sets tight technical limits for them so that checkout stays fast. A Function therefore doesn't load any additional code into your theme.

Can a Function access our ERP system?

Generally not directly. A Function works with the data that exists in Shopify: cart, customer, products and their metafields. Information from other systems therefore has to be transferred to Shopify beforehand, for example through an integration.

Contact

Which rule is missing in your checkout?

Tell us briefly what you need. You will get a reply from someone who would also build your project.

Phone
+49 (0) 30 – 40 36 38 90Mon–Fri 9:00 a.m.–4:30 p.m. (CET)