Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Determine Gift Cards Issued as refund for an item return

Determine Gift Cards Issued as refund for an item return

a_groovy
Visitor
2 0 0

Hi All,

 

I have an order where an item was returned by a customer and refund was provided in form of a gift card.

This gift card is added to line items object in Order API.

I would like to know if there is any data returned in the Order API which can help make me determine that the gift card was indeed issued as a refund

Replies 3 (3)

simmsy
New Member
7 0 0

Hi @a_groovy - did you ever find a way to link the gift card to the return?

a_groovy
Visitor
2 0 0

So here is how you can do it @simmsy . you have to use combination of sales agreement data thru graphql (Documentation) and order api

Here is logic if gift card line was added after order was placed and if customer paid 0 for it was most likely tied to a refund. What customer paid for it can be determined through the Sales Agreement object.

 

This is the best I could come up with. Hope this helps.

simmsy
New Member
7 0 0

Woof, you'd like to see something more concrete. Thanks for the quick response!