Ticket triggers are business rules that run immediately after a ticket is created or updated and automatically perform actions if specified conditions are met. For example, a ticket trigger can be used to notify the customer when a ticket has been opened.
Triggers are composed of conditions, which are the qualifications needed for the trigger to fire, and actions, which are performed when those qualifications are met. See Anatomy of a trigger). In other words, if the conditions are true, then the trigger will perform the actions.
There is a set of standard ticket triggers that you can use in addition to creating your own triggers. Admins and agents in custom roles with permission to manage business rules can create ticket triggers.
Essential facts about ticket triggers
- The order of your ticket triggers and categories designates the order in which they're fired. It's important that triggers and categories are arranged in the appropriate order to match the intended workflow.
- The ticket event log only records the actions applied to tickets by triggers if they result in a net change in ticket field values. If a trigger runs and fires, but results in no change to the ticket, it isn't logged in the event log.
- You can have a maximum of 7000 active ticket triggers. This includes all standard and custom ticket triggers that are active.
- To help you manage large numbers of ticket triggers, they can be organized into categories.
- Ticket triggers run in the order they are listed on the Triggers page in Admin Center. This is important because actions applied by one trigger can affect how other triggers run and fire for a ticket.
- Agent access to ticket triggers varies by plan and permissions.
- On Enterprise plans, agents in custom roles with permission to manage triggers can view the list of triggers and view, add, edit, and delete individual triggers. Agents in custom roles without this permission can't access the list of triggers and have read-only access to individual triggers.
- On non-Enterprise plans, agents, light agents, and contributors can't access the list of triggers and have read-only access to individual triggers.
Understanding when ticket triggers run and fire
Every time a ticket is created or updated, all of your ticket triggers run in a cycle against that ticket in the order the triggers are listed. A ticket trigger fires and updates the ticket if its conditions are met during the cycle. A cycle is the entire process of a ticket being checked against all your ticket triggers.
If a ticket trigger updates a ticket during the cycle, the cycle starts over. All the ticket triggers run again, except any ticket triggers that have already fired and updated the ticket. This means a ticket could loop through the ticket trigger list several times before all of the triggers have either updated the ticket or been skipped because conditions were not met. (See the image below.)
A ticket trigger might run (that is, be checked) several times during a cycle, but it never fires (that is, take action) more than once in the same cycle because the trigger isn't checked again after it fires. And a trigger doesn't fire at all during the cycle if the conditions are not met.
Because the ticket trigger cycle starts over every time a trigger fires, actions in ticket triggers can affect one another. A ticket update by one trigger might cause another trigger, where conditions were not previously met, to be true and fire. So the order of your triggers is very important.
The importance of specific conditions
When building a ticket trigger, it's important to make your conditions as specific as possible. The Ticket | Is condition is a good way to narrow ticket trigger's scope so that it only runs when a ticket is created or when it is updated, but not both. Without this condition, ticket triggers run everytime any ticket is created or updated. This can lead to unnecessarily long processing times for the trigger cycle and unintentional automated actions occurring.
Commonly, the Ticket | Is | Created condition is used to route newly created tickets based on initial criteria, while Ticket | Is | Updated is used to send notifications. When used in combination with other nullifying conditions, such as Tags | Contains conditions or Priority | Is not, the Ticket | Is condition can help ensure your ticket triggers are only running and firing when you want them to.
It's also important to watch out for ticket triggers that undo or modify an action contained in another ticket trigger. This can cause conflicts and lead to unpredictable behavior. For example, if one trigger assigns tickets based on the channel from which it was received, and another assigns tickets based on the presense of tags. If a ticket meets the criteria for both triggers, the last one that fires in the cycle is the assignment the ticket will ultimately have. However, because the actions in one ticket trigger can affect whether a ticket meets the conditions for another trigger, it's not always easy to predict the order in which your triggers will fire for a given ticket. Therefore, it's important to avoid defining conflicting triggers and to use nullifying actions and conditions, such as adding a tag and then creating a condition around the precense of that tag, to minimize conflicts.
Creating ticket triggers
Ticket triggers are business rules that run immediately after a ticket is created or updated and automatically perform actions if specified conditions are met. There are standard ticket triggers, which you can modify, and you can create additional triggers.
You must be an admin or an agent in a custom role with permission to create triggers.
The following video gives you an overview of how to add triggers:
Automating notifications with ticket triggers [2:02]
- In Admin Center, click
Objects and rules in the sidebar, then select Business rules > Triggers.
- On the triggers page, click the Ticket tab.
- Click Create trigger.
Alternatively, you can use the options menu icon (
) to Create trigger below the selected trigger or Clone and modify a copy of the existing trigger.
- Enter a Name for your trigger.
Use a consistent naming convention to help you recognize similar types of triggers.
- (Optional) Enter a Description for your trigger.
You can provide details about what the trigger does. You'll be able to search for triggers based on description.
- Select an existing Trigger category for your trigger or create a new one.
- Click Add condition to set up the trigger to meet All or Any conditions.
Conditions are the qualifications needed for the trigger to fire.
- Select a Category, Field operator, and Value for each condition you add.
The field operator determines the relationship between the condition and the value. For example, if you select the field operator "Is", your condition will need to be equal to the value. Different conditions will contain different field operators.
See Building trigger condition statements.
Note: It is recommended to keep your trigger statements simple. The more complicated a trigger is, the harder it will be to troubleshoot and maintain. - Click the Add action to set the actions that occur when trigger conditions are met.
- Select Category and a Value for each action you add.
- Enter the action information.
Depending on the action you select, you will enter different information. For example, if you select the "Type" action, you'll need to select a ticket type.
If you're configuring an email notification action, see Understanding how to format email notifications. - Click Create trigger.
New triggers are automatically set to active. If you want to create an inactive trigger, click the arrow next to Create trigger and select Inactive.
Your new trigger is added to the end of the list of triggers.
Note: Each business rule must be less than 65kb.
You can reorder the list of ticket triggers or edit any ticket trigger.
53 comments
Austin Beck
Good morning!
I am attempting to use triggers to to add verbiage to tickets regarding processes or regulations around certain request types. I feel as though there was once a comment/description option for triggers but I can no longer find this option. Is there the ability to have a trigger that will allow me to input internal note verbiage on a ticket based on the request type?
Thanks!!
4
Genpower Ltd.
I want to know if a trigger can be set up to notify a group that a customer has emailed us 3 times or more on the same ticket
0
Michael Froeming
Hi Austin,
There were never a trigger action to insert a comment/description to a ticket. Such action is only present in macros.
Here's Trigger conditions and actions reference as reference.
Best,
-1
Alden Brandt-Cannon
Hello,
How would I create a trigger that would automatically inform a client when a specific tag was updated or changed. This does not mean I want to inform them of every update this would just be to show them that their ticket priority would have changed.
Thank you for the help.
1
Juraj Jarmek
Hello,
You may set the trigger like this:
Ticket Is Updated
Tags Contains at least one of the following [your_tag] (looking for the tag in the ticket that is used to inform the requester)
Tags Contains none of the following [action_already_performed] (indicating that we have already performed this action)
=============
Email Requester
Set tag [action_already_performed]
This way when a ticket is updated and applied you will email the requester.
Hope that helps.
1
Alden Brandt-Cannon
Thank you for your help.
but i still have an issue with your trigger. When you Update a ticket with anything that isn't a priority change it will email the requester telling them their ticket priority has been updated when it hasn't. Would there be anyway to possibly avoid that?
0
Juraj Jarmek
You can try removing the tag that would set it off, or another variant.
Like this:
0
Jiri Kanicky
Does not work on text fields.
0
Dave Dyson
Hi Jiri –
Yes, you're correct that triggers have some limitations when working with custom text fields. Can you post to our Feedback on Support topic and explain your use case there? Thanks!
0
Jah Tan
Hello!
I have set up a trigger to automatically send an email to the customer when a macro is fired and I would like for a new ticket to be created when the customer first replies to the automatic email but I am not sure how to do that - help please?
0
Heather Rommel
Hi Jah Tan
I'm not sure what your business case is, but you'd be using a ticket to run the macro, send an auto email, and then you want all replies to that email to open a new ticket? I would love to understand this more.
On the surface, you might want to test out setting the ticket to solved when you run the macro and have an automation set those particular tickets (using a tag? or a category field or something) to Closed asap (Automations run every 1 hour).
Then if someone replies to the email, the ticket is in Closed status, so this will automatically open a new ticket, though it will be a Followup ticket via Closed Ticket channel.
This can get tricky and I'm not sure if this will work if you're looking to have this happen with multiple end users per original ticket so extensive testing might be needed but give it a shot!
1
Jah Tan
Thank you for Heather! Follow-up question - I tried following the Text formatting recipe for the auto-email trigger and for some reason I can't seem to make the "bold" nor the "Headings" formatting to work. Help, please?
0
Dainne Kiara Lucena-Laxamana
Text formatting only works for emails from the agent interface or macros so they won't work for business rules such as automations or triggers.
Markdown is a simple markup language you can use to easily add formatting, links, and images to plain text. If Markdown is available in your account, you can use it in the following places:
1
Jah Tan
Hello Dianne!
Thank you for your reply! Gotcha! makes sense. Found a workaround though - looks like HTML is being read well by triggers and is accepted to format the email.
0
Dainne Kiara Lucena-Laxamana
0
Tony
How to add a trigger that condition is when ticket was deleted?
I need this condition, but didn't find on trigger's condition!
0
Dainne Kiara Lucena-Laxamana
2
Tony
Thank you Dainne, I followed that post.
0
CJ Johnson
It's really confusing to call this article "Creating triggers for automatic ticket updates and notifications", but then not actually talk about "trigger notifications" or eve mention the whole notify system in triggers. It's extremely difficult to find the right articles when the words used as product names are also used casually for their original intent as well.
2
Matthew Foglia
Hi there,
I'm trying to add a trigger:
If "field" CONTAINS "text", but the only option I can do is If "field" is|is not "present".
Any idea why I can't check the content of a text field to determine whether or not to execute a trigger that adds a tag?
0
Dane
Matthew Foglia,
Checkbox, drop-down, and date custom fields are available as conditions. For all other custom field types, you can only check to see whether a value is present or not. Please refer to Trigger conditions and actions reference.
-1
Albino Serafim Vas
It is possible to update a ticket field with information returned in the webhook response after execute the Notify active Webhook action? How to refer this content?
0
Bill Cao
Can the trigers check the mandatory fields when a ticket is created or updated, not just sloved?
0
Dave Dyson
If you're asking whether ticket fields can be made mandatory on update (not sure on Solved), then that can be done vie the free Ticket Field Manager app: see Installing and using the Ticket Field Manager app
0
Bill Cao
Hi Dave, Thank you.
I have installed Ticket Field Manager app, it is great tool. Also is it possible to highlight the missed (not filled in after submitting the ticket) mandatory fields' in red color?
0
Emeline Leguillou
Hi,
As shown in this article (https://www.zendesk.co.uk/blog/setup-auto-responses-to-common-questions-with-triggers/#georedirect), it was one possible to "notify user" without sending a separate email when we want to automate answers with triggers.
Is this still available, and how? We are trying out the "send email" to the requester, but this is not a good solution as it creates more tickets for nothing. We want to answer a ticket directly with a trigger or an automation, and make it appear as a public reply inside the thread of the original request, not as a separate email. We tried "Bot answer" as well, and got the same result.
This feels like it is one of the most basic things we should be able to do, but for some reason, we can't find how.
Thanks in advance for your help.
0
Dane
Even though triggers and automations sends a different email, any replies to those email should thread on the same ticket. Hence, it won't cause any new tickets to be created.
-1
Amos Chen
Hi I had a question on triggers. In my trigger, I have a condition so that when a ticket is updated and the brand is set to a specific value, then the action is to set a form to a specific value as well. However, I'm noticing that the trigger is only working after I have updated the status of the ticket. My question is, is just updating the Brand on the details of the ticket not considered "Updating" the ticket?
Sorry if that doesn't make any sense. Happy to clarify more
0
Gab Guinto
Triggers should fire whenever a ticket is updated. If you updated the ticket brand and then submitted the changes, then your trigger should fire. You don't have to change the ticket status – you just have to save the changes by clicking on the Submit button (regardless of status) – and as long as all the conditions are met, the trigger will fire on that ticket. Is the behavior different when you test your trigger? You can provide more details here and we can take a further look, or you can try getting in touch with us via these options.
0
Ezgi Filazoğlu
Hello,
I created the triggers to receive an email when a ticket is created or updated. but still our team does not receive any email before assign the tickets to someone. This is a huge problem for us, we need to get a notification at the moment a ticket submitted. Could you please help us? Trigger page is atttached.Thank you![](/hc/user_images/cEol1nUmgaa7cjGhKUUKmA.png)
0