Workflow: Use a messaging trigger to notify customers if a group is offline

<p>Use a messaging trigger to notify visitors if a group is offline. This trigger recipe shows how to send a message to visitors who request a new conversation when all agents in a specified group are offline.</p><p>This 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_01KY7SYH98AR6EK7HCEQ4G8WS2">Step 1: Create the messaging trigger</h3></div><div class="panel">
<p>To create this workflow:</p>
<ol>
<li data-list-item-id="ef04cf69fb9aef118b18d441526a038d6">Create a <a href="https://support.zendesk.com/hc/en-us/articles/6058753945242-Creating-messaging-triggers" target="_blank" rel="noopener noreferrer">messaging trigger</a>
</li>
<li data-list-item-id="efe53b51c225f2a6fb259539041a30228">Give the trigger a name, such as <strong>Notify for offline group</strong>, and add a description<br><img src="https://support.zendesk.com/hc/article_attachments/10224577618330" width="1652" height="682">
</li>
<li data-list-item-id="e6349b49cc860be114762cb2768d9e97f">Select <strong>Activate this trigger</strong>
</li>
<li data-list-item-id="e666f1744f4b550baa65486e5e711d397">For <strong>Run trigger</strong>, select <strong>When a customer requests a conversation</strong>
</li>
<li data-list-item-id="e06537188ed73283f402eae113d396664">
<p>Under Conditions, select <strong>Match ALL of these conditions</strong>:</p>
<p><strong>Group status |</strong> <code>group name</code><strong> | Invisible</strong></p>
<figure><p><img src="https://support.zendesk.com/hc/article_attachments/10016369104154" alt="Group status invisible.png" width="1360" height="448"></p></figure>
</li>
</ol>
<ul><li data-list-item-id="e081731fd1aedc81c38340a4b2462a039">
<p>Under <strong>Actions</strong>, add:</p>
<p><strong>Send message to customer | name of agent | message</strong></p>
<p>Add the name of the agent who sends the message, and customize the message with your business hours.<br><img src="https://support.zendesk.com/hc/article_attachments/10016369105946" alt="Action, send message.png" width="1320" height="290"></p>
</li></ul>
</div><div class="accordion"><h3 id="h_01KY7SYH982JTH5YEMF954J6GV">Step 2: Test the trigger</h3></div><div class="panel">
<p>Test the trigger to ensure it informs visitors that the department is offline.</p>
<p>To test the trigger:</p>
<ol>
<li data-list-item-id="ef05b592068707aede851a51347eb3e71">Set all agents in your intended messaging department to <strong>Invisible</strong>, or logged off entirely. </li>
<li data-list-item-id="ec87ec7f5c17385a3bdadd04ee0e30a4a">Open a new private browser window, then open the messaging widget on your help center or website</li>
<li data-list-item-id="e552bdb9271eea3d9b1dd2445b30027b1">Start a new conversation to confirm that the trigger fires</li>
</ol>
</div>