Home > How do I open the chat window programmatically?
(Last Updated On: July 30, 2021)
This article explains how to programmatically open the chat window.
(Your other option is the simpler
.openProactiveChat() function, here are a few example use cases for you:
You will probably want to avoid bugging your visitor by constantly sending chat invitations. Not setting the
forced parameter lets the parameter default to
false. This means: if a visitor closes the chat window with the X-button, they won’t receive a new chat invitation for a while (default 30 minutes).
In this case, you’re setting the
forced parameter to true so that SnapEngage will send a chat invitation whether or not the visitor has recently closed a chat window. However, if you do not have any agents available to chat, you will probably not want the offline form to show up as soon as a visitor lands on this page. Do not set the
offlineFallback parameter to let it default to
You will probably want to call the function with the
offlineFallback options set to true. That way, if someone clicks the link when you have no agents available, they can still contact you through the Offline form.
Published January 12, 2012