What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I automate email notifications for refunds using Shopify Flow?

How can I automate email notifications for refunds using Shopify Flow?

chrisjohnsen
Visitor
3 0 0

Hello everyone!

So I want to make a Flow that automatically sends an email to our accounting department when a Refund has been made. 

The flow shall consist of the following: 

 

- Order number

- Amount 

- Date of the refund

 

Is this possible? If yes, which "fields" should I use?

Replies 5 (5)

paul_n
Shopify Staff
1445 157 334

Yes, use the "Refund created" trigger and "Send internal email" action. Some variables to consider for the email body:

 

Order number: {{order.name}}
Refunded: {{refund.totalRefundedSet.shopMoney.amount}}
Total Price: {{order.totalPriceSet.shopMoney.amount}}
Date refunded: {{refund.createdAt}}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
chrisjohnsen
Visitor
3 0 0

Hi @paul_n 

 

Thanks a lot for your reply! 

 

So I set up the Flow with your help and it works. However today I saw that it triggered because of a Voided Order with no transaction. How come? And is it possible to set up a rule that fixes that? Something along the lines of 'If Voided STOP'. 

 

Thanks in advance!

paul_n
Shopify Staff
1445 157 334

I'm not sure precisely what you mean by voided. You might have better luck going through support for that so that you can provide links to the voided order and the workflow so they we can see the data in your store. If it was me, I would use GraphiQL to get details about that order and find a variable that captures whether it was "voided". 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
chrisjohnsen
Visitor
3 0 0

Hi Paul 

 

With Voided I mean that the Order has been cancelled/some of it has been cancelled. 

Also there has been no payment from the customer, so there is no amount to be refunded. 

 

Voided is a Status in Shopify, so I am a bit confused that you don't recognise what I mean?

I did try to find a way to contact support, but with no luck, only a lot of different articles. 

paul_n
Shopify Staff
1445 157 334

Voided isn't an status that I can see on Orders. Since I don't see that exact term anywhere I wasn't sure if you meant something other than "Cancelled". 

 

There are probably a bunch of ways to detect if no money exchanged hands for a "refund". The easiest might be to check order / totalRefundedSet / shopMoney / amount > 0

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.