--- title: Add a product fixed bundle description: Learn how to add a product fixed bundle using the GraphQL Admin API. source_url: html: >- https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle md: >- https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md --- ExpandOn this page * [What you'll learn](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#what-youll-learn) * [Requirements](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#requirements) * [How it works](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#how-it-works) * [Limitations](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#limitations) * [Step 1: Create a bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-1-create-a-bundle) * [Step 2: Poll the status of the bundle creation job](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-2-poll-the-status-of-the-bundle-creation-job) * [Step 3: Update the bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-3-update-the-bundle) * [Next steps](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#next-steps) # Add a product fixed bundle A product fixed bundle is a bundle that's configured at the product level. This guide shows you how to add a product fixed bundle using the [`productBundleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleCreate) mutation. *** ## What you'll learn In this tutorial, you'll learn how to do the following tasks: * Use the GraphQL Admin API to create a bundle * Poll the status of the bundle creation job * Use the GraphQL Admin API to update a bundle *** ## Requirements * You're a [user with app development permissions](https://shopify.dev/docs/apps/build/dev-dashboard/user-permissions). * You've created a [development store](https://shopify.dev/docs/api/development-stores#create-a-development-store-to-test-your-app). * You've [created an app](https://shopify.dev/docs/apps/build/scaffold-app) using Shopify CLI. If you previously installed Shopify CLI, then make sure that you're using the [latest version](https://shopify.dev/docs/api/shopify-cli#upgrade). If you plan to create a UI for your extension, then start with the [React Router app template](https://shopify.dev/docs/api#app-templates). * You've installed [Node.js](https://nodejs.org/en/download) 16 or higher. * You've [installed your app](https://shopify.dev/docs/apps/build/scaffold-app#step-3-install-your-app-on-your-development-store) on the development store. - Your app can make [authenticated requests](https://shopify.dev/docs/api/admin-graphql#authentication) to the GraphQL Admin API. - Your app has the `write_products` [access scope](https://shopify.dev/docs/api/usage/access-scopes). Learn how to [configure your access scopes using Shopify CLI](https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration). *** ## How it works A product fixed bundle is modeled as a product and is associated with other products using the [`bundleComponents`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product#connection-bundlecomponents) relationship. This relationship is dictated by which options are chosen, for each component, when creating the bundle. The bundle parent variant's price determines the price, while the inventory of each component's variants determines the bundle inventory. This is the same for [variant fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-variant-fixed-bundle). A product has a `bundleComponents` field that determines the bundles' components. ![A diagram showing the relationship between products that model a product fixed bundle](https://shopify.dev/assets/assets/images/apps/selling-strategies/bundles-coarse-grained-diagram-BrVlxWcD.png) The next diagram shows an example of a product ("The Hair and Skin Bundle") that models a bundle and contains the following components: "Natural Shampoo 50 ml" and "Coconut Conditioner". The bundle is modeled by selecting which option values should be considered for each component. ![A diagram showing an example of relationships between products that model a product fixed bundle](https://shopify.dev/assets/assets/images/apps/selling-strategies/bundles-coarse-grained-example-diagram-BwOOw4s4.png) *** ## Limitations * A bundle can have up to 30 components. * After an app has assigned components to a bundle, only that app can manage the components of the bundle. * Nested bundles aren't supported. A bundle can't have components and be part of another bundle simultaneously. *** ## Step 1: Create a bundle To create a product fixed bundle, you can run the [`productBundleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleCreate) mutation. The following example creates a bundle product ("The Hair and Skin Bundle") with two products as components (Shampoo and Soap). The mutation will return a `productBundleOperation` that you can use later to poll for the operation status. ## POST https\://{shop}.myshopify.com/api/{api\_version}/graphql.json ## GraphQL query ```graphql mutation ProductBundleCreate($input: ProductBundleCreateInput!) { productBundleCreate(input: $input) { productBundleOperation { id status } userErrors { message field } } } ``` ## Variables ```json { "id": "gid://shopify/ProductBundleOperation/2", "input":{ "title": "The hair and skin bundle", "components": [ { "quantity": 1, "productId": "gid://shopify/Product/1", "optionSelections": [ { "componentOptionId": "gid://shopify/ProductOption/1", "name": "Shampoo scent", "values": ["Lavender", "Mint"] } ] }, { "quantity": 1, "productId": "gid://shopify/Product/2", "optionSelections": [ { "componentOptionId": "gid://shopify/ProductOption/2", "name": "Soap scent", "values": ["Rose", "Lemon"] } ] } ] } } ``` ## JSON response ```json { "data": { "productBundleCreate": { "productBundleOperation": { "id": "gid://shopify/ProductBundleOperation/1", "status": "CREATED" }, "userErrors": [] } } } ``` *** ## Step 2: Poll the status of the bundle creation job After running the [`productBundleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleCreate) mutation, you need to poll the status of the resulting [product operation](https://shopify.dev/docs/api/admin-graphql/latest/queries/productOperation) to know when the bundle is created. The following example polls the status of the bundle creation job. ## POST https\://{shop}.myshopify.com/api/{api\_version}/graphql.json ## GraphQL query ```graphql query productBundleOperation($id: ID!) { productOperation(id: $id) { ... on ProductBundleOperation { id status product { id } userErrors { field message code } } } } ``` ## Variables ```json { "id": "gid://shopify/ProductBundleOperation/1" } ``` ## JSON response ```json { "productOperation": { "id": "gid://shopify/ProductBundleOperation/1", "status": "COMPLETE", "product": { "id": "gid://shopify/Product/3" }, "userErrors": [] } } ``` *** ## Step 3: Update the bundle To update a bundle, you can run the [`productBundleUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleUpdate) mutation. The following example updates the bundle created previously by removing the soap component and adding a sponge component. ## POST https\://{shop}.myshopify.com/api/{api\_version}/graphql.json ## GraphQL query ```graphql mutation ProductBundleUpdate($input: ProductBundleUpdateInput!) { productBundleUpdate(input: $input) { productBundleOperation { id status } userErrors { message field } } } ``` ## Variables ```json { "input": { "id": "gid://shopify/Product/3", "title": "The hair and skin bundle", "components": [ { "quantity": 1, "productId": "gid://shopify/Product/1", "optionSelections": [ { "componentOptionId": "gid://shopify/ProductOption/1", "name": "Shampoo scent", "values": ["Lavender", "Mint"] } ] }, { "quantity": 1, "productId": "gid://shopify/Product/4", "optionSelections": [ { "componentOptionId": "gid://shopify/ProductOption/5", "name": "Sponge color", "values": ["Blue", "Red"] } ] } ] } } ``` ## JSON response ```json { "data": { "productBundleUpdate": { "productBundleOperation": { "id": "gid://shopify/ProductBundleOperation/2", "status": "CREATED" }, "userErrors": [] } } } ``` You can [poll the status of the bundle update operation](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle#step-2-poll-the-status-of-the-bundle-creation-job) in the same way as you did for the bundle creation operation. *** ## Next steps * Learn how to create [variant fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-variant-fixed-bundle). *** * [What you'll learn](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#what-youll-learn) * [Requirements](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#requirements) * [How it works](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#how-it-works) * [Limitations](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#limitations) * [Step 1: Create a bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-1-create-a-bundle) * [Step 2: Poll the status of the bundle creation job](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-2-poll-the-status-of-the-bundle-creation-job) * [Step 3: Update the bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#step-3-update-the-bundle) * [Next steps](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle.md#next-steps)