Reporting on Bundle sales

We use a bundles app, and while it has gaps it does seem to implement bundles correctly. I have been digging into the graphql and tried creating bundles programmatically out of interest. I assume that most bundle apps work “correctly” because otherwise my pick runs would be messed up shoing the bundle/kit product instead of the items in the kit that need to be picked in dispatch.

What i’m confused about is the apparent lack of shopify support for reporting on bundle sales. The bundles app doesn’t seem to provide a way to do it. If i filter by the bundle product ID I see now sales, I have to filter by a product inside the bundle.

This is how you get the bundle information on your list items in Graphql - lineItemGroup. I know this because we create custom picking slips for the warehouse, and my users wanted to show items under their bundle and not just mixed in. So the data is there. Does anyone know how I can utilise native reporting tools in Graphql to produce a list of sales for a specific bundle (without Sidekick hacks like “tag the order on creation” workarounds).

I put this post in the GraphQL area, however, I really just want to understand why there is a gap. Bundles is clearly a well established protocol in the GraphQL layer.

      lineItems(first: 50) {
        nodes {
          id
          title
          quantity
          # For Shopify Bundles
          lineItemGroup {
            id
            title
            quantity
            variantId
          }
        }
      }

Hey @Si_Hobbs - thanks for raising this.

I’m going to send you a DM to gather a few more details about the bundle setup and reporting query. I’ll take a closer look and follow up here with what I find.

Rather than trying to report based on the Orders in graphql, have you considered trying to replicate the Shopify Bundles Reports using ShopifyQL to give you the component breakdowns you need?

Hey @Si_Hobbs - just following up with what we found on this thread to close the loop.

Bundle components are represented as individual order line items and linked to their parent bundle through lineItemGroup. In Analytics, this means filtering by the standard product_id targets the component product rather than the parent bundle. To report on the parent, you can use the bundle-specific bundle_product_id field - something like this:

FROM sales
SHOW bundles_ordered, total_sales
WHERE bundle_product_id = 123456789
GROUP BY bundle_title, bundle_product_id
SINCE -90d
UNTIL today

Replace 123456789 with the parent bundle’s numeric product ID and adjust the date range as needed.

Shopify also has native reports for Total sales by bundle and Total sales by bundle component. The order relationship itself is documented under LineItemGroup.

If you need to run this programmatically, ShopifyQL is also available through the GraphQL Admin API’s shopifyqlQuery endpoint: About ShopifyQL

Hope this helps!

Sincere thanks for the time you put into this Wes!