About automations and how they work

<body>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>
<div id="docs-ai-summary">
<p id="docs-ai-summary-toggle">Verified AI summary <span id="up-triangle">◀</span><span id="down-triangle">▼</span></p>
<p id="docs-ai-summary-content">Automations help you manage tickets by executing actions based on time events. They run hourly on non-closed tickets, firing when conditions are met. Use them to notify agents of unresolved tickets, escalate issues, or close tickets after a set period. Ensure automations run once by including a nullifying action or a condition that can only be true once.</p>
</div>

<div class="body">

<div class="p">
<span class="ph">Admin Center &gt; Objects and rules &gt; Business rules &gt;
Automations</span><div class="div" id="topic-1__definition">
<div class="div">
<p class="p">Automations are similar to triggers because both define conditions and actions that modify
ticket properties and optionally send email notifications to customers and agents. Where
they differ is that automations execute when an event occurs after a ticket property was set
or updated, rather than immediately after a ticket is created or updated.</p>
<p class="p">All automations <em class="ph i">run</em> once every hour on all non-closed tickets. They execute, or
<em class="ph i">fire</em>, on all tickets where conditions are met.</p>
</div>
</div>
</div>
<div class="p">Topics covered in this article:<ul class="ul" id="topic-1__ul_ksk_hhg_tm">
<li class="li"><a class="xref" href="#topic_ft5_n3z_sm">Essential facts for automations</a></li>
<li class="li"><a class="xref" href="#topic_jc5_qvn_fm">Examples for using automations</a></li>
<li class="li"><a class="xref" href="#topic_mbl_q4f_tm">Ensuring your automation only runs once</a></li>
<li class="li"><a class="xref" href="#topic_h3z_svn_fm">Understanding when automations run</a></li>
<li class="li"><a class="xref" href="#topic_fys_1gz_jm">Understanding when automation actions fire</a></li>
</ul>
</div>
<p class="p">For information about creating and managing automations, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408883801626" target="_blank">Creating and managing automations for time-based
events </a>. For a list of standard automations, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408835051546" target="_blank">About the standard Support automations</a>.</p>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_ft5_n3z_sm">
<h2 class="title topictitle2" id="ariaid-title2">Essential facts for automations</h2>
<div class="body">
<p class="p">The Automations page in Admin Center is used to create, edit, and manage
your automations. It's broken down into two tabs based on the
automations' status: active and inactive.</p>
<p class="p"><img class="image" id="topic_ft5_n3z_sm__image_shj_ycp_2fc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/automations_list.png" width="600"></p>
<p class="p">We've distilled some essential facts for you about automations. These are
explained in greater detail in this article.</p>
<ul class="ul" id="topic_ft5_n3z_sm__ul_bgs_x5r_p5b">
<li class="li">Automations are time-based; they take action when a time-event
occurs, not immediately after a ticket is created or
updated.</li>
<li class="li">Automations run every hour, but not necessarily top-of-the-hour;
they will start <em class="ph i">at some point</em> during the hour.</li>
<li class="li">Automations can fire on a maximum of 1,000 tickets per
hour.</li>
<li class="li">Automations do not run or fire on closed tickets.</li>
<li class="li">Each ticket can be updated a maximum of 100 times by
automations.<p class="p">The exception is the Close ticket
automation, which will fire even if a ticket has
been updated by automations more than 100
times.</p>
</li>
<li class="li">An automation must contain a condition that is true only once or
an action that nullifies at least one of the
conditions.</li>
<li class="li">All active automations must be unique. They can have some
overlapping conditions, but they can't be identical.</li>
<li class="li">Automations, like all business rules, must be smaller than
65kb.</li>
<li class="li">You can have a maximum of 500 active automations at a time. </li>
<li class="li">On non-Enterprise plans, automations are visible to agents,
including light agents and contributors, but can only be
edited by admins. On Enterprise plans, automations are
visible only to <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408882153882" target="_blank">agents in custom
roles with permission</a> to manage
automations.</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_jc5_qvn_fm">
<h2 class="title topictitle2" id="ariaid-title3">Examples for using automations</h2>
<div class="body">
<p class="p">Automations help you manage your workflow and, potentially, improve
performance and customer satisfaction by alerting you to tickets
that remain unresolved and need to be escalated (for example). </p>
<p class="p">Here are some uses for automations:</p>
<ul class="ul" id="topic_jc5_qvn_fm__uses">
<li class="li">Notifying agents when an assigned ticket remains unresolved for
x number of hours</li>
<li class="li">Notifying agent groups when a new ticket remains unassigned for
x number of hours</li>
<li class="li">Notifying the assigned agent after x number of hours when a
pending ticket has been updated by the requester</li>
<li class="li">Closing tickets x number of days after they have been set to
solved</li>
<li class="li">Finding "abandoned" tickets that haven't been updated for a
certain number of days</li>
<li class="li">Sending an SMS text message when an urgent ticket has been
unattended for more than 48 hours (using a target with an
automation; see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408883282458#topic_cjz_eqa_vb" target="_blank">Using targets in automations and
triggers</a>)</li>
</ul>
<p class="p">Zendesk provides an automation that demonstrates one of these common
uses:</p>
<p class="p"><img class="image img-screenshot" height="NaN" id="topic_jc5_qvn_fm__image_aib_wjb_xb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/automation_conditions_96hrs2.png" width="NaN"></p>
<p class="p">This automation closes tickets 96 hours after they have been solved (96
hours is a support best practice for the minimum amount of time a
ticket should remain in the solved state before it is closed). When
the automation runs, any tickets that meet these criteria are
closed. The close action looks like this:</p>
<p class="p"><img class="image img-screenshot" height="NaN" id="topic_jc5_qvn_fm__image_jri_wjb_xb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/automation_actions_96hrs2.png" width="NaN"></p>
<p class="p">Once a ticket is closed, it can't be modified anymore and automations no
longer affect it.</p>
<p class="p">This example also illustrates an important rule of automations: <strong class="ph b"><em class="ph i">an
automation must contain an action that cancels a
condition</em></strong>. The ‘Status equals Solved’
condition is canceled by the ‘Status equals Closed’ action. If there
were no canceling action, the automation would continue to fire in
an endless loop because the status would remain solved (not closed)
and continue to meet the condition criteria.</p>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_mbl_q4f_tm">
<h2 class="title topictitle2" id="ariaid-title4">Ensuring your automation only runs once</h2>
<div class="body">
<p class="p">Automations check every hour to see if their conditions are met. So an
automation must include one of the following:</p>
<ul class="ul" id="topic_mbl_q4f_tm__ul_plk_s4f_tm">
<li class="li">an action that nullifies at least one of the conditions, or</li>
<li class="li">a condition than can be true only once</li>
</ul>
<p class="p">If there is no nullifying action or true-only-once condition, the
unmodified conditions will continue to be met and the automation
will continue to fire in an endless loop.</p>
<p class="p">An example of a condition that is commonly nullified is a "ticket
priority" condition. A ticket priority condition is usually paired
with a "hours since created" condition. For example, if the ticket
priority is Normal (Ticket: Priority &gt; Is &gt; Normal), the
condition is nullified by including an action that changes the
priority to High (Ticket: Priority &gt; High) or some other
priority.</p>
<p class="p"><img class="image img-screenshot" height="NaN" id="topic_mbl_q4f_tm__image_fqh_jd5_fm" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/automation_close_after_4days.png" width="NaN"></p>
<p class="p">An example of a condition that can only be true once is the "hours since
open is" condition. This condition doesn't require a nullifying
action. For example, if the hours since the ticket is open is 4
hours (Ticket: Hours since created &gt; Is &gt; 4), then the
condition will only be true on one check. On the next check, the
hours since open will be 5, and the condition will be false.</p>
<p class="p">However, it’s important to be thoughtful when using an “hours since...is”
condition. Because of the slight variation of run times for
automations in any given hour, it's unlikely but possible for an
“is” condition to never evaluate to true. This situation is more
likely for larger accounts, or accounts with many automations. For
details, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408836495130-Using-the-Hours-since-condition-in-automations#topic_ld3_5d1_tqb" target="_blank"><u class="ph u">Using the “Hours since”
condition in automations</u></a>.</p>
<p class="p">An easy way to cancel a condition is to add a tag. The automation would
check for a tag and, if <em class="ph i">not</em> present, the automation would add
the tag to the ticket and perform any actions (such as, sending a
notification). If the tag <em class="ph i">is</em> present on the ticket, the
automation will not perform the action again. </p>
<p class="p">
</p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_h3z_svn_fm">
<h2 class="title topictitle2" id="ariaid-title5">Understanding when automations run</h2>
<div class="body">
<div class="p">All automations <em class="ph i">run</em> once every hour on non-closed
tickets to see if conditions are met. They execute,
or <em class="ph i">fire</em>, on tickets where conditions are
met.<div class="note note">
<span class="notetitle">Note:</span> Tickets that are not
closed but have had more than 100 automation
audits occur during the life of the ticket are
excluded from the hourly automations run. To view
events for a ticket, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408829602970" target="_blank">Viewing a ticket's audit
trail</a>.</div>
</div>
<p class="p">Your automations run every hour, but that does not
necessarily mean top-of-the-hour. Your automations
will start running <em class="ph i">at some point</em> during the
hour, maybe five minutes after the hour or
thirty-eight minutes after the hour, for
example.</p>
<p class="p">The entire time it takes your automations to run and
execute depends on how many automations and tickets
there are to process. Automations run again at some
point during the subsequent hour.</p>
<p class="p">Each automation can act on a maximum of 1,000 tickets each hour. If there are
more than 1,000 tickets where conditions are met for an automation, 1,000 tickets will
be processed in that hour, and the remaining tickets will be processed during the next
hour, if conditions are still met, or the hour after that, until all tickets are
checked. On jobs that are very large it may take many hours to work through all of the
tickets that meet the conditions of that automation.</p>
<p class="p">An extended automation cycle increases the chances for
agents to be making routine ticket updates at the
same time as automations are running. To prevent
ticket update collisions, Zendesk automations
double-check the state of the ticket at the time of
the update, instead of just acting based on the
state of the ticket when the automation cycle
started.</p>
<p class="p">To prevent unnecessary activity, automations do not run
on accounts that haven't had anyone sign in within
the last 14 days.
</p>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_fys_1gz_jm">
<h2 class="title topictitle2" id="ariaid-title6">Understanding when automation actions fire</h2>
<div class="body">
<div class="p">
<div class="div" id="topic_fys_1gz_jm__when_fires">
<p class="p">Automations run
in order every hour and fire on tickets where
conditions are met. Each automation fires—that is,
takes action on a ticket—when the automation runs
and conditions are met. That means the ticket is
being updated each time an automation fires during
the cycle, so not all automations see the ticket in
the same state. The actions of one automation
<em class="ph i">can</em> affect another automation in the same
hour.</p>
<div class="p">Consider you have three automations:<ul class="ul" id="topic_fys_1gz_jm__ul_bp2_mcz_jm">
<li class="li">Automation #1: If status is Pending greater
than 48 hours, notify Assignee.</li>
<li class="li">Automation #2: If status is Pending greater
than 48 hours, change priority to High.</li>
<li class="li">Automation #3: If priority is High, notify
Escalation group.</li>
</ul>
</div>
<p class="p">Automations run and fire (if conditions are met) in
order. So, if you have a ticket that has been
pending for 48 hours, when automations run in the
49th hour, Automation #1 runs and fires, then #2
runs and fires. After Automation #2 fires, the
ticket is updated to High priority. This means that
when Automation #3 runs, the condition is met, so
Automation #3 will fire.</p>
<p class="p">As mentioned previously, automations, unlike triggers, do
not execute an action immediately after a ticket
satisfies the conditions. And automations do not
execute exactly one hour after conditions are
met. For automations, ticket updates depend on when
your automations run each hour.</p>
</div>
</div>
<div class="p">
<ul class="ul" id="topic_fys_1gz_jm__ul_rwh_stf_sy">
<li class="li">
<strong class="ph b">Let's consider an example where the action will
happen when the automation runs.</strong> Suppose a
ticket update at 10:15am satisfies the conditions
for an automation to send an email notification. If
your automations run at 11:10, then the notification
will not be sent until 55 minutes after the
conditions are met. If your automations, however,
run at 10:20, then the notification will be sent 5
minutes after the conditions are met.</li>
</ul>
</div>
<ul class="ul" id="topic_fys_1gz_jm__ul_egs_ltf_sy">
<li class="li">
<strong class="ph b">Let's look at example with a time-based "Hours since"
condition. </strong>Time-based conditions have to be
satisfied within a window of time or after a minimum amount
of time has passed. The first time an automation runs after
an event occurs counts as "zero" hours since that event
happened (because it's less than one whole hour). Suppose
you have an automation that performs an action two hours
after a ticket is solved and a ticket is solved at 9:15am.
Here's what will happen:<ol class="ol" id="topic_fys_1gz_jm__ol_bnc_mtf_sy">
<li class="li">If your automations run at 10:10am, the ticket
has been solved for only 55 minutes and the
automation will not fire.</li>
<li class="li">Automations run again at 11:10am, the ticket has
been solved 1 hour and 55 minutes, which the
automation counts as one hour (because it is less
than two hours).</li>
<li class="li">Automations run again at 12:10pm, the ticket has
been solved 2 hours and 55 minutes, which the
automation counts as two hours. This means the
condition is met and the automation will fire and
update the ticket.</li>
</ol>
</li>
</ul>
<div class="p">
<div class="note note">
<span class="notetitle">Note:</span> You can see when an automation fired for a ticket by viewing
the events for that ticket. For more information, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408829602970" target="_blank">Viewing a ticket's audit
trail</a>.</div>
</div>
</div>
</div>
<script id="ai-summary-script">
//<![CDATA[
const ai_summary_style = document.createElement('style');
ai_summary_style.innerHTML = `#styled-article-body{padding:0 0 0}#article-body #docs-ai-summary{background-color:#f3f3f3;border:1px solid #d3d3d3;padding:10px 10px 6px;margin-bottom:16px}#article-body #docs-ai-summary #docs-ai-summary-toggle{font-size:.9em;font-weight:700;margin-bottom:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}#article-body #docs-ai-summary #docs-ai-summary-toggle #up-triangle{margin-left:auto;padding-right:10px;display:none}#article-body #docs-ai-summary #docs-ai-summary-toggle #down-triangle{margin-left:auto;padding-right:10px}#article-body #docs-ai-summary #docs-ai-summary-content{font-size:.9em;padding-left:25px;padding-right:25px;margin-bottom:12px}`;
document.head.appendChild(ai_summary_style);

const toggleAISummary = () => {
const summary = document.getElementById("docs-ai-summary-content");
const upTriangle = document.getElementById("up-triangle");
const downTriangle = document.getElementById("down-triangle");
if (summary.style.display === "none") {
summary.style.display = "block";
upTriangle.style.display = "none";
downTriangle.style.display = "inline";
} else {
summary.style.display = "none";
upTriangle.style.display = "inline";
downTriangle.style.display = "none";
}
};

document.getElementById("docs-ai-summary-toggle").addEventListener("click", toggleAISummary);
//]]>
</script>
</body>