I believe this is a topic that has been discussed elsewhere before, but I wanted to create another discussion here for additional visibility.
Issue:
Line item properties are removed from expanded products when creating Expand Operations via the Cart Transform Function API. This can potentially break the functionality of any app implementing cart transforms and/or break compatibility with 3rd party apps that add line item properties.
Example:
-
A product with a “delivery-date” line item property is expanded to include an upsell via the Cart Transform API. Following the function run, the “delivery-date” continues to appear on the product in the checkout.
-
Following checkout, the “delivery-date” line item property has not persisted through to the order data and the properties array for the product is empty.
Summary:
I would be surprised if this is intended behaviour and imagine this is a dealbreaker for many app developers looking to implement Cart Transforms.
The ability to add line item properties using Cart Transforms was added in the 2024-04 API version:
However, this is does not help when line item properties are created with dynamic keys and does not solve the issue of cross-app compatibility.
If anyone has discovered a work around for this in the meantime I would love to hear it!