Changing the default department in live chat window

By default, the department in the Live Chat window is sorted according to the DepartmentID value, which cannot be changed.

To override the default sort order, you need to change the chatdepartmentlist template content. This article provides the steps to change the chatdepartmentlist template content.

To change the chatdepartmentlist template, follow these steps:

  1. Login to the Admin control panel and go to Templates> Templates> Live support.
  2. In the Live support template group, select the chatdepartmentlist template.
  3. Select the chatdepartmentlist template

  4. Replace the content of the template with text below:
  5. <select name="departmentid" class="swiftselect" >

    <{foreach key=key item=_item from=$_departmentStatusContainer[online]}>

    <option <{if $_setDepartmentID == $_item[departmentid]}> <{/if}> value='<{$_item[departmentid]}>' class='deponline'><{$_item[displaytitle]}> - <{$_language[online]}></option>

    <{/foreach}>

    <{foreach key=key item=_item from=$_departmentStatusContainer[offline]}>

    <option <{if $_setDepartmentID == $_item[departmentid]}> <{/if}> value='<{$_item[departmentid]}>' class='depoffline'><{$_item[displaytitle]}> - <{$_language[offline]}></option>

    <{/foreach}>

    </select>

  6. Click Save.
  7. Saving the change