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?