Shopify Functions explained
What they can do
- Discounts. Product, order and shipping discounts with your rules: tiers, bundles, customer segments, combinations.
- Delivery and payment customisation. Hide, rename or reorder shipping and payment options by cart, customer, address or market.
- Validation. Block or limit checkout when a rule is broken: quantity limits, address rules, B2B constraints.
- Operations. Routing of fulfilment and other backend decisions, depending on the Function type Shopify offers.
How they differ from Scripts and apps
Scripts were Ruby edited in the admin and run with few limits. Functions are code in your app, versioned and tested like any software, running on Shopify's infrastructure under strict budgets for time and instructions, which is what makes them fast and reliable. Compared with an app that injects into the theme, a Function runs inside checkout itself and adds no storefront weight.
What they cannot do
Call external services at runtime, run for long, or process unbounded data. Anything a Function needs must be available in its input or precomputed into metafields. That constraint is a feature: checkout stays fast and predictable.
When to build one
When the rule is genuinely yours and no well-maintained app expresses it, when the cost of subscriptions and glue exceeds the cost of building, or when the logic must be auditable. For standard patterns, a discount app built on Functions is often the better buy. How we decide.
Who can use them
Custom Functions for discounts, delivery and payment customisation are available to Shopify Plus stores. Public apps built on Functions can be installed more widely. Documentation: Shopify Functions.


