Offer a build-your-own bundle that applies a percentage or fixed-amount discount to the running total, using your own storefront UI and Appstle’s automatic discount.
A dynamic pricing bundle lets customers build their own selection from an eligible set, and applies a discount to the running total — either a percentage (e.g. “15% off when you bundle any 3”) or a fixed amount (e.g. “$10 off your build-your-own box”). Unlike a fixed pricing bundle, the total scales with what the customer picks; the discount is layered on top.This guide covers running a dynamic pricing bundle from your own storefront UI. You use the same metafield, cart-line attributes, and Shopify Function that Appstle’s built-in widget uses — only the UI is yours. Read the headless overview first for the automatic-discount model.
Read the active rules from the appstle_bundles.bundle_rules shop metafield — the Shopify-native source, with no call to Appstle’s servers (see Reading bundle configuration). Filter to dynamic pricing bundles by bundleType.
Dynamic pricing bundles support subscriptions. If the selection uses a subscription purchase option, pass the chosen selling_plan on the line (Ajax) or sellingPlanId on the merchandise line (Storefront API), exactly as you would for any subscription line item.
When the lines carrying the attributes satisfy the gates, Appstle’s automatic discount applies the percentage or fixed amount in cart and checkout. If the selection later drops below the gate (e.g. an item is removed), the Function stops applying the discount — your UI does not need to manage this.
This preview is display-only. The Shopify Function is authoritative at checkout; sourcing the preview from the same discountType / discountValue / gate fields keeps them in sync.