We have found that if a kit product ships, you can see the component lots in the shipped_line_item_lots on the API. Separately using the API it seems we can see those kit_components by querying the productkit_components{} where kit is true.
My question is, if a kit changes, how do I know what kit components shipped out on the actual order? shipped_line_item_lots doesn’t show a sku – and if I attempt to fill the data myself by joining to kit_components I am worried if the kit changes the actual shipped skus may differ from the ones currently configured under as kit_components.
IE, order shipped a month ago, we changed the kit components last week
I can confirm that if you ship an order with a kit, then change the kit components the subsequent query will reflect the updated kit.
IE:
You ship an order with a kit that has 3 components, then you change the kit to have 2 components. Then you run a query on the order and that will return that the kit has only 2 components.
I’m not sure if it’s possible to have the data reflect like how you’re asking.
If interested this is the query I used:
{
order(id: "334526978") {
request_id
complexity
data {
id
legacy_id
order_number
partner_order_id
shipments {
id
line_items(first: 5) {
edges {
node {
id
legacy_id
line_item{
id
legacy_id
sku
quantity
product{
kit_components{
id
sku
quantity
}
}
}
}
}
}
}
}
}
}
Please let me know if you have any questions or concerns.
Best,
RayanP
Thank you for getting back to me. I would argue that once the kit is shipped, the kit_components data should be denormalized on the shipment, or wherever is appropriate. Otherwise, there is no historical record of the shipped kit_components.