Add a fixed bundle
Bundles apps that are built using Shopify Functions and cover the mix-and-match use case will be considered for inclusion as part of our upcoming bundles product launch. To be eligible to be included in our marketing campaign, your app must be approved to be listed in the Shopify App Store by May 31, 2023.
A fixed bundle is the default implementation to support basic bundle use cases across Shopify’s ecosystem. These include standard bundles and multipack bundles that fit within Shopify’s variant limits.
This guide shows you how to add a fixed bundle using the GraphQL Admin API.
What you'll learnAnchor link to section titled "What you'll learn"
In this tutorial, you'll learn how to do the following tasks:
- Use the GraphQL Admin API to create a product with variants.
- Associate components to variants.
- Delete components in a bundle.
RequirementsAnchor link to section titled "Requirements"
- Your app can make authenticated requests to the GraphQL Admin API.
- Your app has the
write_productsaccess scope. For more information on requesting access scopes when your app is installed, refer to Getting started with OAuth.
How it worksAnchor link to section titled "How it works"
A bundle is modelled as a variant (the parent bundle) and is associated with other variants (bundle components) using the
The bundle variant price determines the bundle price, while the component's variants inventory determines the bundle inventory.
A variant has a
productVariantComponents field that determines the bundles' components. Two bundle variants can have the same components.
The following diagram shows an example of a product variant ("The Hair and Skin Bundle") that models a bundle and contains two components: "Natural Shampoo 50 ml" and "Coconut Conditioner". The bundle is modelled by creating a variant, associating the variant with components, and assigning a quantity of one to each component.
Limitations and considerationsAnchor link to section titled "Limitations and considerations"
- A bundle variant can have up to 10 components.
- After an app has assigned components to a variant, only that app can manage the components of the variant.
- Nested bundles aren't supported. A bundle variant can't have components and be part of a bundle simultaneously.
Step 1: Create a product with variantsAnchor link to section titled "Step 1: Create a product with variants"
To create a product with variants, you can run the
The following example creates a product with a single variant modelling a bundle.
Step 2: Associate components to variantsAnchor link to section titled "Step 2: Associate components to variants"
After creating the product variant, you need to associate the components of a bundle. To do that, you can run the
If the variant is associated with components, then the attribute
The following example associates two components with a quantity of one to the product variant created in the previous step.
- Learn how to use the