- Fixed pricing bundle — a set of products sold for one fixed total price.
- Dynamic pricing bundle — a build-your-own selection with a percentage or fixed-amount discount applied to the running total.
- Volume discount bundle — tiered “buy more, save more” discounts based on quantity or spend.
The mental model in one sentence: you use the exact same Shopify metafields, cart-line attributes, and discount Functions that Appstle’s own bundle widgets use — the only thing you replace is the UI. Nothing about how the bundle is configured, priced, or discounted changes; you are simply rendering the experience yourself instead of letting Appstle’s widget render it.
Fixed pricing bundle
Sell a curated set for one fixed price.
Dynamic pricing bundle
Build-your-own with a percentage or amount discount.
Volume discount bundle
Tiered “buy more, save more” discounts.
Design principle: lean on Shopify, not on Appstle
Read configuration from Shopify metafields, fetch product data from Shopify’s own APIs, compute previews on the client, and let the discount apply through a Shopify Function. Treat calls to Appstle’s servers as a last resort, and cache them when you do make them. This is exactly how Appstle’s own storefront widgets are built — they read everything from a Shopify metafield and almost never call back to Appstle at render time. Following the same pattern keeps your storefront fast and resilient, and avoids putting storefront-scale traffic on Appstle’s API.
No discount codes
Discounts are automatic, not code-based. You do not request, generate, or apply a discount code anywhere in the flow.
The Function is authoritative
The Shopify Function decides the final discount at checkout. Any number you show in your UI is a preview — compute it from the same rule fields.
Attributes are mandatory
If the required
_appstle-* line attributes are missing, the Function cannot recognize the line and no discount is applied.Prerequisites
1
Install Appstle Bundles and keep it active
The discount Functions and the rules metafield only exist while the app is installed. Uninstalling removes the automatic discounts.
2
Create and activate the bundle in the Appstle admin
Configure the bundle (products, pricing, tiers) in the Appstle dashboard and set its status to Active. This provisions the Shopify automatic discount and publishes the rule to the shop metafield. Bundles are authored in the admin; there is no API to create them.
3
Add the Appstle app block once (themes)
On a Shopify theme, enable the Appstle Bundles app embed/block so the rules metafield is available to your code. You can hide Appstle’s default widget and render your own UI from the same data.
The integration model
Every headless bundle, regardless of type, follows the same shape — and most of it runs against Shopify, not Appstle:1
Read the rules from the Shopify metafield
Appstle publishes active rules to the
appstle_bundles.bundle_rules shop metafield. Read it the Shopify-native way — see Reading bundle configuration. No Appstle server call.2
Render your own selector with Shopify data
Build UI from the rule fields: list eligible products, enforce the selection limits, and show a running total. Use Shopify’s own product/variant data (Liquid objects or the Storefront API) for titles, images, and prices.
3
Validate the selection, then add to cart
When the selection is valid, add the line items via Shopify’s Ajax Cart API (themes) or the Storefront API
cartLinesAdd mutation (fully headless), attaching the bundle line attributes.4
Let the discount apply automatically
Appstle’s discount Function reads the attributes and applies the savings in cart and checkout. You do nothing else. Optionally render a discount preview computed on the client from the same rule fields.
Reading bundle configuration
Pick the source closest to Shopify. The first option should cover almost every storefront.- Shop metafield (recommended)
- Shopify Storefront API (fully headless)
- Appstle App Proxy (last resort)
- Appstle Admin API (backend only)
Appstle publishes all active bundle rules to the shop metafield Then filter to the bundle you want by
appstle_bundles.bundle_rules. This is the same data that drives Appstle’s own widgets (exposed there as window._ABConfig.bundle_rules), and it contains every rule type — fixed pricing, dynamic pricing, and volume discount.On a Shopify theme, read it directly in Liquid — no network call to anyone:bundleType and uniqueRef:Several rule fields are themselves JSON-encoded strings inside the metafield (for example
tieredDiscount, products, variants). Parse them with JSON.parse(...) before use — exactly as Appstle’s own widget does.Bundle type reference
Each Appstle bundle type maps to abundleType value in the rules data. These three are supported for headless storefronts:
Other values exist in the
bundleType enum (for example DISCOUNTED_PRICING, BUY_X_GET_Y, SECTIONED_BUNDLE, COMBO_BUNDLE). This documentation covers the three types above; the same metafield-plus-attributes model extends to the others.Discount fields on a rule
The relevant pricing fields on each rule object:Required cart line attributes
This is the contract between your storefront and Appstle’s discount Function. When you add a bundle line item to the cart, attach these attributes. On a Shopify theme they are passed as line-itemproperties; through the Storefront API they are line attributes. Both surface to the Function as cart-line attributes.
Adding to cart on a Shopify theme (Ajax Cart API)
Adding to cart on a fully headless stack (Storefront API)
Previewing the discount
Because the Shopify Function applies the authoritative discount at checkout, any amount you display beforehand is a preview — and you compute it on the client, from the same rule fields, with no server call. (Appstle’s own widget does the same, and even exposes awindow._ABConfig.getProductDiscountedPricing(...) helper on theme storefronts.) The formula differs per type — see each guide:
- Fixed pricing — savings = sum of line prices −
price. - Dynamic pricing — percentage or fixed amount off the eligible subtotal.
- Volume discount — the best-matching tier’s discount.
All monetary values in the Shopify cart are expressed in the minor unit (cents). A
total_price of 5000 means $50.00. Account for this when computing previews.Next steps
Fixed pricing bundle guide
End-to-end headless walkthrough for fixed-price sets.
Dynamic pricing bundle guide
End-to-end headless walkthrough for build-your-own discounts.
Volume discount bundle guide
End-to-end headless walkthrough for tiered savings.
Authentication
For backend-only reads — never used from a storefront.