How to email ticket info automatically to Non-Agents | Community
Skip to main content

How to email ticket info automatically to Non-Agents

  • August 14, 2013
  • 34 replies
  • 0 views

How to Forward or CC automatically to Specific Non-Agents

In some workflows, it is necessary to pass ticket information to users outside of your support team who are not Zendesk agents.

In this tutorial, we will show you how to implement automatic emails to specific users outside of your helpdesk, and give an example of how this could be used.

Limitations: Each person you wish to notify will need a separate target made, so this is somewhat limited to predicable persons and by logistics of the number of persons to be included.

Mail Extension: It is possible to extend this so that a single target can be used in Zendesk, but this requires configuration in a mail system outside of Zendesk and may not be available to all users.

The Problem

When adding outside users as a CC to a ticket, notifications are only emailed if the comment is public, thus the End User also sees the comment.   

The Plan

In this tutorial, we will show you how to use targets, tags, triggers and macros to send notifications to a predefined non-agent users.

By creating the outside targets, we are able to define the persons we expect to be notifying, in this example, Mike in our admin team.

The Steps!

Create the Target

1) In Zendesk, navigate to Admin > Settings > Extensions > Targets

2)  Select ‘Add Target’

3) Give you target a descriptive name.  Example: ‘Mike – Private Email Notification’

4) Enter the email address. Eg:  mike@mydomain.co.nz

5) Enter a Subject, you can include placeholders.  Eg: Private Notification - {{ticket.title}}

6) Test the target, then select ‘Create Target’ and Submit.

Target completed!

Note: You will need to create a target for every email address you want to be able to notify.

Create the Trigger

1) Navigate to Admin > Business Rules > Triggers.

2)  Select ‘Add Trigger’.

3) Select desired conditions. 

This could be used in a number of ways.  For this example we select the following:

  • Ticket: Is…  Updated
  • Ticket: Tags  Contains at least one of the following  mike_notify
  • Ticket: Status  Less than  Closed

4) Select the actions to perform.  Example below.

  • Notifications: Notify target ‘Mike – Private Email Notification’ (As created in above target sample)
  •  Message: 

Please contact the client below to address this issue.

View here {{ticket.url_with_protocol}}

Email: {{ticket.requester.email}}

Phone: {{ticket.requester.phone}}

Previous communication as below.

{{ticket.comments_formatted}}

  • Ticket: Remove Tags mike_notify
  • Select ‘Create Trigger’ and Submit

Trigger completed! 

Note: You will need separate triggers for each target, unless of course you are wanting to notify a group of people rather than just one.

At this point, you have a manually activated target.  You can now manually add the tag mike_notify to your ticket, and submit with any other changes, including a Private/Internal comments.  However, we would always prefer to make things as simple and agent-proof as possible, so the following Macro will make this example complete.

Create the Macro

In this example, I am wanting to close the ticket by referring to Mike and will expect him to take over.  Personally I would make this a public comment, so that the customer knows what is happening.  You can easily set this to private if this suits your needs. 

  1. Navigate to Admin > Manage > Macros.
  2. Select ‘Add Macro’.
  3. Enter a Marco Title.
    Example: ‘Notify Mike and Solve’
  4. Perform these Actions.
    Ticket: Status Solved
    Ticket: Add tags mike_notify
    Ticket: Comment Mode Public (or Private as you prefer)
    Ticket: Comment/Description - as below…
    -------------------
    Hello {{ticket.requester.first_name}},
    Your request has been referred to Mike in our admin team.
    This ticket on our online system will now be closed and Mike will contact you via phone or email to continue to assist you.
    Thank you for contacting us!
    ------------------- 

Macro created!

All set 

You now have a VERY simple way to move a request outside of your Zendesk!

 

This topic has been closed for replies.

34 replies

  • Author
  • August 15, 2013

Slight mistake - for the trigger should read "Ticket: Status      >Less than             >Closed"

It has been corrected in the text.


Jennifer16
  • August 15, 2013

Thanks for sharing this, Andrew!


  • September 5, 2013

This works really well for us, thank you!


  • Author
  • September 5, 2013

Hello Caroline,  

 

Glad you like it. We have been using this for several weeks now and it seems to be going nicely.  


David245
  • August 14, 2014

Hi,

I've started using this to notify non-agents when a particular type of ticket comes in. The problem I'm having is they can't simply reply to the email to append a comment to the ticket. Their reply creates a whole new ticket.

Any way around this?

Thanks,

Dave

 


  • August 14, 2014

Hi Dave, 

