We’ve been using the returnCreate mutation in the Admin GraphQL API to create returns on Shopify, including gift returns. Recently, we’ve noticed an increase in cases where the gifter becomes aware that a return has been made.
I understand there’s no way to completely prevent gifters from checking their order status page and seeing that a return exists. However, it would be great if we could at least avoid proactively notifying them.
I saw that the notifyCustomer parameter on returnCreate has been deprecated, but gifters still receive a notification through the Shop app that a “Return request has been approved.”
Could someone clarify whynotifyCustomer was deprecated? And is the expectation that we should migrate to returnApproveRequest, since that mutation still includes a notifyCustomer parameter?
Hey @Rohan-Frate - thanks for your patience on this! notifyCustomer was deprecated on returnCreate since that mutation is designed for creating already-approved returns, if that makes sense..
Right now, recommended workflow is to use the returnRequest mutation to create a return in the REQUESTED state. Then, like you said, you’d use the returnApproveRequest mutation to approve it and move the return to an OPEN state (this still accepts notifyCustomer)
You can still control notifications during the approval step using returnApproveRequest(notifyCustomer: false), which should give you the same flexibility for those gift return scenarios. Hope this helps/makes sense - let me know if I can clarify anything here.
One additional loophole we’ve noticed is that the original customer (the gifter) can log into their account and see that a return has been started from their order page. Is there any way to disable or hide this?
We considered changing the customer associated with the order (to the giftee), but that causes the order to disappear from the gifter’s history entirely, which could actually seem more suspicious.
Do you have any recommendations or best practices for handling this scenario?
Hey @rohan-frate. From a purely backend/API perspective, there’s not an easy way to hide these orders from popping up in the customer’s order history on the frontend, but there might be a workaround here depending on which customer account version your merchants are using.
If they’re on classic/legacy customer accounts, you could technically customize the customers/order template in Liquid to conditionally hide return information for gift orders. I would do something like marking the gift orders with a metafield when creating the return, then, you can have Liquid check for that flag in the template and wrap your return display code in a conditional to hide it.
If they’re on the new Customer Account Framework, this won’t work because extensions can’t hide or modify native platform UI, only add new content at specific targets if that makes sense. You can check which version the merchant is using by querying the CustomerAccountsV2 object in the Admin API, though. If it’s classic accounts, the Liquid approach is straightforward and would actually solve your visibility problem.
If it’s new accounts, unfortunately, at the moment this would be a platform limitation with controlling notifications using returnApproveRequest(notifyCustomer: false) being the best bet. Let me know if I can clarify anything as always, also happy to put through a feature request for you when it comes to hiding those orders in the frontend UI, it does make sense to offer a function like that for your use case, just let me know!
Thanks @Rohan-Frate - I’ll set up that feature request for you right away on my end here. Please let me know if I can help out with anything else on our end. I’ll just mark this thread as closed for tracking here.