// Do not open proactive chat if the user has recently // closed a proactive invite var forced = false; // Do not open the offline box if the widget is not online var offlineFallback = false; // Do not open the offline box if the widget is not online var message = 'Hey there! How can I help you today?'; // Call the API with the above parameters SnapEngage.openProactiveChat(forced, offlineFallback, message);
Manually open a proactive message.
|forced||boolean||Should SnapEngage disregard whether or not the visitor has recently closed a chat window? (See here for more info on The 30-minute Proactive Chat Delay Cookie.) And should SnapEngage disregard whether or not you have "Enable Proactive Chat" checked in your Admin Dashboard Proactive Settings tab? For example, if you're hooking this function to the onclick event of an tag, you'll want this set to true because you can assume someone clicking a link does want to chat.|
|offlineFallback||boolean||Should this function fallback to the offline form if live chat is currently unavailable? For example, if you’re hooking this function to the onclick event of an tag, you'll want this set to true because you can assume someone clicking a link does want to get in touch with you, and if you’re offline this will give them the option of filling out the offline form. Alternatively: Be careful using true here, a poor implementation of the