While migrating the Refunds from REST to GraphQL we found discrepancies in values for the OrderAdjustmentDiscrepancyReason.
In REST we have the following values which have no equivalent in GraphQL;
Shipping refund
Historical adjustment
Failed refund adjustment
Failed refund discrepancy
Does anyone have the mapping from REST to GraphQL for these values?
Hey again @Mathieu_Nunez as of API version 2024-10, shipping refunds were no longer considered order adjustments and we required them to be accessed through through refund_shipping_lines which is why they don’t map to OrderAdjustmentDiscrepancy Reasons in GraphQL (more info here: Refund - REST).
That said, for failed refund adjustments/discrepancies, I get how the generic enum might not work there. Out of curiosity, do you have an example order ID (or IDs), where those different adjustment values are showing in REST? I can take a look on my end here to see if I can investigate further internally and share a concrete answer.
Hi @Alan_G . Thank you for looking into this. For the shipping refunds we will look at how to use the shipping lines instead of the order adjustments. I will get back to you if I have further questions.
For the other values see sample order ids below;
Historical adjustment - 2641520772 (2016)
Failed refund adjustment - 216938020901 (2018)
Failed refund discrepancy - 277092958245 (2018)
I have put the year in which the record was created. I could not see any occurrences past 2020
Thanks @Mathieu_Nunez, appreciate you sharing those example orders. My thinking is that since these are from a while back, it may be that these are deprecated values that we no longer support due to historical mapping of the legacy REST API, but I’ll do some digging on my end to confirm this is the case and to see if we can share some best practices for you.
Hey @Mathieu_Nunez - I was able to speak with the product team, and going forward, our recommendation is to use REFUND_DISCREPANCY to map “Historical adjustment”, “Failed refund adjustment”, and “Failed refund discrepancy” from the legacy REST API if needed.
That said, I’m also going to see if we can get this added to our documentation in order to make this more clear. Let me know if I can clarify anything more on our end here - hope this helps