Auto Assigning A Department On Start Of A Live Chat

How to auto assign a department

When a user clicks your live chat button, What department should they see.

If you have departments enabled, you may want the user to already have a certain department selected when they launch a new live chat window.

By default, the system will auto select the first department in the list / the first chat department you created. This behaviour can be modified by adding some custom code to your live chat widget.

Typically, You will have some code similar to this on your website:

document.write(‘<a href=”javascript:openSupport(\’0000YOURSITEID0000\’,\’Welcome\’);”><img src=”//status.imsupporting.com/status.php?siteid=0000YOURSITEID0000&amp;style=090820142&amp;docref=’+docref+'” border=”0″ alt=”live chat software” title=”Launch live chat”/></a>’);

The code above calls a Javascript function called “openSupport”

This would allow the user to start a live chat and then choose a department. However the default department will be whatever the system has chosen.

If you wanted to set your department for this particular page for example. Say you have a webpage dedicated to Plumbing and you want chats on this page to by default go to the Plumbing department (or at least have it selected by default) , you would change the code above to something like below:

document.write(‘<a href=”javascript:openSupportDept(\’0000YOURSITEID0000\’,\’Welcome\’,\’Plumbing\’);”><img src=”//status.imsupporting.com/status.php?siteid=0000YOURSITEID0000&amp;style=090820142&amp;docref=’+docref+'” border=”0″ alt=”live chat software” title=”Launch live chat”/></a>’);

the modifications we made above are as follows:

We now call javascript:openSupportDept rather than just openSupport.

We also now give it a 3rd parameter. This time its the name of the department (as displayed within the Department settings window within live chat)
In this case it now reads :

openSupportDept(\’00000YOURid00000\’,\’Welcome\’,\’DepartmentNameNoSpaces\’);

Rather than:

openSupport(\’00000YOURid00000\’,\’Welcome\’);

Get my free trial now!

Check it out for yourself. Free.