Removed Items

Solved
kobi_beprofit
Shopify Partner
11 0 1

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?

kobi_beprofit_1-1615801548494.png

Currently this "removal" generates a refund and we can't differentiate between removed items and actually refunded items.

Thanks.

 

 

0 Likes
_JCC_
Shopify Staff
Shopify Staff
162 22 29

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

0 Likes
kobi_beprofit
Shopify Partner
11 0 1

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

0 Likes
kobi_beprofit
Shopify Partner
11 0 1

Anyone available to help with this issue?


Thanks.

0 Likes
lksenia
Tourist
9 1 3

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

kobi_beprofit
Shopify Partner
11 0 1

Thanks, this sounds valid!

0 Likes