I would like to redirect the visitor to a custom offline contact form which already exists on my site instead of opening LiveHelpNow "leave a message" form, is this possible?
Yes it is possible by simply inserting this function to the page where LiveHelpNow is installed.
For the embedded widget, please use this code:
<script type=“text/javascript">
function lhnJsSdkOfflineShown(){
location.href='YOUR OFFLINE FORM URL';
}
</script>
For classic pop up style window, please use this:
Please change LHNACCOUNTID with NUMERIC portion of your LiveHelpNow account # and YOUR OFFLINE FORM URL with URL on your site to redirect the visitor to.
<SCRIPT>
function CustomOpenLHNChat(){
if (typeof lhnWin !== 'undefined' && lhnWin){
if (!lhnWin.closed){
lhnWin.blur();
setTimeout(lhnWin.focus(), 10);
return false;
}
}
var wleft = (screen.width - 580-32) / 2;
var wtop = (screen.height - 420 - 96) / 2;
if (bLHNOnline == 0) { location.href='YOUR OFFLINE FORM URL';} else {
lhnWin=window.open('https://www.livehelpnow.net/lhn/livechatvisitor.aspx?lhnid=LHNACCOUNTID', 'lhnchat', 'left=' + wleft + ',top=' + wtop +',width=580,height=435,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
}
}
</SCRIPT>
*IMPORTANT FOR DEPT ROUTING VIA CHAT BUTTON
If your are using dept routing via the chat button, please use the code below instead of the code above. Please change LHNACCOUNTID with NUMERIC portion of your LiveHelpNow account # and DEPTNUMBER with the dept number you want to use.
Place YOUR OFFLINE FORM URL with URL on your site to redirect the visitor to.
<SCRIPT>
function CustomOpenLHNChat(){
if (typeof lhnWin !== 'undefined' && lhnWin){
if (!lhnWin.closed){
lhnWin.blur();
setTimeout(lhnWin.focus(), 10);
return false;
}
}
var wleft = (screen.width - 580-32) / 2;
var wtop = (screen.height - 420 - 96) / 2;
if (bLHNOnline == 0) { location.href='YOUR OFFLINE FORM URL';} else {
window.open('https://www.livehelpnow.net/lhn/livechatvisitor.aspx?lhnid=LHNACCOUNTID&d=DEPTNUMBER', 'lhnchat', 'left=' + wleft + ',top=' + wtop +',width=580,height=435,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
}
}
</SCRIPT>