Skip to main content

Start building bundles

This guide describes how to get started with bundles, and describes the available implementation options.


To create a bundles app, you need to configure a bundle and create a bundle UI extension.

Anchor to Bundles configurationBundles configuration

To configure a bundle, you can do one or both of the following tasks:

  • Implement the bundles product API to implement a fixed bundle.
  • Create a bundles Shopify Function to group lines together as they’re added to the cart, with configuration data in metafields. When you create a bundles Shopify Function, you need to build a theme app block. This block replaces the variant picker in Online store themes to add all of the required bundle components.

  • Create a bundle UI extension to summarize bundle components for Shopify admin product and product variant pages.
  • Configure app extension for bundles app link to create and update bundle components, from the Partner Dashboard.
  • Create pages in your embedded app using Shopify App Bridge to allow users to perform the following tasks:
    • Configure bundle components for creating a new bundle product.
    • Update an existing bundle.

Apps can configure and operate bundle products in the following ways:

  • Fixed bundles: Lets users configure product variants that are fulfilled with a bundle of products as a product grouping API.

  • Customized bundles: Uses the cartTransform object to convert a group of products added to the cart into a bundle and adjust the price automatically.

    Note

    In this documentation, we'll exclusively cover the customized bundles with functions implementation path.

The following table provides a comparison of the two implementation options:

Fixed bundles with the productBundleCreate mutationCustomized bundles with cartTransform object
Admin Configuration--
DefinitionUsing the GraphQL Admin APIThrough the cartTransform object, and the metafields and metabjects on that object.
PricingThe price is derived from the parent variant.

The bundle price is allocated across components in the checkout, cart, and orders using a weighted price algorithm.
For expand, the price is derived from the parent. For merge, the price is derived from components, with a price adjustment applied in the function.

The bundle price is allocated across components in the checkout, cart, and orders using a weighted price algorithm.
DiscountsDiscount calculated on the parent then allocated on the components.Discount calculated on the parent then allocated on the components.
TaxesTaxes will be computed on the components.Taxes will be computed on the components.
Storefront--
Product details page, buyer choosesParent bundle variant

Works without Liquid change

Sellable quantity is available through Liquid
Multiple component variants

App is responsible for its own variant picker on the product details page

Sellable quantity is only available through the Storefront API
Cart addInput:
Parent bundle variant

Displayed as grouped in cart and checkout

Output fields:
In cart, potential to query cart.line.components
Input:
Multiple component variants

Displayed as grouped in cart and checkout

Output fields:
In cart, potential to query cart.line.components
Oversell protectionAlways: Shopify maintains sellable quantities on the parent bundle variant.

The parent inventory quantity is the minimum of the component's inventory quantities.
Storefront: App maintains instock/out of stock for the parent.

Post-add-to-cart: Components are always checked in cart and checkout providing some built-in oversell protection.
Bundle groupingGrouped by bundle parent variant ID (item added to the cart)Grouped by bundle parent variant ID (assigned by function)
Admin Orders--
Default fulfillment constraintNo fulfillment constraintNo fulfillment constraint
Store in order linesComponents, with reference to parent through groupingsComponents, with reference to parent through groupings
Refund/ReturnsOperates at the component levelOperates at the component level
ReportsSales reporting at the component levelSales reporting at the component level


Was this page helpful?