Discussing APIs and development related to customers, discounts, and order management.
I noticed that when I approve/decline return request via Shopify Admin, Shopify sends emails to customer, but when I approve/decline via API, Shopify doesn't. Is it normal behaviour?
https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/returnApproveRequest
https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/returnDeclineRequest
Thanks.
Solved! Go to the solution
This is an accepted solution.
Hi Danylosi,
Yes, this is the expected behavior. When you manage return requests through the Shopify Admin, Shopify automatically handles customer notifications. However, when managing these requests through the API, the system assumes you are managing notifications on your end within your app or system. This is because the API is designed to give you more control over the actions that are performed. It's up to you to implement any additional functionality, such as sending an email notification, in your application.
If you want to send emails to customers through the API, you will need to incorporate this functionality into your app or use a third-party service.
Hope this helps!
Liam | Developer Advocate @ 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
This is an accepted solution.
Hi Danylosi,
Yes, this is the expected behavior. When you manage return requests through the Shopify Admin, Shopify automatically handles customer notifications. However, when managing these requests through the API, the system assumes you are managing notifications on your end within your app or system. This is because the API is designed to give you more control over the actions that are performed. It's up to you to implement any additional functionality, such as sending an email notification, in your application.
If you want to send emails to customers through the API, you will need to incorporate this functionality into your app or use a third-party service.
Hope this helps!
Liam | Developer Advocate @ 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