OxifyOxify
Discounts & Shopify Functions

How the unified discount function works

A primer on the unified-discount-function and why it matters.

This article is a draft and may be incomplete or change before publishing.

The unified-discount-function is a single Shopify Function that handles every discount type the app supports — free gifts, FBT, volume, cart upsells, post-purchase.

Why "unified"

Running all discounts in a single function call has three benefits:

  • Avoids Shopify's 5-function-per-cart limit (each function counts as one slot).
  • Produces predictable stacking — one function evaluates everything in one pass.
  • Faster checkout — fewer round-trips to Shopify's discount engine.

Auto-deployment

The app deploys the function automatically on install. Reinstalling the app refreshes the deployment.

How to verify deployment

Open Settings → Discounts. You'll see the deployment status. If the function isn't deployed, redeploy from this page.

What if I'm on legacy

If you installed Oxify before unified function support, see Migrate from legacy to unified.

On this page