What is the expected behavior for chat sessions to time out?
The visitor is in control of the chat session, and can end the chat session in one of three ways:
- Going to the options menu and hitting end chat.
- In the event that the visitor closes the browser (no windows with the chat widget are open) the session times out within a timeframe of 20 seconds to 2 minutes.
- In the event that the visitor using a browser on a mobile device minimizes, tabs away from, or closes the browser containing the chat, the session times out within a timeframe of 20 seconds to 2 minutes.
- In the event that the visitor idles* on a site with the widget, their session stays open for 20 minutes before the session automatically ends.
*Idle status is defined as no mouse or keyboard input on the site for 10 minutes. The user does not need to interact with the widget itself, but must be actively working on the page the widget is loaded on. Additionally, there can be a variance of up to 5 minutes depending on their connection to Chat.
The chat session is still considered active unless it's ended for one of these reasons. An agent can leave a chat session, but it stays open from the visitor side until one of the above conditions is met.
If the end user chats in again after an agent leaves, it pops back into the queue. In these cases, the history of their previous chat is present because it’s still considered the same chat session. Any subsequent messages are added to the chat session, and once ended are added to the history as a single entry.
For the Chat Mobile SDK versions, the chat session terminates after any of the below conditions.
- There was no activity on the chat for 1 hour.
- The visitor was disconnected for an hour.
- The agent ends the chat, at which point the session disconnect timeout is reset to 5 minutes.
- The visitor ends the chat at which time the session immediately terminates.
- If push notifications are disabled, the session will timeout 30 minutes after the user backgrounds the app.
If you don't want your customers to chat once you are offline, see the article: Why can my customers still chat after all agents have gone offline?