Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up an Automation to send a reminder email for support ticket

Colby Smith April 12, 2024

Hello, I'm trying to set up an automation to send an email if a ticket status has been the same for 2 days. We use JIRA for a customer support portal and if the status is set to 'Waiting for Customer' for 2 days, I'd like to send out a reminder email. My current automation setup is included below: 

image.png

The automation can see that it's happening but it isn't taking any action: 

image.png

Is there another field I should be using besides updated? My thoughts were that the ticket was updated from waiting for Support to waiting for customer 5 min ago and that should trigger the email. (I'll change this to 2 days when my testing is finished)

Appreciate any insight!

3 answers

0 votes
Ste Wright
Community Champion
April 12, 2024

Hi @Colby Smith 

You should be able to find the tickets using JQL in a Scheduled Trigger - eg.

status = "Waiting for Customer" AND not status CHANGED AFTER -2d

For example, rule might look like this...

  • Trigger: Scheduled
    • Run rule every = 1 Days
    • Run a JQL search = TRUE
      • JQL - status = "Waiting for Customer" and not status changed AFTER -2d
  • Action: Comment on issue
    • Comment = <comment here>
    • Prevent duplicates by only adding this comment once... = TRUE
    • Comment visibility = Share with customer

---

I've assumed the email is going to the customer - by using the "Comment on issue" action instead, you can prevent duplicates and the customer should still get an email notification.

This would be based on the Reporter rather than the Assignee. I assume the Assignee would be the Agent?

---

If you did want to do it via email though, there is a more absolute way of doing this using entity properties.

The rule below sets an issue property when the first email is sent. The condition then ensures that no further emails are sent, by ignoring any ticket with the entity property from subsequent rule executions.

  • Trigger: Scheduled
    • Run rule every = 1 Days
    • Run a JQL search = TRUE
      • JQL - status = "Waiting for Customer" and not status changed AFTER -2d
  • Condition: {{smart values}} condition
    • First value = {{issue.properties.emailSent}}
    • Condition = does not equal
    • Second value = TRUE
  • Action: Set entity property
    • Entity type = Issue
    • Property key = emailSent
    • Property value = TRUE
  • Action: Send email
    • Details here...

---

Let us know which one works for you!

Ste

Colby Smith June 5, 2024

Hi @Ste Wright , 

Thank you for your response and apologies for the delay. This got put on the back burner for a while. 

I attempted this first option and here is what my set up looks like: 

reminder_automation.png

Screenshot 2024-06-05 150238.png

Unfortunately, no event is triggered despite the validation running and finding the 3 issues I created as a test. 

Screenshot 2024-06-05 150406.png

 

I set the intial time to run every 5 minutes and the status not changed for 1h for testing purposes. Is the issue the -1h? 

Any insight is greatly appreciated. 

Thanks, 
Colby Smith

0 votes
Guess_ Brandi N_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Hello, I would do this a little differently, but I may also not be correct. 

I would set a trigger as scheduled daily, say at 8 am, to check for tickets that have the status waiting for customer and that status was added greter than 2 days ago, then send email to reporter 

I would have to open automation to see exactly how that falls into the setting sbut that is how I would do this. 

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Hello @Colby Smith 

Couple of changes.

You need to do a scheduled trigger instead of Issue transitioned and pass a JQL -> status = "Waiting For Customer", uncheck exclude issues checkbox..

And then in your If condition, Instead of Updated equals 5 mins, try Updated greater than 5 mins.

Then manually run the rule to see if email is triggered.

Then you can schedule this rule to run daily or whatever frequency.

But who is getting this email and who changes this status eventually? Could it be that customer responded but status is still waiting, so you mayne sending spam.. not sure of your flow there.. so think that part thru..

Hope it helps.

Guess_ Brandi N_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

good point, because I assumed automation is changing the status when the custome replys, and if they get this working theyll need to make sure that is also automated so people dont get emails when they did infact reply to the ticket 

 

Like Kalyan Sattaluri likes this
Colby Smith April 12, 2024

Hi @Kalyan Sattaluri 

Thanks so much for the insight. This is meant to be a reminder email sent out one time to our customers if we're waiting on a response from them. The idea is that our support agents will update the ticket when we respond to Waiting for customer. After two days of sitting in that status, we'll send a reminder email that says "Hey, we're waiting to hear back from you, your ticket will auto solve after x amount of days with no response".

Hopefully that makes sense, does the above workflow solve the workflow I described? 

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Hello @Colby Smith 

So you want to send this email just once?

 

Colby Smith April 12, 2024

@Kalyan Sattaluri 

 

Correct, if updated from 'Waiting For Support' to 'Waiting For Customer' has occurred and the status of 'Waiting For Customer' has not changed for 48 hours. Send a single reminder email until the next automation runs to close their ticket after 10 days for example. 

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

At a high level, there are 2 ways to solve this.

Either use an unused field to store that you have sent an email or store it in entity property.

I am sharing how to do it using entity property action.

Basically if you go into a rule and choose components, action and search entity, its one which says "set entity property", select that for this purpose..

So, You will start with scheduled trigger and give a JQL => status = "Waiting for Customer".

IMPORTANT NOTE: To test, give just 1 key whose status is waiting for customer.. so a JQL like => key = ABC-123 ..that way, you are not running across all issues and sending a ton of emails..

Then follow along the belong screenshots and implement.. Do try to log as I have so we know whats happening..

Trigger the rule couple of times, first time will send email but next time it wont.

Let me know if questions..

Again, you can do the same with storing it in an unused field as well.. Its the same. This is just one of the approaches..

image.png

 

image.png

 

image.png

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

BTW, my If condition is checking if created was 2 days or older.

You want to test 5 mins logic, change if condition check to {{issue.created.diff(now).minutes}} instead for your test purposes.

Colby Smith April 12, 2024

@Kalyan Sattaluri Thanks again for the help here. Unfortunately, I don't see a THEN: action to add value to the audit log.


image.png

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Just type "Log", it will show up.. Log Action..

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events