Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
I have just setup a development store to support the new feature around Split Shipping.
Split shipping is designed to support allowing multiple shipping costs to be attributed to the order, when that order has items that get shipped separately (for various reasons)
Split Shipping works nicely in the checkout, and I setup 3 different Shipping profile with products from different product groups.
The issue I have is in the webhook ("ORDERS_CREATE") Order payload. When I create an Order that had multiple items from each of the 3 Shipping profiles, I was expecting some way for the line_items to be linked to the Shipping_lines in the order Payload, so we could determine which item(s) caused the extra shipping option to be added to the order.
But... In the Order payload all that has been added to support Split Shipping is that the different shipping that was paid for in the Order has been added as extra shipping_lines. So now my order has 3 Shipping_Lines but there is no way to link any of these Shipping_lines back to the line_items that caused the Shipping to be added to the order.
I expected to see a property on the Order Item (in the line_items array), maybe called something like shipping_line_index that just contained say 0, 1, 2 (which is an index back to the Shipping_line array) so we can identify the Shipping line that the Item will be covered by
As another analogy, the discount_applications listed in the Order payload are referenced from the line_Items under the discount_applications.discount_application_index property. This way you can see exactly the line_items that were covered by an associated discount in the order
I suspect that this was just missed in their initial implementation, and I have asked for a feature request - But this needs people to agree before we can get it through