Hi,
Is there a way to understand via the GraphQL admin API which line item on an order is the “X” when a BuyXGetY discount has been applied to an order? While trying to develop a self-service returns app, I am trying to identify which line items on an order are affected by a BuyXGetY discount. It is (partially) clear which item is the “Y” line item (it has been allocated a discount) but it is unclear which item is the “X”.
I thought maybe the “index” field under the DiscountAllocation key would provide some insight but it doesn’t appear to.
The reason I am trying to identify the “X” is that I want to force customers to return item “Y” when they choose to return item “X”.
I hope that makes sense. Please let me know if I can add more clarification.
Thanks!