Workflow: How to manually close a ticket

<p>Admins and agents sometimes want to force a ticket status to <strong>Closed</strong> for these reasons:</p><ul>
<li data-list-item-id="ec72ef4d142e0e33cad38e6082fe68604">Closed tickets generally can’t be modified, but admins and authorized users in custom roles may modify supported fields when the account-level setting and role permission are enabled.</li>
<li data-list-item-id="ee326a3aa6a005bfc8c9292bfe2cbad93">
<a href="https://support.zendesk.com/hc/en-us/articles/4408885959066-Lesson-5-Business-rules" target="_blank" rel="noopener noreferrer">Business rules</a> may make changes upon or after a ticket is solved</li>
<li data-list-item-id="ef991d14f87613b9610e7e2046a267454">The <a href="https://developer.zendesk.com/api-reference/" target="_blank" rel="noopener noreferrer">Zendesk application programming interface (API)</a> may make changes upon or after a ticket is solved</li>
</ul><p>This article provides a workaround to apply in these situations, with triggers that automatically close tickets based on certain conditions. For example, you can use the presence of a particular custom field value or a specific tag.</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</h3></div><div class="panel">
<p>To create the trigger:</p>
<ol>
<li data-list-item-id="e5d281ffb955b6c1244366484df090830">Click the product name, such as <strong>Support</strong> or <strong>Knowledge</strong>, from the menu in the top left corner &gt; <strong>Admin Center</strong>
</li>
<li data-list-item-id="eb817be4addaab943d7529e3b8f6db6b8">Click <strong>Objects and rules</strong> in the sidebar &gt; <strong>Business rules</strong> &gt; <strong>Triggers</strong>
</li>
<li data-list-item-id="ec8b395eae5d62a600cd561751e218010">Click <strong>Create trigger</strong>
</li>
<li data-list-item-id="e3038d667a6d3299129a6196723f7ad47">Enter a <strong>Name</strong> and a <strong>Trigger category</strong>
</li>
<li data-list-item-id="e28e12c5bc765182a29cd9455d5d8fd95">Under <strong>Meet ALL of the following conditions</strong>, add <strong>Object</strong> &gt; <strong>Ticket &gt; Status category</strong> <strong>|</strong> <strong>Less than</strong> <strong>|</strong> <strong>Closed</strong> and <strong>Object</strong> &gt; <strong>Ticket &gt; Tags</strong> <strong>|</strong> <strong>Contains at least one of the following</strong> <strong>|</strong> <code>closenow</code>
</li>
<li data-list-item-id="ef0247318d00b898eae6c95a9a9f0fb2c">Under <strong>Actions</strong>, add <strong>Object </strong>&gt; <strong>Ticket &gt; Remove tag</strong> <strong>|</strong> <code>closenow</code> and <strong>Object</strong> &gt; <strong>Ticket &gt; Status category</strong> <strong>|</strong> <strong>Closed</strong>. This order of actions prevents issues with follow-up tickets that automatically close upon creation.</li>
<li data-list-item-id="eb968be8b3212a1d878aa8b3c46a98fd1">Click <strong>Create trigger</strong>
</li>
</ol>
<p><strong><img class="wysiwyg-image-resized" style="width: 500px;" src="https://support.zendesk.com/hc/article_attachments/10682162385946" alt="Close ticket automatically trigger.png"></strong></p>
</div><div class="accordion"><h3 id="01HXY1G18XYBGPX37812NDQPP4">Step 2: Create a macro for your agents</h3></div><div class="panel">
<p>To make sure that your agents don't forget to add the <code>closenow</code> tag, add a macro.</p>
<p>To add a tag with a macro:</p>
<ol>
<li data-list-item-id="ebd336dc9ef22e02a081d9fb55c05d44c">Click the product name, such as <strong>Support</strong> or <strong>Knowledge</strong>, from the menu in the top left corner &gt; <strong>Admin Center</strong>
</li>
<li data-list-item-id="ec91ec424d3165e4294ef89fadff59a28">Click <strong>Workspaces</strong> in the sidebar &gt; <strong>Agent tools</strong> &gt; <strong>Macros</strong> &gt; <strong>Create macro</strong>
</li>
<li data-list-item-id="e4b988925841357d32ecf7e8c8e5d7f6e">Enter a <strong>Macro name</strong>
</li>
<li data-list-item-id="e417da4dfc7e718e9db9009aa041f91d3">From <strong>Available for</strong>, select <strong>All agents</strong>
</li>
<li data-list-item-id="eb46e7d8915d90ec868c7f3740738dbac">Under <strong>Actions</strong>, add <strong>Add tags</strong> <strong>|</strong> <code>closenow</code><br><strong><img class="wysiwyg-image-resized" style="width: 500px;" src="https://support.zendesk.com/hc/article_attachments/8471079995674" alt=""></strong>
</li>
<li data-list-item-id="e51e668ab11e433ba3c4f91795e60dbc2">Click <strong>Create</strong>
</li>
</ol>
</div><div class="accordion"><h3 id="h_01KQY6BJ4X9EVYZKMJ68H9WVY9">Step 3: Ask an agent to refresh the page and use the macro</h3></div><div class="panel">
<p>To apply that macro:</p>
<ol>
<li data-list-item-id="eb983f13fea11c8c7901e97473304352d">Ask an agent to refresh the page on Zendesk</li>
<li data-list-item-id="ebcf23bb0ca65449180a028f25ca0842a">Open a Support ticket to close, click <strong>Apply macro</strong>, then select the name of the macro you created</li>
<li data-list-item-id="e3f1672513a457bfb461bc3a53b1953bb">Click <strong>Submit as Solved</strong>
</li>
</ol>
<p>This applies the macro from a ticket. The ticket receives the tag automatically, which starts the trigger.</p>
<div class="note">Note: In accounts with <a href="https://support.zendesk.com/hc/en-us/articles/4412575861018-Creating-custom-ticket-statuses" target="_blank" rel="noopener noreferrer">custom ticket statuses</a> deactivated, use <strong>Status</strong> for the condition and action instead of <strong>Status category</strong> in the trigger recipe above.</div>
</div>