Chat API

Department List Demo

This demo shows you how to use monitor tag and render department list directly. In this example, mylivechat ID is 68268000. You need to replace it with your own mylivechat ID.

  1. Use chatapi.aspx to embed monitor tag and hide button/link/box.
  2. Use MyLiveChat.Departments method to get all departments of your account.
  3. Use MyLiveChat.Departments[i].Agents[j].Online method to determine whether the agent of Departments[i] is online.
  4. Use MyLiveChat_OpenDialog() method to show the chat dialog or offline message window.