Support Center > Knowledge Base> Article: Trigger chat invitations

Trigger chat invitations

Article ID: 3360 Email Print
Is it possible to trigger a chat invitation based on user action, for example if there are products in the shopping cart?

It is possible to trigger chat invitation programmatically on your website.
For example you would like to display chat invitation to a visitor with special product in his/her shopping cart. Or pop an invitation to live chat to a visitor who is about to leave your site without completing a purchase.
Simply call the following JavaScript function on pages where LiveHelpNow chat button is installed:
Invite without requiring pre-chat requirements:
function WriteLHNMessage(message,0)
Invite requiring pre-chat requirements:
function WriteLHNMessage(message,1)
var mes='Hello, the shoes you have in your shopping cart go very nicely with black jeanes we actually have on sale at 20% off today. Please accept this chat invitation to learn more';
setTimeout("if (typeof lhnWin == 'undefined') {WriteLHNMessage(mes,1);}",3000);
another example:
<body onload="if (typeof lhnWin == 'undefined') {WriteLHNMessage('Your message',1);}" ...
Click here for instructions to customize the look & feel of the automatic chat invitation.

Related articles

Article Details
Views: 26296 Created on: Oct 26, 2010
Date updated: Sep 13, 2014
Tagged: javascript

Poor Outstanding