Zopim Migrating from departments to groups | Community
Skip to main content

Zopim Migrating from departments to groups

  • February 8, 2023
  • 0 replies
  • 0 views

Hello,

our zendesk installation is migrating from Departments to groups.

We were using the custom js code below utilizing $Zopim to check if any agents were online in our department and then showing the live chat widget

var depts = $zopim.livechat.departments.getAllDepartments();
var caDeptStatus = '';
for (var i = 0; i < depts.length; i++) {
    if (depts[i].name == 'Domain.ca') {
        caDeptStatus = depts[i].status;
       
if(caDeptStatus == 'online'){

//show live chat widget

 

How do we replicate the same behavior with groups? How to check if an agent is online for a particular group?