[BUNDLE] Add properties to bundle components

Background

I’m working with a Shopify store that uses product bundles and custom shipping calculations via the Carrier Service API. I’ve encountered a critical issue: when calculating shipping rates, the API only provides the bundle components in the items array of the rate payload, not the parent line item. This means I can’t access properties stored on the parent bundle item during shipping calculations.

The Problem

Since I can only add properties to the parent line item (not the components), I have no way to pass crucial information needed for shipping calculations.

What I’ve Tried

1. Cart API Approach

I cannot find a way to add properties this to bundle components.
When i check my cart items using this API, i see that my item has components but cannot find a way to access them :

2. Checkout UI Extension

I’ve also tried implementing a solution using Checkout UI Extensions API “useApplyCartLinesChange”, but it appears that there’s no direct API for modifying properties of bundle components there either since we are manipulating CartBundleLineComponent and not CartLine`.

Error is : “Could not apply line item changes. Error: Unknown line item id: “gid://shopify/CartLineComponent/d207a58382a853ed4e59add160fa389a””

The Carrier Service API Challenge

Here’s the critical part: in the Carrier Service API payload, the items array only contains the individual components of bundles, not the parent items. Since I can’t add properties to these components, I can’t pass necessary information to my shipping calculation service.

Example of what I receive in the rate request:

json

{
  "rate": {
    "origin": {...},
    "destination": {...},
    "items": [
      {
        "name": "Component 1 of Bundle",
        "sku": "COMP1",
        "quantity": 1,
        "grams": 500,
        "price": 1000,
        "vendor": "My Store",
        "requires_shipping": true,
        "properties": [] // This is empty! I need to add properties here
      },
      {
        "name": "Component 2 of Bundle",
        "sku": "COMP2",
        "quantity": 1,
        "grams": 300,
        "price": 500,
        "vendor": "My Store",
        "requires_shipping": true,
        "properties": []
      }
    ],
    "currency": "USD",
    "locale": "en"
  }
}

Note that the parent bundle item, which can have properties, is not included in this payload.

My Goal

I need to attach custom data to each bundle component for accurate shipping calculations.

Questions

Is there any way to add custom properties to bundle components that will be visible to the Carrier Service API?

Any insights or suggestions would be greatly appreciated. This is blocking our ability to accurately calculate shipping for bundles.

Thanks in advance for your help!

I replied on Slack but posting here aswell,
It should be possible to add line item properties to component.
Are you using an custik cart transform function or an app? I have tried this using Foxsell bundless and it works, so maybe theres something specific about the app.

Also what about storing info in cart attributes? Could that work?

Hello @Taksh thanks for your answer.

We are using a checkout UI-Extension in a custom app to try this.
For the bundles, we are using the native Shopify Bundle App.

For the cart attributes, unfortunately, they are not transmitted in the carrier service API Payload.
So i cannot rely on that.