Enabling Bundle Details in Shopify Order Metafields
To add bundle data to your order metafields, please upgrade to the Simple Bundles Advanced or Plus plan. Once upgraded, contact our support team for further assistance.
Why add bundle data in Shopify order metafields
Shopify order metafields in Simple Bundles allow you to:
- Integrate with third-party applications.
- Understand bundle groupings when multiple of the same bundle variant are bought in a single order.
- Facilitate integration with third-party logistics (3PL) providers.
Structure of metafields in Simple Bundles 2.0
The bundle data is added to the order metafields in the following structure:
[ { "line_item_group_id": 102990129, "bundle_line_item_product_id": 8762808172849, "bundle_line_item_product_title": "A Typical Fixed Bundle", "bundle_line_item_variant_id": 46381278921009, "bundle_line_item_variant_title": "Default Title", "bundle_line_item_title": "A Typical Fixed Bundle", "bundle_line_item_sku": "", "bundle_line_item_vendor": "Bloom Beauty Skincare", "bundle_line_item_image_url": "https://cdn.shopify.com/s/files/1/0790/4759/0193/files/TheSkincareSet_c02d1cdb-e06e-4453-9683-9c035c600a09.png?v=1690917725", "bundle_line_item_quantity": 1, "bundle_content_line_item_id": 14516871725361, "bundle_content_line_item_price": 33.26, "bundle_content_line_item_total_discount": 0.0, "bundle_content_line_item_quantity": 1, "bundle_content_line_item_product_id": 8627683754289, "bundle_content_line_item_product_title": "Avocado Moisture Barrier Cleanser", "bundle_content_line_item_variant_id": 45962070720817, "bundle_content_line_item_variant_title": "Default Title", "bundle_content_line_item_title": "Avocado Moisture Barrier Cleanser", "bundle_content_line_item_sku": null, "bundle_content_line_item_vendor": "Bloom Beauty Skincare", "bundle_content_line_item_image_url": "https://cdn.shopify.com/s/files/1/0790/4759/0193/files/AvocadoMoistureBarrierCleanser.png?v=1688672564" }, ... ]
Explanation of Fields
line_item_group_id
: A unique identifier for a single bundle product grouping. This is useful when multiple of the same bundle variant are bought in a single order.bundle_line_item_product_id
: The product ID of the bundle.bundle_line_item_product_title
: The title of the bundle product.bundle_line_item_variant_id
: The variant ID of the bundle.bundle_line_item_variant_title
: The title of the bundle variant.bundle_line_item_title
: The title of the bundle line item.bundle_line_item_sku
: The SKU of the bundle line item.bundle_line_item_vendor
: The vendor of the bundle line item.bundle_line_item_image_url
: The image URL of the bundle line item.bundle_line_item_quantity
: The quantity of parent bundle line item (not in the order).bundle_content_line_item_id
: The line item ID of the bundle content.bundle_content_line_item_price
: The price of the bundle content line item.bundle_content_line_item_total_discount
: The total discount applied to the bundle content line item.bundle_content_line_item_quantity
: The quantity of the bundle content line item.bundle_content_line_item_product_id
: The product ID of the bundle content line item.bundle_content_line_item_product_title
: The title of the bundle content line item.bundle_content_line_item_variant_id
: The variant ID of the bundle content line item.bundle_content_line_item_variant_title
: The title of the bundle content line item variant.bundle_content_line_item_title
: The title of the bundle content line item.bundle_content_line_item_sku
: The SKU of the bundle content line item.bundle_content_line_item_vendor
: The vendor of the bundle content line item.bundle_content_line_item_image_url
: The image URL of the bundle content line item.
Accessing Metafields
Once the bundle data has been added to your order metafields, you can access it by appending /metafields.json
to the URL of the order in your Shopify admin. For example, if your order URL is https://admin.shopify.com/store/bloom-beauty-skincare/orders/5679566455089
, you can access the metafields by navigating to https://admin.shopify.com/store/bloom-beauty-skincare/orders/5679566455089/metafields.json
.
Structure of metafields in Simple Bundles 1.0
When merchants use non-checkout sales channels such as third-party apps, draft orders, or POS (Point of Sale), Simple Bundles will default to its 1.0 functionality. In this case, the app will edit orders to include the contents of the bundle. Consequently, the structure of the metafields will differ significantly, with the presence of a parent bundle and $0 child items, as well as line item groups. Here is an example of the structure:
{ "bundle_line_item_id": "1234567890", "bundle_line_item_price": "50.00", "bundle_line_item_quantity": "1", "bundle_line_item_fulfillment_status": "fulfilled", "bundle_line_item_total_discount": "5.00", "bundle_line_item_properties": {}, "bundle_line_item_product_id": 123123123, "bundle_line_item_product_title": "Bundle Product", "bundle_line_item_variant_id": 987987987, "bundle_line_item_variant_title": "Small / Blue", "bundle_line_item_title": "Bundle Line Item Title", "bundle_line_item_sku": "SKU12345", "bundle_line_item_vendor": "Vendor Name", "bundle_line_item_image_url": "https://cdn.shopify.com/...", "bundle_content_line_item_id": "0987654321", "bundle_content_line_item_price": "25.00", "bundle_content_line_item_quantity": "2", "bundle_content_line_item_product_id": 456456456, "bundle_content_line_item_product_title": "Content Product", "bundle_content_line_item_variant_id": 321321321, "bundle_content_line_item_variant_title": "Medium / Red", "bundle_content_line_item_title": "Content Line Item Title", "bundle_content_line_item_sku": "SKU67890", "bundle_content_line_item_vendor": "Vendor Name", "bundle_content_line_item_image_url": "https://cdn.shopify.com/..." }
Explanation of Fields:
bundle_line_item_id
: Unique identifier for the parent bundle line item.bundle_line_item_price
: Price of the parent bundle line item.bundle_line_item_quantity
: Quantity of the parent bundle line item.bundle_line_item_fulfillment_status
: Fulfillment status of the parent bundle line item.bundle_line_item_total_discount
: Total discount applied to the parent bundle line item.bundle_line_item_properties
: Properties of the parent bundle line item.bundle_line_item_product_id
: Shopify ID of the parent bundle product.bundle_line_item_product_title
: Title of the parent bundle product.bundle_line_item_variant_id
: Shopify ID of the variant bundle productbundle_line_item_variant_title
: Title of the parent bundle variant.bundle_line_item_title
: Title of the parent bundle line item.bundle_line_item_sku
: SKU of the parent bundle line item.bundle_line_item_vendor
: Vendor of the parent bundle line item.bundle_line_item_image_url
: Image URL of the parent bundle line item.bundle_content_line_item_id
: Unique identifier for the bundle content line item.bundle_content_line_item_price
: Price of the bundle content line item.bundle_content_line_item_quantity
: Quantity of the bundle content line item.bundle_content_line_item_product_id
: Shopify ID of the content product.bundle_content_line_item_product_title
: Title of the content product.bundle_content_line_item_variant_id
: Shopify ID of the content variant.bundle_content_line_item_variant_title
: Title of the content variant.bundle_content_line_item_title
: Title of the content line item.bundle_content_line_item_sku
: SKU of the content line item.bundle_content_line_item_vendor
: Vendor of the content line item.bundle_content_line_item_image_url
: Image URL of the content line item.
This structured data enables merchants to better understand and manage their bundles, especially when dealing with multiple sales channels.