A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi
Is it possible to get an indication in the GraphQL API Order object (or in any other object) when a line item is "removed", such as in this example?
Currently this "removal" generates a refund and we can't differentiate between removed items and actually refunded items.
Thanks.
Solved! Go to the solution
This is an accepted solution.
Hi,
I haven't found any docs on the subject when I was also researching this question. As far as I understand, when a refund is really a refund -- it has a transaction in the `transactions` array of the refund object. But when it's a plain removal -- the `transactions` array is empty.
Hope this helps
Hey @kobi_beprofit,
You can use the refunds field on an order query to get the refunded line items applied on the order. Hope this helps, if you have any questions please don't hesitate to reach out.
Regards,
John
John C | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi John,
Thanks for your response - unfortunately it doesn't fully answer my question.
We do use the refunds field to get refunded line items as you explained. However, the question here is how we can differentiate line items which were actually refunded from line items which were removed - for example, a case in which a seller switched one variant of a product with another variant after the order has already been paid for. The "removed" line item appears as a refund, so we cannot currently differentiate it from an actual refunded line item.
Is there a way to do this?
Thanks,
Kobi
Anyone available to help with this issue?
Thanks.
This is an accepted solution.
Hi,
I haven't found any docs on the subject when I was also researching this question. As far as I understand, when a refund is really a refund -- it has a transaction in the `transactions` array of the refund object. But when it's a plain removal -- the `transactions` array is empty.
Hope this helps
Thanks, this sounds valid!
A late response to this question. The order_line_refund object has an option where restock_type = 'no_restock' ... this response seems line up with our removed items.