Streamlining workflow with time-based events and automations

Automations are similar to triggers (see Streamlining workflow with ticket updates and triggers) because both define conditions and actions that modify ticket properties and optionally send email notifications to customers and the support staff. Where they differ is that automations execute when a time event occurs after a ticket property was set or updated, rather than immediately after a ticket is created or updated.

Only administrators can create and manage automations.

For an overview of automations, see About automations and how they work.

Topics covered in this article:

You can also watch this short video.

Building an Automation (01:34)

Creating automations

Administrators can create automations from scratch, as shown here, or create copies of existing automations and then modify and use them for some other purpose (see Editing and cloning automations).

To add an automation
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Select Add Automation.
  3. Enter a title for your automation.
  4. Add the conditions and actions for your automation.

    An automation is made up of three parts, described below:

  5. You can test your automation by previewing the tickets that match the conditions that you have specified by selecting Preview match for the conditions.

    Note: The automation will have no effect on any closed ticket listed in your preview.

  6. Save your new trigger by clicking Add Automation.

Building automation condition statements

As with triggers, the condition statements you create for automations contain conditions, operators, and values. These include conditions you’d expect such as priority, status, assignee and so on. Because automations are based on the hours that have elapsed since a ticket update was made, Zendesk provides the following time-based conditions:

  • Hours since created

  • Hours since open

  • Hours since pending

  • Hours since on-hold

  • Hours since solved

  • Hours since closed

  • Hours since assigned

  • Hours since update

  • Hours since requester update

  • Hours since assignee update

  • Hours since due date (for tickets with the type set to Task)

  • Hours until due date (for tickets with the type set to Task)

Only whole numbers can be used as the value for these conditions. For example, Hours since created = (calendar) is = 1, is valid. Decimals aren't supported. If you set the hours since variable to 1.5, it will be interpreted as 1, which means that it was rounded down to the whole number.

The other conditions you can use in your automations are described in the following table.
Table 1. Automation 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 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: Description The description is the first comment in the ticket.
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 (follow-up tickets)

  • Ticket sharing

  • Facebook post

  • Facebook private message

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: Custom fields Custom ticket fields are available as conditions.
Requester: Language The language of the person who submitted the ticket.
Requester: Custom fields Custom user fields are available as conditions.
Organization; Custom fields Custom organization fields are available as conditions.

Building automation 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 invoke these actions to update the ticket and optionally send notifications.

Table 2. Automation 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 end-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. You cannot use custom fields to nullify conditions.
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. You cannot use custom fields to nullify conditions.
Organization: Custom fields Custom organization fields are available as actions. You cannot use custom fields to nullify conditions.

Editing and cloning automations

You can edit and clone automations. Cloning an automation creates a copy that you can modify and use for some other purpose.

To edit an automation
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Locate the automation you want to edit and select Edit.
  3. Modify the title, conditions, and actions as needed.
  4. Click Update Automation.

To clone an automation

You can create a copy of an existing automation to use as the basis of a new automation.
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Locate the automation you want to clone and select Clone. This command appears when you move your mouse over the automation in the list of automation.
  3. Enter a new name for your automation and modify the conditions and actions as needed.
  4. Click Add Automation.

Reordering your automations

You can reorder your automations, but keep in mind that the order of your automations is important because all automations run (first to last) every hour. Actions in one automation may affect the actions in another.

To reorder the list of automations
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Click Reorder. You’ll find this at the end of the list of active automations.
  3. Click and drag automations to new locations as needed.
  4. Click Done.

Deleting and deactivating automations

If you decide that you no longer need an automation you can either delete it or deactivate it. Deleting it of course means that it’s gone and can’t be retrieved. You can instead deactivate automations. Deactivated automations are listed in a separate table on Manage > Automations and can be reactivated if needed.

To delete an automation
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Locate the automation you want to delete and select Edit.
  3. Click Delete.
To deactivate/activate an automation
  1. Click the Admin icon () in the sidebar, then select Automations.
    Zendesk Classic: Select the Manage menu, then select Automations.
  2. Locate the automation you want to deactivate and select Deactivate. This command appears when you move your mouse over the automation in the list of automations. The automation is deactivated and displayed in the list of inactive automations.
  3. To reactivate the automation, select it from the list of inactive automations and select Activate.
Have more questions? Submit a request

