Question
My customers can still chat with us after all agents have gone offline. Why is this happening?
Answer
In Zendesk Chat, once a chat has begun, an agent does not have the ability to end the chat on behalf of the customer. The connection is still open until the customer ends the chat. For other reasons that a chat session could end, see the article: When do chats time out?
If a customer starts a chat, and then the conversation completes, and the agent ends the chat in the user interface, the customer could still have the chat dialogue open and begin a chat conversation that will not be answered. This can cause confusion because there are no agents to take the chat.
Performance steps
It is possible to write a custom script that ends a chat as soon as an account goes offline.
<!--Callback to end chat when account goes offline -->
<script type="text/javascript"> zE('webWidget:on', 'chat:status', function (status) { if (status === 'offline') { zE('webWidget', 'chat:end') } else { console.log('This chat session is now', status); } }); </script>
For more information, consult the Chat API documentation.
5 Comments
Under Performance Steps, it says "It is possible to write a custom script that ends a chat as soon as an account goes offline."
What/who exactly is "an account"? Would that be when the agent ends the chat?
Thank you for reaching out to Zendesk Support.
In regards to your concern, the following "account" that was mentioned in the article is the Zendesk account. Meaning, once there are no agents available or if all agents have gone offline, then the chat will automatically be closed.
Thank you!
Kind regards,
Hi there,
Is there a way to have this timeout after a agent has closed the chat from our end, rather than when we're offline?
We wouldn't want to just cut chats off when we switch to Invisible. For example, if we were chatting to a customer and we then switched to out of hours, we wouldn't want the chat to be disconnected. However, once we end the chat, we don't want the customer to then be able to continue chatting if we're not there.
Thanks!
Thank you for reaching back to Zendesk Support.
An agent cannot close the chat, not unless he/she manually disconnected from the chat. Also, when an agent switches to Invisible status, the ongoing chat would remain and it will not disconnect.
Once all of your agents switch to Invisible status and there are no available agents, then your customers will not be able to reach chat or get into the queue for a chat. Once you have operating hours enabled and set, your agents will not be able to go Online outside operating hours and your customers will not be able to get into a chat.
Thank you!
Kind regards,
Really need this and/or this https://support.zendesk.com/hc/en-us/articles/4408835731994
Please sign in to leave a comment.