Solved

Removed Items

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.

 

 

Accepted Solution (1)
lksenia
Tourist
9 1 5

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

View solution in original post

Replies 6 (6)

_JCC_
Shopify Staff
200 27 55

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

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

kobi_beprofit
Shopify Partner
11 0 1

Anyone available to help with this issue?


Thanks.

lksenia
Tourist
9 1 5

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!

m1k1ng
Visitor
2 0 0

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.