Triggers based on agent, or department, status

Answered

1 Comments

  • Yunen Yeo

    Hi ClaudioCeppi,

    You can use a mixture of JS API and trigger to accomplish what you would like to do. 

    1) Set a tag to check if a specific department is online, like this:


    $zopim(function() {
    $zopim.livechat.setOnConnected(function() {
    var french_dept = $zopim.livechat.departments.getDepartment();
    if (french_dept.status == "online")
    $zopim.livechat.addTags("fr_online");
    else
    $zopim.livechat.removeTags("fr_online");
    });
    });


    2) Have the trigger that fires on the french site to check if there is a tag "fr_online" before firing.

     

    That way you can be sure that the trigger only fires when there is the french department is online.

    Hope this helps :)

     

    0

Please sign in to leave a comment.

Powered by Zendesk