Question
If a visitor loads the Web Widget (Classic) beforeoperating hoursend, they are able to chat in after all our agents have just gone offline for the day. As a result, they create amissed chatinstead of an offline message. Is there a way to ensure the widget will not allow a chat to be requested for a department that is currently offline?
Answer
The native widget behavior is to not be updated in real-time as a specific department goes offline after it was loaded on a page. However, you can force the widget to update whenever this occurs and the visitor isn't already in an active session using the API.
Whenever the chat department has a status update, verify the new status isOfflineand then check if the visitor is already in an active session. If the agent's status isOfflineand the visitor is not in an active session, then use theupdateSettingsmethod to suppress chat.
See the below example that checks if theCRMdepartment is online.
0 Comments
Pleasesign into leave a comment.