Streamlining workflow with ticket updates and triggers

Triggers are business rules you define that run immediately after tickets are created or updated. For example, a trigger can be used to notify the customer when a ticket has been opened. Another can be created to then notify the customer when the ticket is solved.

For information about trigger conditions and actions and how triggers work, see About triggers. For an overview of how triggers work, see this video.

Only administrators can create and manage triggers.

Zendesk triggers to get you started

To help you get started with triggers, Zendesk provides you with a standard set of triggers and mail notifications that are best practices in a typical ticket workflow. You can view a list of these default triggers in the Resetting default triggers topic. To view these triggers in your Zendesk, select the Triggers page. You can select Edit to see the conditions and actions that have been defined for each trigger.

You can use these triggers as they are or clone them to make copies that you can modify and repurpose. You can also edit these triggers but it's better to clone them and make changes to the copies. You can then deactivate these Zendesk triggers if needed.

Creating triggers

You can create triggers from scratch or create copies of existing triggers and then modify and use them for some other purpose (see Editing and cloning triggers).

Community tip! Alexander Aghassipour shows how to build a trigger that auto-assigns a ticket to the first responding agent.

You can also watch a short video.

Building a Trigger (01:12)
To add a trigger
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Select Add Trigger.
  3. Enter a title for your trigger.
  4. Add the conditions and actions for your trigger (described below).
  5. Save your new trigger by clicking Add Trigger.

Your new trigger is added to the end of the list of triggers. You can reorder the list of triggers. For more information, see Reordering triggers.

Community tip! Justin Graves of Ensign Facility Services shares a tip for organizing your triggers in our Community forums!

Building trigger condition statements

Condition statements consist of conditions, field operators, and condition values (these vary depending on the condition selected). Condition statements are essentially ‘if’ statements that return all tickets that meet the specified criteria. The first condition statement that evaluates to false terminates the trigger.
Table 1. Trigger Conditions
ConditionDescription
Ticket: Status

The ticket status values are:

New is the initial status of a newly created ticket (not assigned to an agent).

Open means that the ticket has been assigned to an agent. 

Pending is used to indicate that the requester has been asked for information and the ticket is therefore on hold until that information has been received.

On-hold means that the support request is awaiting a resolution from a third party—someone who is not a member of your support staff and does not have an agent account in your Zendesk. This status is optional and must be added to your Zendesk (see Adding the On-hold ticket status to your Zendesk).

Solved indicates that the customer’s issue has been resolved. Tickets remain solved until they are closed.

Closed means that the ticket has been locked and cannot be reopened or updated.

When selecting a status, you can use the field operators to specify a range of tickets based on their status. For example, a condition statement that returns only New, Open, and Pending tickets looks like this:

Status is less than Solved
Ticket: Form Your ticket forms are available as conditions. Select Ticket: Form, then select a specific form.

See Creating ticket forms to support multiple request types (Enterprise).

Ticket: Type

The ticket type values are:

Question

Incident is used to indicate that there is more than one occurrence of the same problem. When this occurs, one ticket is set to Problem and the other tickets that are reporting the same problem are set to Incident and linked to the problem ticket.

Problem is a support issue that needs to be resolved.

Task is used by the support agents to track various tasks.
Ticket: Priority

There are four values for priority: Low, Normal, High, and Urgent.

As with status, you can use the field operators to select tickets that span different priority settings. For example, this statement returns all tickets that are not urgent:

Priority is less than Urgent
Ticket: Group

The group values are:

  • (—) indicates that no group is assigned to the ticket.
  • Group name is the actual name of the group that is assigned to the ticket.