This is expected behavior for replies to email target notifications. Since the reply is coming from someone who is not part of the ticket (and possibly not even associated with Zendesk) Zendesk won't append the reply to the existing ticket, you'd have to merge the new one with the old one. You can do this with private notes so as not to notify the requester of the original ticket about an update. 

If you want to be able to have the replies update the existing ticket they would need to be a CC (which may be too revealing and could lead to unintended information being added in public comments) or an agent. 


  • August 21, 2014

Thanks for the step by step tutorial. Works like a charm!

But is there a way that the created forward also sends attached documents from the ticket?!


  • Author
  • August 21, 2014

Hello Jelmer,

Try adding this to the trigger message.  It will give the link to the attachment.  Only any use to someone that is not an agent if you do not have private attachments turned on.

{% for comment in ticket.comments %}

Comment: {{comment.created_at}} {{comment.author.name}} {{comment.value}}

Attachment: {% for attachment in comment.attachments %} {{attachment.filename}} {{attachment.url}}

{% endfor %}

{% endfor %}


Jennifer16
  • August 21, 2014

Hey Andrew, thanks for posting the answer!

And nice to see you. :)


  • Author
  • August 21, 2014

Yup - I am still here.


  • August 22, 2014

Thanks! :-)


  • August 25, 2014

Thanks for sharing, I wonder how I could not have seen this post yet!
To bad it only works for an update but I will look into it a bit myself now xD

Question though about:

  1. Ticket: Is…           Updated
  2. Ticket: Tags         Contains at least one of the following     mike_notify
  3. Ticket: Status      >Less than             >Closed

What happens here if you change 1 --> Ticket is... New 
So:

  • Ticket: Is…           New
    • Ticket: Tags         Contains at least one of the following     mike_notify
    • Ticket: Status      >Less than             >Closed

And you give a specific organization the tag: mike_notify

Each new ticket would have the tag ( for that organization )
Wouldn't that work? ( And ditch the macro ) or am I overviewing something here.
Are you able to create an automated fill in end-user CC's email for each new ticket of an organization?


  • Author
  • August 25, 2014

@Kristof - it depends what you are trying to achieve.  We wanted to select when and who the request was passed to - you could use this to email an account manager and NOT close the ticket, or to close all tickets from an organisation and email someone else. 

Please let us know what you decide and how you use it.


  • August 26, 2014

Hmm I think I see what you mean, I'm going to try and play around a bit with it :)
Thanks for the feedback

Kind regards
Kristof


  • September 3, 2014

Make the modification, and deactivate the original, so you can always return home if something goes awry.


  • September 3, 2014

The problem I'm having is they can't simply reply to the email to append a comment to the ticket. Their reply creates a whole new ticket.


  • Author
  • June 2, 2015

Hello Michael,

If you wanted the person to continue the conversation in the ticket - you either add them to the ticket as a CC or make them an agent and assign the ticket to them.  The entire intention of this is to move the request outside the helpdesk.

Our message to the 'non-agent' is very clear that they must now contact the person directly.  You could use more 'persuasive' wording if needed in the trigger.


  • February 5, 2016

I want to use this feature to facilitate mentions to our development team who are not Zendesk users (they use TFS). We have a trigger set up to email the target when a @Andrew for example is on the ticket. 100% of these comments are all marked as internal - but because the target is not an agent - when they get the email - all of the internal comments are not there - how do I solve this? 


  • Author
  • February 8, 2016

Hello Andrew - not 100% sure on this, but the trigger that sends the message to the non-agent target - you should be able to use a placeholder for the full comment stream, not just public comments.


  • August 19, 2016

I am having the same issue as Andrew, the private comments are now coming through.


  • January 7, 2017

I'm having the same issue, it's only showing public comments, none of the internal comments


  • Author
  • January 8, 2017

Possibly the private comments are specifically withheld based on the email address?  So you are sure you are using the full ticket comment stream?  Public and Private?


  • January 9, 2017

Not sure why private comments would be specifically withheld from the email, I haven't blacklisted anyone or set anything as I'm sending to targets within the organization.

I am using the syntax {{ticket.comments_formatted}} so I assume that would be all comments versus  {{ticket.public_comments_formatted}}


  • Author
  • January 9, 2017

Hello Laura, 

'Ticket comments formatted' would be the standard variable display, which means that agents can see private comments, and users cannot. See -Zendesk Support placeholders reference

 

I suspect that unless the receiving email is for an agent, the private comments will be hidden - it's possible that how this works in targets may have changed since this was written.  But I don't think I was worried about that when I wrote it.

This may will be possible using liquid - see Using-Liquid-markup-to-customize-comments-and-email-notifications


  • Author
  • January 9, 2017

Will see if one of the liquid experts in the mod team can help :)