Workflow: How to automatically set priority on tickets for SLA targets

<p>To apply a service level agreement (SLA) to your tickets, you must set the <strong>Priority</strong> field on the ticket first. Use the steps below to automate this with triggers.</p><p>The workflow includes the steps below:</p><div style="margin-bottom: 20px; text-align: right;">
<button id="master-toggle" class="btn fw-semibold text-dark" data-action="expand" style="background-color: #DEF991; border: none; outline: none; border-radius: 7px; padding: 10px 20px; font-size: 15px; transition: background-color 0.2s ease;" onmouseover="this.style.backgroundColor='#cbef6d'" onmouseout="this.style.backgroundColor='#DEF991'">
Expand all tabs
</button>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
</script><div class="accordion"><h3 id="h_01HXY1BFCAPEN08R87P7ENG6TS">Step 1: Create a trigger that sets priority for all tickets for your SLA</h3></div><div class="panel">
<p>Triggers can set ticket priority so SLAs apply. In the example below, the trigger sets all tickets to the same priority.</p>
<p>To create a trigger that sets priority for all tickets:</p>
<ol>
<li data-list-item-id="eaf21272ff6a9e422b474341779d55d55">In <a href="https://support.zendesk.com/hc/en-us/articles/4581766374554-Using-Zendesk-Admin-Center#topic_hfg_dyz_1hb" target="_blank" rel="noopener noreferrer">Admin Center</a>, click <strong>Objects and rules</strong> in the sidebar, then select<strong> Business rules &gt; Triggers</strong>
</li>
<li data-list-item-id="e39e734e36597d70857a7cffc126138a8">On the triggers page, click the <strong>Ticket</strong> tab</li>
<li data-list-item-id="e1594e4c771667d8c6fdd1e06b43438b4">Click <strong>Create trigger</strong>
</li>
<li data-list-item-id="e77f6e312e3d6f28a13e688738d32bf81">Add the conditions under <strong>Meet ALL of the following conditions</strong>: <strong>Object &gt; Ticket &gt; Ticket</strong> <strong>|</strong> <strong>Is</strong> <strong>|</strong> <strong>Created</strong> and <strong>Object &gt; Ticket &gt; Priority</strong> <strong>|</strong> <strong>Is</strong> <strong>|</strong> <strong>-</strong>
</li>
<li data-list-item-id="e508e01149514614d19a4ad9662e47fc9">Add the action under <strong>Actions</strong>: <strong>Object &gt; Ticket &gt; Priority</strong> <strong>|</strong> <strong>Normal</strong>
</li>
<li data-list-item-id="eac10527a5db021e73c9d1c98216a6979">Click <strong>Create trigger</strong>
</li>
</ol>
<p><img src="https://support.zendesk.com/hc/article_attachments/10569918717722" alt="Create a trigger that sets priority for all tickets.png" width="1970" height="1158"></p>
</div><div class="accordion"><h3 id="h_01J47KA2J8E5A3EN65G9QPA8HA">Step 2: Modify this trigger to set priority based on keywords</h3></div><div class="panel">
<p>You can use any ticket property, such as a custom field, to set ticket priority. In this example, use keywords as trigger conditions. The trigger sets the priority based on the keywords in the ticket.</p>
<p>To create a trigger that sets priority based on keywords:</p>
<ol>
<li data-list-item-id="e3811f079012c3e37aa5c809fdec56238">In <a href="https://support.zendesk.com/hc/en-us/articles/4581766374554-Using-Zendesk-Admin-Center#topic_hfg_dyz_1hb" target="_blank" rel="noopener noreferrer">Admin Center</a>, click <strong>Objects and rules</strong> in the sidebar, then select<strong> Business rules &gt; Triggers</strong>
</li>
<li data-list-item-id="e77601d1c278561d590b1cb9dded81ea9">On the triggers page, click the <strong>Ticket</strong> tab</li>
<li data-list-item-id="e7de45a631b6fea8970cbe3b69ed8e3ad">Click <strong>Create trigger</strong>
</li>
<li data-list-item-id="ed3c52d654452f24d738a5ee79ed0c55f">Add the conditions under <strong>Meet ALL of the following conditions</strong>: <strong>Object &gt; Ticket &gt; Ticket</strong> <strong>|</strong> <strong>Is</strong> <strong>|</strong> <strong>Created</strong> and <strong>Object &gt; Ticket &gt; Comment Text</strong> <strong>|</strong> <strong>Contains at least one of the following words</strong> <strong>|</strong> <code>sales</code>
</li>
<li data-list-item-id="e1d299bfaae75dc1fa2d7aacbedd5ad86">Add the action under <strong>Actions</strong>: <strong>Object &gt; Ticket &gt; Priority</strong> <strong>|</strong> <strong>Normal</strong>
</li>
<li data-list-item-id="e1f683f93f5c9a397b7570fa75fc629dd">Click <strong>Create trigger</strong>
</li>
</ol>
<p><strong><img src="https://support.zendesk.com/hc/article_attachments/10569918717978" alt="Create a trigger that sets priority based on keywords.png" width="1970" height="1271"></strong></p>
</div><div class="accordion"><h3 id="h_01HXY1GYQDRZ3V1Y2A1VJXG88P">Step 3: Verify that you set up the trigger correctly</h3></div><div class="panel">
<p>View the ticket events to verify that your trigger runs correctly. The ticket events include all triggers applied to the ticket and reflect changes in ticket priority. For instructions on how to view ticket events, see <a href="https://support.zendesk.com/hc/en-us/articles/4408829602970-Viewing-all-events-for-ticket-updates" target="_blank" rel="noopener noreferrer">Viewing all events for ticket updates</a>.</p>
<p>For other questions about the ticket priority field, see:</p>
<ul>
<li data-list-item-id="ebb1b236566de639b2558fe1be085c65d"><a href="https://support.zendesk.com/hc/en-us/articles/4408846345626-How-to-set-the-ticket-priority-based-on-the-support-email-address-Video" target="_blank" rel="noopener noreferrer">How to set the ticket priority based on the support email address?</a></li>
<li data-list-item-id="ea8d965c22f71d37179e68cbcf8aab423"><a href="https://support.zendesk.com/hc/en-us/articles/4408825637018-Can-I-edit-the-priority-field" target="_blank" rel="noopener noreferrer">Can I edit the priority field?</a></li>
</ul>
</div>