Additional value for views:

  • (current user's group) is all the groups that the agent belongs to.
Ticket: Assignee

The assignee values are:

  •  (—) indicates that the ticket is unassigned.
  • (requester) is the ticket requester. You can select this option to return tickets that were opened by and then assigned to the same agent, for example.
  • (assignee) is the person who is assigned to the ticket.
  • Agent name is the actual name of the person assigned to the ticket.

Additional value for triggers and views:

  • (current user) is the last person to have updated the ticket, which is not necessarily the same person who is assigned to the ticket. The current user (whoever updated the ticket last) changes whenever the ticket is updated. And an update may have been made by the assignee, the requester, or someone who was CC'd on the ticket.
Ticket: Requester

The requester values are:

  • (assignee) is the person assigned to the ticket. The condition statement ‘Requester is Assignee’ is true if the requester is also the person assigned to the ticket.  This is possible if an agent created a ticket and was then assigned to it.
  • Agent name is the actual name of the agent.

Additional value for triggers and views:

  • (current user) is the last person who updated the ticket.
Ticket: Organization

The organization values are:

  • (—) is used to indicate that no organization has been added to the ticket.
  • Organization name is the name of an organization.
Ticket: Tags

You use this condition to determine if tickets contain a specific tag or tags. You can include or exclude tags in the condition statement by using the operators Contains at least one of the following or Contains none of the following. More than one tag can be entered. They must be separated with a space.

Ticket: Channel

The ticket channel is where and how the ticket was created and can be any of the following:

  • Web form

  • Email

  • Chat

  • Twitter

  • Twitter DM (direct message)

  • Twitter Favorite

  • Voicemail

  • Phone call (incoming)

  • Phone call (outgoing)

  • Get Satisfaction

  • Feedback Tab

  • Web service (API)

  • Trigger or automation

  • Forum topic

  • Closed ticket

  • Ticket sharing

  • Facebook post

  • Facebook private message

Ticket: Update via This condition indicates from where the ticket was updated and can be any of the same sources as the ticket channel condition (above).
Ticket: Received at This condition checks the email address from which the ticket was received. The ticket can be received from a Zendesk email domain such as sales@mondocam.zendesk.com, or from an external email domain such as support@acmejetengines.com. The external email domain must be set up as described in Using an external email domain or the condition won't work.
Ticket: Satisfaction Ticket satisfaction rating is available to Regular, Plus, and Enterprise plans. This condition returns the following customer satisfaction rating values:
  • Unoffered means that the survey has not previously been sent
  • Offered means that the survey has already been sent
  • Bad means that the ticket has received a negative rating
  • Bad with comment means that the ticket has received a negative rating with a comment
  • Good means that the ticket has received a positive rating
  • Good with comment means that the ticket has received a positive rating with a comment
Ticket: Is Created or Updated.
Ticket: Comment is

This condition returns the type of comment contained in ticket updates.

Public is a comment that everyone can see.

Private is a comment that only members of the support staff can see.

Present (public or private) is used to indicate if the update contains a new comment.

Present, and requester can see the comment is used to indicate that the update contains a comment and that it is visible to the requester (in other words, not private).
Ticket: Comment text

Using this condition you can check for the presence of single words and strings of words in either the subject, for the ticket creation, or body of the most recent comment, for subsequent updates. You can use any of the following operators:

  • Contains at least one of the following words
  • Contains none of the following words
  • Contains the following string
  • Contains not the following string
Ticket Reopens (Plus and Enterprise) The number of times a ticket has moved from Solved to Open or Pending.
Ticket: Agent replies (Plus and Enterprise) The number of public agent comments.
Ticket: Assignee stations (Plus and Enterprise) The number of different agents to which a ticket has been assigned.
Ticket: Group stations (Plus and Enterprise) The number of different groups to which a ticket has been assigned.
Ticket: Within business hours? Yes or No. This condition is available if an administrator has enabled business hours.
Ticket: Custom fields Custom ticket fields are available as conditions.
Requester: Language Returns the language preference of the person who submitted the request.
Requester: Twitter followers are This is the number of the requester’s Twitter followers.  
Requester: Number of tweets is This is the total number of the requester’s tweets.
Requester: Is verified by Twitter This condition is used to verify that the requester is a verified Twitter account.
Requester: Custom fields Custom user fields are available as conditions.
Organization: Custom fields Custom organization fields are available as conditions.
Current user

You can select any of the following for the type of user that last updated the ticket:

(agent) is a support staff member.

(end user) is anyone who is a registered user and not an agent or an administrator. They can only submit and track tickets and communicate with agents publicly (meaning their comments can never be private).

Agent name is the actual name of an agent.

Building trigger action statements

Action statements define what occurs if all the condition statements are true and the trigger fires. You can think of action statements as ‘then’ statements – if all of your conditions are true then perform these actions to update the ticket and optionally send notifications.
Table 2. Trigger actions
ActionDescription
Ticket: Status

The ticket status can be set to the following:

New is the initial status of a newly created ticket (not assigned to an agent).

Open means that the ticket has been assigned to an agent. 

Pending is used to indicate that the requester has been asked for information and the ticket is therefore is on hold until that information has been received.

On-hold means that the support request is awaiting a resolution from a third party—someone who is not a member of your support staff and does not have an agent account in your Zendesk.

Solved indicates that the customer’s issue has been resolved. The ticket is solved even if required ticket fields are still blank. See Required fields and automations. Tickets remain solved until they are closed. When tickets are closed is based on business rules you define for this step in the workflow, using automations.

Closed means that the ticket has been locked and cannot be reopened or updated.
Ticket: Form Your ticket forms are available as actions. Select a specific form.

See Creating ticket forms to support multiple request types (Enterprise).

Ticket: Priority The priority can be set to Low, Normal, High or Urgent
Ticket: Type

The type can be set to the following:

Question

Incident indicates that there is more than one occurrence of the same problem. When this occurs, one ticket is set to Problem and the other tickets that are reporting the same problem are set to Incident and linked to the problem ticket.

Problem is a support issue that needs to be resolved.

Task is used by the support agents to track various tasks.
Ticket: Group

You can set groups to any of the following:

  • (—) is used to unassign a group (if one has already been assigned)
  • Group name is the actual name of the group that is assigned to the ticket.

Additional value for macros:

  • (current user’s groups) is all the groups to which the agent who is updating the ticket belongs.
Ticket: Assignee

You can set the assignee to any of the following:

  • (—) is used to set assignee to no one (unassigned)
  • (requester) is the ticket requester. You can select this option to return tickets that were opened by and then assigned to the same agent, for example.
  • Agent name is the agent to be assigned the ticket.

Additional value for triggers and macros:

  • (current user) is the last person to have updated the ticket, which is not necessarily the same person who is assigned to the ticket. The current user (whoever updated the ticket last) changes whenever the ticket is updated.
Ticket: Satisfaction You can set this action to: offered to requester. This indicates that the survey request has been sent to the ticket requester.
Ticket: Set tags The tags you want to insert into the ticket. The set tag action replaces the current tags. Tags must be separated with spaces.
Ticket: Add tags The tags you want to add to the existing list of tags (if any).  Tags must be separated with spaces.
Ticket: Remove tags The tags that you want removed from the existing list of tags contained in the ticket (if any).  Tags must be separated with spaces.
Ticket: Add cc Add an agent or the current user to copy on the ticket update. This action is available when you enable CCs on tickets.
Ticket: Custom fields Custom ticket fields are available as actions.
Notifications: Email user

You can set the email user to any of the following:

  • (requester) is the ticket requester.
  • (assignee) is the agent assigned to the ticket.
  • Email user name is the actual registered name of the person who will receive the email.

Additional values for triggers:

  • (current user) is the last person who updated the ticket.
  • (all non-restricted agents) includes all agents that have unrestricted access to the ticket.

Adding the email user action also inserts the email subject and body.

Notifications: Email group

You can set email group to any of the following:

  • (assigned group) is a reference to the assign group.
  • Email group name is the actual name of a group.
Notifications: Notify target Set the external target to notify. For more information about using targets, see Notifying external targets.
Notifications: Tweet requester Setting this action allows you to respond to the twitter requester with a tweet.
Requester: Language Set the requester's language to one of your supported languages.
Requester: Custom fields Custom user fields are available as actions.
Organization: Custom fields Custom organization fields are available as actions.

Reordering triggers

You can reorder your list of triggers. Remember that all of your active triggers run each time a ticket is created or updated, and actions in one trigger can affect the actions in another.

To reorder the list of triggers
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Click Reorder at the end of the list of active triggers.
  3. Click and drag triggers to new locations as needed.
  4. Click Done.

Editing and cloning triggers

You can edit and clone triggers. Cloning a trigger creates a copy that you can modify and use for some other purpose.

To edit a trigger
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Locate the trigger you want to edit and click Edit.
  3. Modify the title, conditions, and actions as needed.
  4. Click Update Trigger.
To clone a trigger
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Hover your mouse over the the trigger you want to clone and click Clone .
  3. Enter a new name for your trigger and modify the conditions and actions as needed.
  4. Click Add Trigger.

Deleting and deactivating triggers

If you decide that you no longer need a trigger, you can either delete it or deactivate it. Deleting a trigger means that it's gone and can't be retrieved. You can instead deactivate triggers. Deactivated triggers are listed in a separate table under Admin > Manage > Triggers and email notifications and can be reactivated if needed.

To delete a trigger
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Locate the trigger you want to delete and click Edit.
  3. Click Delete.
To deactivate/activate a trigger
  1. Click the Admin icon () in the sidebar, then select Triggers.
    Zendesk Classic: Select the Manage menu, then select Triggers and mail notifications.
  2. Locate the trigger you want to deactivate and select Deactivate. This command appears when you move your mouse over the trigger in the list of triggers. The trigger is deactivated and displayed in the list of inactive triggers.
  3. To reactivate the trigger, select it from the list of inactive triggers and select Activate.
Note: If you accidentally delete your default triggers (Zendesk triggers to get you started), you can quickly rebuild them. For more information, see Resetting default triggers.
Have more questions? Submit a request

Comments

  • Avatar
    Diego Prado

    I am trying to understand a little bit further the triggers and automation execution.

    If an action consists of accesing a target:

      - Is there a way for the target to inform that it failed to perform its action?

      - If so, and one condition of the trigger was a change of status, Does it reverse the change that caused the trigger?

      - On the other hand, assuming that the target can inform that it failed, and there are two actions in the trigger (action 1 call the target, action 2 add a tag). Does the tag get added?

    Basically I wanna know how does the trigger / automation behaves upon an error during its execution.

  • Avatar
    Anton de Young

    @Diego

    Even if the target action fails, the other actions (if any) in the trigger will succeed. A failure generates a log file and we (Zendesk support) can investigate individual tickets when you believe a trigger action has failed. At this time, there is no event failure notification that will directly inform you when something like this occurs. However, you will have an indication if the target fails repeatedly. Here's the information from the user's guide topic on targets:

    "Zendesk attempts to send the notification 10 times. If all attempts fail, the target is deactivated. You’ll then need to edit and test and reactivate the target before you can try to use it again."

  • Avatar
    Sarah Manley

    HI - I would like to set a trigger for one of my custom ticket fields that send a specific response if a user pics a specific option from a dropdown menu. Is this possible? I am not seeing it as an option and it is something i very much want to do.

    The example is on my submit a request form I have added a custom ticket field that states "I would like to" the with a dropdown of different options. If the user chooses, "close my account" I would like to send an automatic macro so an agent doesn't have to look at it. Is this possible?

  • Avatar
    Anton de Young

    Sarah, 

    Yes, you can do this. Custom fields have tags. You set them when you're creating the custom drop down field options. Just use the tag in a Tags condition in a trigger and then set the actions you want based on the tag. 

  • Avatar
    Anton de Young

    FYI: The condition 'Ticket Source' was renamed to 'Ticket Channel'. This article was updated to reflect that. 

  • Avatar
    jerlin

    s there a way for the target to inform that it failed to perform its action?

     

    http://www.labortimetracker.com/

  • Avatar
    Emilianowicz, Vincent

    This is a great explanation of triggers, but I am struggling with setting up a trigger to do something that I don't feel is covered here. 

    I would like that when one of the Agents marks a ticket solved that if the user comments on that ticket (by email or the website) that the ticket is marked to open again. 

    So I set if Ticket is Updated and Status is Solved then Set Status to Open, but now if an agent updates a ticket with a reply and sets it to Solved then it immediately reopens the ticket.  Is there a way to get it to check what the status of the ticket was before the action?

  • Avatar
    Emilianowicz, Vincent

    Disregard my question, I figured it out and now I feel dumb about it, haha.

  • Avatar
    Heidi Helm

    Hiya. I would like to set up a trigger that emails the assignee when a ticket has not been updated for at least 48 hours. And also one that will email a specific admin of any new ticket that has not had a first response within at least 72 hours. I couldn't figure out if this is possible or not. Thanks! —Heidi

  • Avatar
    Jill Kaselitz

    Hi Heidi,

    You will be able to accomplish this through automations instead of a trigger. Since automations are time based, you will be able to set up your requested workflow as 2 different automations. You can read more about automations and how to configure them at https://support.zendesk.com/entries/20012032-streamlining-workflow-with-time-based-events-and-automations. Please feel free to let us know if you have any questions within the comments section of this article.

    Zendesk Support,

    Jill

  • Avatar
    Heidi Helm

    Thanks Jill, that sounds great, I knew it had to be doable! Hh

  • Avatar
    Bhavin Parikh

    Thanks for the help on triggers!  I've set up a trigger that emails a response to customers based on a ticket created with certain words in the text comment area, but I can't figure out how to update the ticket using the trigger.  Can someone help?

  • Avatar
    Anton de Young

    Bhavin,

    Do you mean that aside from sending an email you also want to update ticket properties using the same trigger? Did I get that right? If so, all you need to do is add more actions to the trigger to set ticket properties. 

  • Avatar
    Joy Carletti

    @Bhavin, You cannot update the ticket using the trigger, if by 'update' you mean adding comments.  However, if you look at 'All events and notifications' on your ticket' (link on the right hand side, above the ticket comments), it will show what notifications are sent out, based on what triggers, in the course of the ticket.  So it will show that the notification was sent based on your trigger.  You can also use the trigger action to change the status or priority of the ticket in the 'Perform actions' section, and that will be shown there as well.

  • Avatar
    Bhavin Parikh

    Yes, you got that right.  Basically, I want the trigger to update the ticket so any other agent who looks at that ticket can see the response that was sent to the customer.   I couldn't find an action to "set ticket properties". Is that an Action statement?

  • Avatar
    Bhavin Parikh

    @Joy,  I did mean adding comments.  Thanks for the info.

  • Avatar
    Sean G

    Hello,

    I'm trying to create an automation to alert an assignee when a good satisfaction rating has been given on a solved ticket.

    I've created the automation, made it active - but it doesn't work, even though the preview match brings up results.

    Screenshot is attached.

    What am I doing wrong? 

  • Avatar
    Joy Carletti

    @Sean, You may want to consider removing the timing element from this and making it into a trigger instead.  Automations run once hourly, whereas triggers run as soon as the conditions of the trigger are met.  It looks like this should be working; but the timing may not be right for the automation to run yet? 

  • Avatar
    sophie

    Hi

    (sorry for my ugly english)

    I would like to know how inverse the order of the answer in the email sended to the requester, I try to explain:

    In the email with the answer of the support, the requester read the text of the answer uppon his request!

    On the support page, to follow his request, it's in the right order: request and bellow the answer ...

    So is it possible to have the same order in the answered email?

    Thanks for your the info

     

  • Avatar
    Max McCal

    Hi, Sophie - The comments in an outgoing email are always listed in newest to oldest order. You might be able to make changes to this using Liquid templates (http://bit.ly/vgPvII), but we don't really have any documentation on doing this specifically.

  • Avatar
    Arlene Michael

    Good Afternoon,

    I have set up a trigger that will send an e-mail to an organization when a ticket is open that meets certain criteria.  I also need the e-mail to be cc'd to an end user....the same one every time.  She is a member of the organization, but will not be given agent privileges.  Can this be done with a trigger, or some other function?  When I tried, only agents were listed in the dropdown of e-mail recipients.  Any help would be most appreciated.

  • Avatar
    Max McCal

    Hi, Arlene -

    You can't use a trigger to send an email directly to an End-user like you're describing, but if you're using our Enterprise subscription you could make the user a Light Agent, allowing her to be selected without granting her full agent privileges (http://bit.ly/rYLw40) or if you're not, you can send ticket content out of the system using Email Targets (http://bit.ly/vFgaLi). Targets won't make her a CC or allow her to respond and update the ticket, but you can send out all ticket comments using the placeholder {{ticket.public_comments_formatted}}. Let me know if you have any trouble with either!

  • Avatar
    Arlene Michael

    Hi Max,

    Thank you for your quick response.  :)

    Hmmm....not sure I understand Targets.  I looked at the page you linked to, and didn't see how I could send just a plain e-mail when the ticket is opened.  Can you direct me to something more detailed so I don't keep asking you silly questions?  :)

    Thanx,

    Arlene

  • Avatar
    Max McCal

    Hey, Arlene -   I created a ticket for you, since I think this is going to get pretty specific pretty quick. Thanks!

  • Avatar
    Wendy

    I'd currently have a trigger to notify my target (hipchat message) when a ticket is assigned to a group. Unfortunately it notifies the target EVERY time the ticket is updated even though the group isn't changed. Is there a way for a trigger to fire once and then stop.. never to fire again?

  • Avatar
    Max McCal

    Hey, Wendy - 

    I recommend adding a condition to the trigger that gets nullified by actions of the trigger. For example, if your "meet all of the following conditions" section tests for a particular tag being absent, and that tag is added by the trigger, the next time the ticket is updated, the trigger won't fire because the tag is present now. 

    For example: 

    emailsent.png

    Once this has been set up, the first time the conditions are met, the email will be sent and the tag will be added. The next time the ticket is updated the conditions won't be met, because now the tag is present. That's the best way to keep a trigger from getting sent out over and over.

    Let me know how it works out!

  • Avatar
    Wendy

    Thanks! That fixed it :)

  • Avatar
    Molly

    Occasionally end users reply to closed (not solved) tickets, which creates a new ticket that is marked as follow-up to the original.  However, the "Notify all agents of received request trigger" does not fire when this new ticket is created.  Is there a way to create a trigger for these instances?  Thanks.

  • Avatar
    Jill Kaselitz

    Hi Molly,

    We'll want to look into this for you as the 'notify all agents of received request' trigger should fire when follow up tickets are created. Send us an email to support@zendesk.com with a ticket number where this trigger didn't fire and we'll gladly take a look.

  • Avatar
    Daniel

    We'd like to have a trigger condition that is satisfied when Zendesk creates a new user account for the requester.  There doesn't seem to be a way to do this now -- have I missed something?

    I understand that trigger conditions are based around tickets, not users.  But we're trying to capture situations where a user submits a ticket for the first time, and this results in creation of a Zendesk user account for them.  We'd like to distinguish this from situations where the user submits a ticket, and already has a Zendesk user account.

    So there should always be a ticket and a ticket.requester in this situation -- we're looking for a way to tell that the ticket.requester is 'new'.  Thanks.

Please sign in to leave a comment.