Recent searches


No recent searches

Automated follow-up comments for Pending tickets (public or internal)



Posted Sep 28, 2015

Problem:

Need an automated way to follow-up publicly with clients on tickets in a Pending state for more than 'x' hours, and subsequently follow-up with them Solving their tickets if no response is received after 'y' hours. 

Doing so will enable a Support team to focus on New tickets as well as ones in an Open state knowing that ones pending clients will be followed up upon automatically and Solved if no response is received.

Solution:

Create a URL Target to be used in an Automation to make a public comment that's visible to clients.

Implementation:


1. Check your API Settings:

- Go to Settings > API and copy your username as listed under "Token Access" (e.g. email@somedomain.com) and your "Active API token".

Note that this example applies to when "Token Access" and "Password Access" is enabled.  You may have to tweak the below steps if your settings are different.

2. Create a URL Target:

- Go to Settings > Extensions > Targets tab and click Add Target then select "URL target"

- Specify the following:

  • Title = "Auto Public Comment" (This can be anything. It is referenced when creating a Trigger or Automation)
  • URL = https://{subdomain}.zendesk.com/api/v2/tickets/{{ticket.id}}.json?ticket[comment][public]=true (Where "{subdomain}" is your Zendesk subdomain)
  • Method = PUT
  • Attribute Name = ticket[comment][body]
  • Basic Authentication > Username = (Specify the username from Step 1 followed by "/token", e.g. email@somedomain.com/token)
  • Basic Authentication > Password = (Specify the token from Step 1)

- Change the drop-down at the bottom of the page to "Test Target" and Submit.  If you don't get any errors, select "Create Target" and Submit.

3. Create Automation to automatically follow-up on Pending Tickets:

- Go to Settings > Automations and click Add automation

  • Title = "Auto-followup on Pending ticket after 'x' business hours"

- Set it to meet all of the following conditions:

  • Ticket Tags contains = my_testing (This can be anything unique for your initial testing.  Remove it when you are confident that the Automation is working correctly)
  • Ticket Tags contains none of the following = followup (This can be anything.  Tag is used to ensure that the automation isn't performed multiple times)
  • Ticket Status is Pending
  • Ticket hours since update greater than 'x' business hours (Where 'x' is the number of hours elapsed to trigger this automation)

- Set it to perform these actions:

  • Ticket Add tags = followup
  • Notifications Notify target = "Auto Public Comment" (Set this to whatever you called your Target in Step 2)
  • Input your Message which could say something similar to the following:"Hi {{ticket.requester.first_name}}, this is an automated email.  We haven't heard back from you regarding this issue.  Please advise in the coming days should you require anything further."

- Click Submit to save your changes.  

Note that the above message will be sent in the name of the user specified in Step 1.  I have this set up as my user so clients will see the comment as coming from me.

4. Create Automation to automatically follow-up and Solve Tickets:

- Go to Settings > Automations and click Add automation

  • Title = "Auto-solve Pending ticket after 'y' business hours"

- Set it to meet all of the following conditions:

  • Ticket Tags contains = my_testing
  • Ticket Tags contains = followup
  • Ticket Tags contains none of the following = solve_ticket
  • Ticket Status is Pending
  • Ticket hours since update greater than 'y' business hours (Where 'y' is the number of hours elapsed to trigger this automation)

- Set it to perform these actions:

  • Ticket Add tags = solve_ticket
  • Ticket Status = Solved
  • Notifications Notify target = "Auto Public Comment"
  • Input your Message which could say something similar to the following:"Hi {{ticket.requester.first_name}}, this is an automated email.  We haven't heard back from you regarding this issue.  We are going to close this ticket for now but please advise in the coming days should you require anything further."

- Click Submit to save your changes.

5. Remove tags when ticket is re-opened (optional):

You may want to create a Trigger to remove the automatically generated tags when a ticket is re-opened.  This will enable the automation to kick in again once it is set to Pending a second time.

- Go to Settings > Triggers and click Add trigger

  • Title = "Remove any automatically generated follow-up tags when ticket is changed to Open"

- Set it to meet all of the following conditions:

  • Ticket is Updated
  • Ticket Status changed to Open

- Set it to perform these actions:

  • Ticket Remove Tags = followup solve_ticket

Conclusion:

You can modify the above to do any number of things including automated internal comments (e.g. create a comment upon ticket creation for agents to add specific email addresses to the CC for all tickets associated to a particular organization, create internal ticket handling notes for specific organizations).  To do an internal comment instead of a public one, simply create a second target and change its URL to end with "[public]=false" then use it in any Trigger or Automation.

I used to have to create a view of tickets in a Pending state for 2 weeks then bulk update them to Solved with a Public comment.  Within the hour of implementing this, a number of clients responded to the automated follow-up stating that their tickets could be closed.  After almost a week of it being in place, our backlog (open tickets) has dropped significantly.  Now all I need to do is create a report to track how many tickets were automatically followed-up on and how many were subsequently closed due to non-response.

A special thanks to Phil Holcombe whose steps listed in the Adding Comments via Triggers and Automations thread helped point me in the right direction.  I also wanted to thank Jason Littrell whose comment on March 27, 2015 in the Add Assignee Comment in Trigger Action post clarified how this functionality could be automated.  Lastly, thanks to Zendesk Support who helped me with a token issue.


1

5

5 comments

Great stuff! This has been a thorn in my side for a long time. I'm having some challenges implementing though:

1. The URL target is not working when i visit it directly, but the test says 'message successfully sent'. When I visit the URL, I receive a message - {"error":"InvalidEndpoint","description":"Not found"}. When I remove everything after 'tickets', I do not get the error. 

2. For the authentication, the target test is only a success when I use my Zendesk login credentials, not the TOKEN. And it is only a success when I leave the full {{ticket.id}}.json?ticket[comment][public]=true on the target URL.

3. When following the steps for "Auto Solving Pending Ticket" I get this error:

Automation could not be updated as:

  • Automation must not run multiple times per ticket: It must have a time based condition that is only true once (Hours since created is 24) or a action that nullified a condition ("Priority Is High" and an action setting it to "Priority Is Urgent").

When I add an action such as 'updating ticket status' via the Zendesk options, the error goes away.



0


As an update, adding 'Ticket Tags doesn't contain = solve_ticket' to the conditions corrected my #3 issue above.

0


Good catch Kevin.  I noticed a couple of omissions and since updated step 4 in my overview to include the following:

  • >> Set it to meet all of the following conditions:
    *Ticket Tags contains none of the following = solve_ticket
  • >> Set it to perform these actions:
    *Ticket Status = Solved

Regarding point 1 in your post, I never tried browsing directly to the URL in the target but when I submitted "Test Target" and it worked, I moved on to the next steps.  Can you elaborate why you are trying to browse to the URL? 

For the 2nd point in your post, I just realised that I left out a key instruction in step 2 which I have since updated (I left out the "/token" when specifying the username):

  • *Basic Authentication > Username = username from Step 1 followed by "/token" (e.g. email@somedomain.com/token)

Hopefully the above will get this working for you.  Sorry for the omissions.

0


Thanks for the update Jay! 

Disregard my point 1. The ticket commenting works in the method you described. I just assumed you would be able to reach the target URL, and because I couldn't, thought it would not fire correctly. Not the case. Everything works great!

As for the authentication information, I currently have it working using my Zendesk login. Not sure if both methods are applicable, but everything is automating for me. 

Thanks again for this great tip!

0


Really cool stuff Jay, thanks for sharing.

0


Post is closed for comments.

Didn't find what you're looking for?

New post