Nested cart lines: how to receive parentRelationship via webhooks

Hi,

I’m using the new nested cart lines feature with the Cart API + Checkout UI Extensions, and everything works correctly in the cart/checkout (parentRelationship is present).

However, in my webhooks (version 2025-10) the parent/child relationship data is completely missing. The documentation says that the Webhook API supports nested cart lines, but the webhook payloads (e.g., orders/create) do not include any parentRelationship or similar field.

Should the parent relationship already appear in webhook payloads, or is it not implemented yet?

Thanks!

The data is there, just not where you’d expect it - the field is called sales_line_item_group_id in webhook payloads rather than parentRelationship.

I tested this end-to-end (created nested lines via Storefront API, completed checkout, captured the webhook) and child items have sales_line_item_group_id populated with a numeric ID that references the parent group, while parent items have it set to null.

Here’s what the webhook payload looks like:

// Parent line item
{
  "id": 14934210412693,
  "title": "Example T-Shirt",
  "sales_line_item_group_id": null
}

// Child line item (nested under the T-Shirt)
{
  "id": 14934210445461,
  "title": "Example Pants",
  "sales_line_item_group_id": 5330305173
}

If you need more than just the ID (like the parent’s title or quantity), the GraphQL Order API gives you a full lineItemGroup object on child items that includes those details. You’d just need to make a quick follow-up query after receiving the webhook.

The nested cart lines docs mention webhook support but don’t actually show the field name or payload structure, which is why it’s not obvious (I’ll flag this to see if it can be added). Worth noting the field naming is inconsistent across APIs - cart uses parent_relationship, Storefront uses parentRelationship, and webhooks use sales_line_item_group_id.

Does that field work for your use case?

Hello,

I noticed the sales_line_item_group_idfield, but it doesn’t really help, as there is no way to determine which line item is the parent.

I think the nested cart lines are a really good addition, but it seems like its half done.

Fetching the order via graphQL seems really unnecessary, but thats what we need to do at the moment it seems.

Thanks for the additional info @Klem3n - I’ve logged this as product feedback internally since it’s a gap in the current implementation. Ideally the webhook payload would include either a parent line item ID reference on child items, or some indicator field like is_parent_line, or the complete lineItemGroup structure. For now, the GraphQL follow-up query is the only way to get the full parent/child relationship data.

The docs should at least be updated to show the actual webhook field (sales_line_item_group_id) and explain the limitation clearly so developers know what to expect. I’ll see if we can get that added, appreciate you flagging this!

Perfect. Thank you very much!

1 Like