Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Send emails for approve/decline return requests

Solved

Send emails for approve/decline return requests

danylosi
Visitor
3 0 0

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.

Accepted Solution (1)

Liam
Community Manager
3108 342 884

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

View solution in original post

Reply 1 (1)

Liam
Community Manager
3108 342 884

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