Mentions: How to add !mentions function to your Zendesk
What?
There has been some interest in having a mentions function in Zendesk. The idea is that by using !agentname in a ticket comment, the agent would receive notification of the comment. Additionally, a team mention would allow anyone using !myteam to notify all members of the team.
Love it! - How?
To add this function - follow the tutorial below.
Go to Settings > Triggers
Create a new trigger named Mentions !yourname (replacing name as required)
Set conditions as follow...
- Meet all of the following conditions - Status not changed to Closed.
- Meet any of the following conditions - Comment text contains the following string !yourname (replace 'yourname' with your username or handle)
- (optional) Meet any of the following conditions - Comment text contains the following string !yourname-alternative (maybe you want to cover your bases for a possible variation)
Set 'Perform these actions'...
Notifications: Email User > Select applicable agent user
Email Subject: Mentions on ticket {{ticket.id}}
Email Text: {{current_user.name}} mentioned you on ticket {{ticket.id}}
{{ticket.latest_comment_formatted}}
Obviously, repeat the process for each agent/username. It is possible to extend this to notify non-agents, using email targets.
That's it - Enjoy!
-
Hello Mike, using the @mentions feature adds the user as a CC, and this should email them the comment. If this isn't the action you are after, maybe make a feature request for the @mentions function - would be nice to have some more options for this.
-
Hi,
I'd like to create a trigger that fires on an @mention of some user. I cannot see how to do this properly, the best I can do is put a condition that the user's username is in the CommentText.
I was expecting to be able create a trigger such as, WHERE CommentText contains '@username'
Does anyone have any suggestions?
-
Hi Dan,
I think you've got the right idea for how you can approach it with the currently available tools. However, the end goal you are trying to achieve may be done via some other method. What is the goal of the trigger that is searching for the @ mention? Are you just trying to notify that person? Are you trying to add a tag? Maybe there is another route to accomplish the same without honing in on the @ mention for the workflow.
-
Hi Dan, thank you for your quick reply!
The endgame here is to notify a slack channel.
Therefore, I have a trigger setup to trigger where CommentText Contains "the users name". The action set is for my notify target which is a slack webhook. All of which is working fine - but I would like a way to trigger when it is ONLY an @mention. Currently, I have to compare with a basic string. When the user name string is something like "sam", it will trigger on both his name, and any other string that contains "sam"... Therefore, I cannot use it.
Regards,
Dan
-
I would probably lean towards adding a tag to trigger the notification to Slack in this case. Names like "Sam" are pretty common inside of other words and I think you'll run into the issue you describe. However, if your team is trained to add a tag alongside the @ mention that might help you ensure that only the ones they escalate to Slack go there.
If you are willing/able to code a Zendesk app, you could review the tickets CC's (@ mentioning CCs the user as well) and apply a tag when the CC field is updated and includes a specific user. There are docs on how to create a Zendesk app here: https://developer.zendesk.com/apps/docs/zendesk-apps/resources
-
This works very well! However, because it's an email being sent to the agent, shouldn't that create a ticket in Zendesk if the email is forwarding to a zendesk support email?
-
Hello Nathan, it would be an unusual workflow where an agent email was entirely forwarding to the support email, and certainly not how this is made to work.
Also for anyone commenting on this article, be aware this is not the Zendesk @mentions feature.
This article was written originally using @mentions but when Zendesk released their own version, there was still interest in this simple version so we modified it to suit.
Please comment only on this modification here, and any regarding the Zendesk @mentions should be made on their article about it. -
Andrew,
I understand that it is not a typical workflow, but it is a workflow we are working with nonetheless. And the fact that email notifications don't create tickets prevents our team from being notified when they are CC'd on a ticket. Zendesk really needs to fix this.
-
So, how are you wanting this to work? You'd like every !mention to create a new ticket assigned to the agent?
-
What is this agent then expected to do?
Please sign in to leave a comment.
40 Comments