Support Center > Knowledge Base> Article: Route live chats launched on the same web page to different departments

Route live chats launched on the same web page to different departments

Article ID: 7188 Email Print
Question
Is it possibile to have 2 different chat window designs directing to different departments in a single page?

Answer
  1. Please install invisible button code on the web page first. Find it in Admin Panel->Installation->Live chat button->For websites->invisible Button (bottom of the button selection page)
  2. Add this javascript function to the web page (change ACCOUNTID to the NUMERIC portion of your LiveHelpNow account #):  
    <script type="text/javascript">
    function openLiveChat(department, win){
    var wleft = (screen.width - 580-32) / 2;var wtop = (screen.height - 420 - 96) / 2;
    window.open('http://www.livehelpnow.net/lhn/livechatvisitor.aspx?lhnid=ACCOUNTID&d=' + department + '&zzwindow=' + win, '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>
  3. Go to Admin Panel->Account Setup->Departments and record all Department # setup for your account
  4. Now you may instruct any element on your web page to launch chat and specify which department to connect it with. Here's an example:
    <a href="#" onclick="openLiveChat(999, 0);return false;">Chat with Sales</a>
    or if you would like to hook up the button with status changes then use this:
    <a href="#" onclick="openLiveChat(999, 0);return false;">
    <img id="Img1" src="'http://www.livehelpnow.net/lhn/functions/imageserver.ashx?lhnid=ACCOUNTID&navname=&java=&referrer=&pagetitle=&pageurl=&page=&zimg=BUTTONID&d=DEPARTMENTID&zzwindow=WINDOWID&t=f" alt="Live Help Support by LiveHelpNow" border="0" />
    </a>
    
    

    Where 999 is the Department # you would like to connect the customer with.


    If you would like to have a different window associated with the button, 0 is the default window ID. Change this number to reflect the window you want.


Related articles

Article Details
Views: 31550 Created on: Mar 31, 2011
Date updated: Apr 10, 2015

Poor Outstanding