Comments

  • Avatar
    Andrew Ardill

    It is not clear from this information if fractional hours are allowed. Can I set something to happen half an hour after a ticket is created?

    Also, are automations run 'on the hour' or at the time they refer to. For example, if I create a ticket at 10:47 and have an automation that is set to act 1 hour after it was created, is that automation run at 11:47 or some other time?

    Furthermore, if a condition is set to trigger at exactly 1 hour after some point, at which automation run through does it return true - only if the condition is met exactly right now, the first time after it was true, or some other time?

  • Avatar
    Anton de Young

    Thanks for the questions Andrew. First, no, you can't use fractions of an hour. All automations are run at the top of the hour in batches for all Zendesk customers. When exactly your automations run depends on how many automations and tickets there are to process. So if a ticket was updated at 10am and your automation says to do something an hour later, it might be slightly longer than that (at 11:04 or 11:10 or something like that). Automations don't run exactly x number of hours after the conditions are met. 

     

  • Avatar
    Anton de Young

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

  • Avatar
    Dmitry Diskin

    Anton, I'd like to clarify about "hours since update". Now we have:

     

    -Hours since update

    -Hours since requester update

    -Hours since assignee update

     

    We need a way to distinguish "manual update" and "automatic update". Let me explain. When a person (not assignee, and not requester) updates ticket, we can see that "Hours since update" changes. But,  "Hours since update" also changes when another automation is run and some action is performed (e.g., notification email is sent).  Therefore, we do not have a way to see when ticket was "truly" updated.

     

    Do you see a workaround? Can Zendesk add "Hours since human update" field?

     

    Thanks.

  • Avatar
    Aaron Pewtherer

    @Dimitry You are correct. "Hours since update" refers to any update to the ticket, regardless if it came from a requester, an assignee or an automation. There is NO workaround from the moment, unless you tag specific tickets not to run the automation by checking for the tag first. That is a great idea though.

  • Avatar
    Dmitry Diskin

    @Aaron, can you please explain how to use the workaround? And when can we expect the "Hours since human update" field?

  • Avatar
    Aaron Pewtherer

    @Dmitry I updated my post to say there is NO workaround. To skip an automation, add the condition "Tags contain none of the following"

  • Avatar
    Dmitry Diskin

    @Aaron, but we need that another automation also, for notification. Please confirm that there are no plans to add the field I mentioned. Thanks.

  • Avatar
    Aaron Pewtherer

    @Dmitry I have heard the "update by human" or "update by any agent" as a Feature Request in our Forums, but this is not on our roadmap at the moment. Let our developers know by submitting a Feature Request or nominating an existing request.

  • Avatar
    Manuel Keusen

    Is there a way to set an automation to "business hours" so that automated notifications aren't sent on weekend?

  • Avatar
    Jill Kaselitz

    @Manuel Within our Plus+ and Enterprise plans you will have access to business hours which will allow you to create automations to not send notifications out during the weekend. Please let us know if you have any questions on how to create this type of automation.

  • Avatar
    Gail Flynn

    Is it possible to create an automation or trigger to run daily against a ticket that does not receive any changes? We are interested in having - for tickets set to Pending - emails sent to the ticket requestor every 1 day.

  • Avatar
    Aaron Pewtherer

    @Gail You can create a separate automation for each 24 hour period. (ie: Hours since Pending (calendar) 24; 48; 72. . . Perform Action: email requester) Triggers would not work in your case since they are event based; Automations are time based.

  • Avatar
    Gail Flynn

    Thanks - that's too bad, but now I know!

  • Avatar
    Aaron Pewtherer

    @Gail I misunderstood your question. You want this to run indefinitely? In that case, you will need to 2 automations. The first automation would be add a tag & email requester; and the second would remove the tag if no response from enduser after 23 hours.

    Automation 1:

    - Conditions:

    1) Hours since update greater than (calendar) 24 hours

    2) Status is Pending

    3) Tag does not contain notify_pending

    - Action

    1) Email requester

    2) add tag notify_pending

    Automation 2:

    - Conditions

    1) Hours since update is 23 hours

    2) Status is Pending

    3) Tag contains notify_pending

     - Actions

    1) Remove tags notify_pending 

  • Avatar
    Lorraine Joubert

    Hi

     

    Is there absolutely no way to have a notification sent from Zendesk if a specific action/event has not taken place on a ticket in for instance 15 minutes?

     

    Regards,

    Lorraine

  • Avatar
    Aaron Pewtherer

    @Loraine Automations run hourly. This is reduce overall server usage for better balance and performance.

  • Avatar
    Matt Pull

    Couple of things that I think need adding for Automatons / Triggers:

    1. Ticket Last updated by Agent / User

    This will allow us to constantly nag whoever is not updating their ticket, whether that be the agent or the requester.

    1. Current Time is / is not during Business Hours (the hour the trigger/automaton is running at)

    This will allow these 'nags' to be sent or not depending on whether it is business hours. Currently this is not possible.

  • Avatar
    Lorraine Joubert

    @Aaron... this is extremely disappointing, as the automations we have are very few but very crutial regarding fractions of an hour and for the automations to run as soon as or as close as possible to the time limit set within the automation.  Is there absolutely no workaround for this?  This is extremely crutial to the correct functioning of our support process.

  • Avatar
    Aaron Pewtherer

    @Lorraine Thank you for the feedback. Feel free to add your voice to a similar feature request: https://support.zendesk.com/entries/101460-ability-to-allow-automations-to-automatically-fire-at-an-interval-other-than-1-hour-after-conditions

  • Avatar
    Ong Jiin Joo

    Is it possible to build an automation against an agent (or a collection of tickets handled by the same agentr) instead of just on a per ticket basis? I have a number of cases I need to implement, but the most critical one is I need to be able to detect a spike and mass inform a crisis management team.

    So the rule I need is something like: If more than 10 tickets are created within 1 minute against agent X, send email. Or if automations is restricted to an hour then something like: If more than 100 tickets are created within 1 hour for all agents, send email.

  • Avatar
    Nick Franklin

    Hi Jiin Joo,

    This isn't possible out of the box with Zendesk as you can't have automation that count the number of tickets and fire off that - although this a good candidate for our feature requests forum. 

    If the tickets are coming in via email there may be some way to do a burst alert using your mail server settings - or an add-on.

    By 'against an agent' do you mean assigned to that agent?  Does this mean you are concerned with agents having too many assigned tickets rather than there being too many tickets coming into your helpdesk?

    Best regards,

    Nick

  • Avatar
    Alan Bradshaw

    We want to prompt customers to update tickets which have been "Pending" for a X days. Presumably at it's simplest this automation will send an email every hour which would be most annoying. If we add an action to set Status to Pending, will this be ignored (as unchanged) or will it update the tickets' timestamp so that they won't be picked up again until X days later?

    I suppose we could also do this by adding a tag and first checking this tag is not already added; but then we would also need to create a few automations to check for various even older times.

  • Avatar
    Aaron Pewtherer

    @Alan You are correct. You will need an action to nullify a condition for an automation not to send out an email every hour. This would involve 2 automations; 1 that checks for a tag, that adds a tag, then a 2nd automation to remove the tag after a certain amount of time so the previous automation would run again.

  • Avatar
    Stephen Lopez

    We'd like to see an automation that would allow tickets to be generated/assigned/categorized based on the email address of the submitter.

    For instance, server1@mail.edu sends a failure alert to our helpdesk inbox. Zendesk accepts the message, creates a new ticket, assigns it to AgentX, and categorizes it as Server > Fault.

    Point me in the right direction if I'm just missing it, but I don't seem to be able to configure this.

  • Avatar
    Aaron Pewtherer

    @Stephen Easily done. 

    First, you would need to identify that the email is about a server fault. If the email address is always referring to a "Server Fault" then, you would add that email to an organization (ie: org, "Server Fault"), or in the enduser profile, add the tag "server_fault." (Make sure if you have enduser tags enabled under Settings > Endusers > [enable] "Tags on users")

    Second, (optional) create a custom drop-down ticket field called, "Category" with the Field "Server Fault" (or Server::Fault if you are creating a nested field where "Fault" is a subcategory of server).

    When a ticket is created by an enduser in the "Server Fault" organization (or has the server_fault tag), create a trigger that reads, 1) Ticket is created, 2) Org is...Server Fault/Tag contains...server_fault; Action: Assignee...AgentX; (optional: Category...Server/Fault).

    With the ticket tagged, you can run reports based on that tag or dropdown.

  • Avatar
    Stephen Lopez

    @Aaron Thank you. It was so simple that I just over-thought it. The tagging option never even crossed my mind. I just tested it and it works perfect.

  • Avatar
    Rob Dziadosz

    Having a bit of difficulty in creating an automation where it alerts the Asignee (agent) that the case has not been updated in X amount of hours. Maybe I'm missing something simple ..

  • Avatar
    Aaron Pewtherer

    @Rob: Try using Condition (ALL): "Hours since updated is .... X"; Action: Email User > Assignee.

  • Avatar
    Alan Jiménez

    I'm unclear as to when "Hours since open" means.

    If a ticket is in pending status, and the requester answers back so that the issue goes back to open, does this count as "Hours since opened"? Would it then start counting from zero, or does it accumulate from "open" statuses prior to the occurrence?

    I'd suggest you further specify the meanings and behaviours of these conditions.

Please sign in to leave a comment.