I have automatically created webhook “returns/decline“.
It works, but before productions I need to test it.
I tried in admin dashboard → orders → create return → but here is only cancel
I used grapgQL application with mutation but it returns null
```
mutation {
returnDeclineRequest(
input: { id: "gid://shopify/Return/24252678313", declineReason: OTHER}
) {
return {
id
name
}
}
}
Hey @Vasyl_Onopriienko , the returns/declinetriggers when the fulfillment service declines a return request from the merchant. This is triggered in the API using the returnDeclineRequest mutation by the fulfillment app. If you wanted to test this, the easiest way would be to create a “fake” fulfillment app using the guide here:
You could then create an order and request fulfillment for it with your newly created test app and run the returnDeclineRequestmutation and the webhook should trigger. Hope this helps!
Thanks for advice. I really do not now why returnDeclineRequest mutation doesn’t work for me from graphQL app. Maybe it should be my own app with another tokens.
5) Click on Review request button. And there we can decline return.
So, the problem was that I can’t decline my own return. Return should comes from customer order page. And to return by customer I should activate “Self-serve return“ checkbox
Hey @Vasyl_Onopriienko - glad to hear you found a workaround for this. You’re correct, the returnDeclineRequest mutation does need to be made by the fulfillment app (with its own authentication credentials).
Thanks for sharing the workaround too, this will definitely help with other folks testing their apps.