Recipe: Managing tickets created outside of business hours using End session as a ticket trigger action

<div class="body">
<div class="p">
<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_gpee">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_pe">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Professional or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p class="p">In this recipe, we’ll walk you through a process that identifies messaging
tickets created outside of business hours, tags them, removes them from the active
queue, and organizes them into a view.</p>
<p class="p">The recipe includes the following sections:</p>
<div class="p">
<ul class="ul" id="recipe-traffic_surge_OCR__ul_xrq_mgg_4fc">
<li class="li"><a class="xref" href="#topic_sfq_4d2_4fc">Overview</a></li>
<li class="li"><a class="xref" href="#topic_njv_4d2_4fc">Step 1: Create a ticket trigger to apply a business hours schedule to incoming messaging tickets</a></li>
<li class="li"><a class="xref" href="#topic_md1_pd2_4fc">Step 2: Create a ticket trigger to identify tickets created outside of your business hours schedule</a></li>
<li class="li"><a class="xref" href="#topic_tj3_pd2_4fc">Step 3: Create a view to track messaging tickets created outside of business hours</a></li>
<li class="li"><a class="xref" href="#topic_zhq_pd2_4fc">Step 4 (optional): create a custom queue to manage messaging tickets created outside of business hours</a></li>
</ul>
</div>
<p class="p">Related recipes:</p>
<div class="p">
<ul class="ul">
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9339278067482" target="_blank">Recipe: Managing a surge in messaging traffic
(messaging routing configuration)</a></li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9339297143834" target="_blank">Recipe: Managing a surge in messaging traffic
(omnichannel routing configuration)</a></li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9340024053402" target="_blank">Recipe: Reporting on messaging tickets with
ended sessions</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_sfq_4d2_4fc">
<h2 class="title topictitle2" id="ariaid-title2">Overview</h2>
<div class="body">
<p class="p">The process described in this recipe:</p>
<ul class="ul" id="topic_sfq_4d2_4fc__ul_wtk_ngg_4fc">
<li class="li">Applies a business hours schedule to new tickets created through the messaging
channel. </li>
<li class="li">Identifies new tickets that are created <em class="ph i">outside</em> of your set business
hours. </li>
<li class="li">Tags the ticket as being submitted outside of business hours and removes them
from the active queue. </li>
<li class="li">Creates a view to track tickets submitted outside of business hours. </li>
<li class="li">Creates a custom queue to handle tickets submitted outside of business hours. </li>
</ul>
<p class="p">This recipe assumes your account meets the following configuration requirements:</p>
<ul class="ul" id="topic_sfq_4d2_4fc__ul_zzw_222_4fc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4409103246874" target="_blank">Messaging is activated</a>. </li>
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8372292195354" target="_blank">The end session feature is turned on</a>. </li>
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4409149119514-About-omnichannel-routing" target="_blank">You’re using omnichannel routing settings to
route your messaging tickets</a>. </li>
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4828787357210-Managing-your-omnichannel-routing-configuration#topic_glj_pmr_wbc" target="_blank">You’re counting inactive tickets toward agent
capacity</a>.</li>
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4500737327258-Configuring-messaging-responses-and-business-hours#topic_kzg_ync_gnb" target="_blank">You’ve set a business hours schedule in your
messaging configuration</a>.</li>
<li class="li">You’ve <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408834781594" target="_blank">created a trigger category</a> called
“Ticket surge management.” You can also use any pre-existing trigger categories
or create a new category when building the trigger.</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_njv_4d2_4fc">
<h2 class="title topictitle2" id="ariaid-title3">Step 1: Create a ticket trigger to apply a business hours schedule to incoming messaging tickets</h2>
<div class="body">
<div class="p">
<div class="div">
<p class="p">First, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408886797466-Creating-ticket-triggers-for-automatic-ticket-updates-and-notifications#topic_qfk_s23_vsb" target="_blank">create a support ticket trigger</a>
that identifies new tickets in the messaging channel and applies your <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4500737327258-Configuring-messaging-responses-and-business-hours#topic_kzg_ync_gnb" target="_blank">messaging business hours schedule</a>
to them.</p>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_bqg_422_4fc">
<h3 class="title topictitle3" id="ariaid-title4">Basics</h3>
<div class="body">
<p class="p">In your newly created trigger, add the following basic information:</p>
<div class="p">
<ul class="ul" id="topic_bqg_422_4fc__ul_cdg_x22_4fc">
<li class="li">
<strong class="ph b">Trigger name (required, but you can use any name you want)</strong>: Apply
business hours</li>
<li class="li">
<strong class="ph b">Description (optional)</strong>: Applies business hours schedule to new
messaging tickets</li>
<li class="li">
<strong class="ph b">Trigger category (required, but you can use any category you
want)</strong>: Ticket surge management </li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested2" id="topic_t25_422_4fc">
<h3 class="title topictitle3" id="ariaid-title5">Conditions</h3>
<div class="body">
<p class="p">Add the following conditions to the trigger:</p>
<div class="p">
<div class="div">
<p class="p"><strong class="ph b">Meets ALL of the following conditions</strong>: </p>
<ul class="ul" id="topic_t25_422_4fc__ul_xhk_zgg_4fc">
<li class="li">
<p class="p">Ticket &gt; Status category | Is | New</p>
</li>
<li class="li">
<p class="p">Ticket &gt; Channel | Is | Messaging</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested2" id="topic_awb_p22_4fc">
<h3 class="title topictitle3" id="ariaid-title6">Actions</h3>
<div class="body">
<div class="p">
<div class="div">
<p class="p">Add the following actions, then save the trigger:</p>
<ul class="ul" id="topic_awb_p22_4fc__ul_tvg_1hg_4fc">
<li class="li">
<p class="p">Ticket &gt; Set schedule to | [schedule name] </p>
<div class="p">
<ul class="ul" id="topic_awb_p22_4fc__ul_w1h_bhg_4fc">
<li class="li">[Schedule name] is the name of the saved schedule in
your messaging channel</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_md1_pd2_4fc">
<h2 class="title topictitle2" id="ariaid-title7">Step 2: Create a ticket trigger to identify tickets created outside of your business hours schedule</h2>
<div class="body">
<p class="p">Next, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408886797466-Creating-ticket-triggers-for-automatic-ticket-updates-and-notifications#topic_qfk_s23_vsb" target="_blank">create another support ticket trigger</a> that
identifies new messaging tickets submitted outside of your business hours, tags
them, and ends the related messaging session. </p>
<p class="p">The trigger then automatically removes them from the active queue.</p>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested2" id="topic_qhm_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title8">Basics</h3>
<div class="body">
<p class="p">In your newly created trigger, add the following basic information:</p>
<div class="p">
<ul class="ul" id="topic_qhm_t22_4fc__ul_b4p_kf2_4fc">
<li class="li">
<strong class="ph b">Trigger name (required, but you can use any name you want)</strong>:
After-hours messaging tickets</li>
<li class="li">
<strong class="ph b">Description (optional)</strong>: Identifies and tags messaging tickets
submitted after business hours</li>
<li class="li">
<strong class="ph b">Trigger category (required, but you can use any category you
want)</strong>: Ticket surge management</li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested2" id="topic_rhm_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title9">Conditions</h3>
<div class="body">
<p class="p">Add the following conditions to the trigger:</p>
<p class="p"><strong class="ph b">Meets ALL of the following conditions:</strong></p>
<ul class="ul" id="topic_rhm_t22_4fc__ul_tkf_nhg_4fc">
<li class="li">Ticket &gt; Status category | Is | New
</li>
<li class="li">Ticket &gt; Schedule | Is | [schedule name]
</li>
<li class="li">Ticket &gt; Within business hours | Is | No </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested2" id="topic_lzr_4hg_4fc">
<h3 class="title topictitle3" id="ariaid-title10">Actions</h3>
<div class="body">
<p class="p">Add the following actions, then save the trigger:</p>
<div class="p">
<ul class="ul" id="topic_lzr_4hg_4fc__ul_scy_qhg_4fc">
<li class="li">Ticket &gt; Add tags | <em class="ph i">offline_conversations</em>
</li>
<li class="li">Ticket &gt; Messaging session | End Session</li>
<li class="li">Ticket &gt; Group | Is | -</li>
</ul>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title11" class="topic nested1" id="topic_tj3_pd2_4fc">
<h2 class="title topictitle2" id="ariaid-title11">Step 3: Create a view to track messaging tickets created outside of business hours</h2>
<div class="body">
<p class="p">Now, you’ll <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408888828570" target="_blank">add a view</a> that compiles all tickets with
the offline_conversations tag. You can refer to this view to monitor messaging
tickets submitted outside of business hours, and to follow up with those
conversations if needed.</p>
</div>
<div aria-labelledby="ariaid-title12" class="topic nested2" id="topic_zwp_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title12">Basics</h3>
<div class="body">
<p class="p">In this new view, add the following basic information:</p>
<div class="p">
<ul class="ul" id="topic_zwp_t22_4fc__ul_gvk_rf2_4fc">
<li class="li">
<strong class="ph b">Name</strong>: Offline messaging tickets </li>
<li class="li">
<strong class="ph b">Description (optional)</strong>: All tickets tagged with
offline_conversations</li>
<li class="li">
<strong class="ph b">Who has access</strong>: Choose the internal users who can access the view </li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title13" class="topic nested2" id="topic_axp_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title13">Conditions</h3>
<div class="body">
<p class="p">Add the following conditions and save the view:</p>
<div class="p">
<div class="div">
<p class="p"><strong class="ph b">Tickets must meet all of these conditions to appear in the
view</strong></p>
<div class="p">
<ul class="ul" id="topic_axp_t22_4fc__ul_mnz_b3g_4fc">
<li class="li">Ticket &gt; Tags | Contains at least one of the following |
<em class="ph i">offline_conversations</em>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title14" class="topic nested1" id="topic_zhq_pd2_4fc">
<h2 class="title topictitle2" id="ariaid-title14">Step 4 (optional): create a custom queue to manage messaging tickets created outside of business hours</h2>
<div class="body">
<p class="p">Finally, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4828787357210-Managing-your-omnichannel-routing-configuration" target="_blank">create a custom queue</a> to route messaging
tickets created outside of business hours. </p>
</div>
<div aria-labelledby="ariaid-title15" class="topic nested2" id="topic_qj5_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title15">Basics</h3>
<div class="body">
<p class="p">In your newly created custom queue, add the following basic information:</p>
<div class="p">
<ul class="ul" id="topic_qj5_t22_4fc__ul_vtq_gg2_4fc">
<li class="li">
<strong class="ph b">Name (required, but you can use any name you want)</strong>: Offline
messaging tickets queue</li>
<li class="li">
<strong class="ph b">Description (optional)</strong>: Queue to handle messaging tickets
submitted outside business hours</li>
<li class="li">
<strong class="ph b">Queue priority</strong>: 1</li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title16" class="topic nested2" id="topic_rj5_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title16">Conditions</h3>
<div class="body">
<p class="p">Add the following conditions to the custom queue:</p>
<p class="p"><strong class="ph b">Meet all of the following conditions:</strong></p>
<ul class="ul" id="topic_rj5_t22_4fc__ul_qx2_3g2_4fc">
<li class="li">Ticket &gt; Tags | Contains at least one of the following |
<em class="ph i">offline_conversations</em>
</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title17" class="topic nested2" id="topic_sj5_t22_4fc">
<h3 class="title topictitle3" id="ariaid-title17">Groups</h3>
<div class="body">
<p class="p">Add the following group, then save the custom queue:</p>
<p class="p"><strong class="ph b">Primary groups:</strong></p>
<ul class="ul" id="topic_sj5_t22_4fc__ul_bph_m3g_4fc">
<li class="li">Support
</li>
</ul>
</div>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/9340032656026",
"url": "https://support.zendesk.com/hc/en-us/articles/9340032656026-Recipe-Managing-tickets-created-outside-of-business-hours-using-End-session-as-a-ticket-trigger-action",
"headline": "Recipe: Managing tickets created outside of business hours using End session as a ticket trigger action",
"description": "You can manage messaging tickets created outside of business hours by applying a business hours schedule, tagging those tickets, ending their sessions, and organizing them into a dedicated view and optional custom queue.",
"articleSection": "Workflow best practices and recipes",
"datePublished": "2025-06-05T04:43:42+00:00",
"dateModified": "2025-09-06T00:05:04+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/9340032656026"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
}
}</script>