Shopify Functions is a framework that lets developers write custom backend logic that runs directly inside Shopify’s own infrastructure. Instead of calling an external server, the code executes within Shopify at key decision points like applying a discount, transforming a cart, or customizing delivery and payment options. It replaced the older Scripts system and works across the Online Store and checkout, including for Plus and non-Plus merchants where the relevant API allows.
How it works
A developer writes a Function in a language that compiles to WebAssembly (commonly Rust or JavaScript), then deploys it as part of a Shopify app. Shopify runs the Function at the exact moment it is needed, for example when the cart is evaluated or a discount is calculated. Because the logic runs inside Shopify rather than a remote API, it is fast and does not add checkout latency.
Why it matters for B2B quoting
B2B pricing is rarely a flat catalog price. You may need account-specific rates, volume breaks, or negotiated terms that only apply to certain customers. Shopify Functions is one of the mechanisms an app can use to enforce those rules at checkout, so the price a buyer sees and pays matches what was agreed, without manual overrides.
Example
A wholesale buyer accepts a quote and clicks through to checkout. A discount Function checks the buyer’s company or tags, then applies the negotiated per-unit price or a tier discount automatically. The buyer pays the correct amount through native Shopify checkout.
For quote-driven workflows, tools like ShopQuotes sidestep some of this by converting an accepted quote into a real draft order, so the agreed line items and prices carry straight into checkout. See related terms in the B2B quoting glossary.