Department routing is not working correctly in chat

Return to top

6 Comments

  • Jahn Bronilla
    Community Moderator

    Hey Erik Lynch, I am testing the visitor department routing in Sandbox and created this trigger. See below condition:

    Run Trigger: When a Chat Message is sent

    Meet all
    Visitor Page URL>Contains>(the URL where chat originated)
    Visitor Tag>contains>(our end user do have specific tags)

    Action:
    Set Visitor department>(specific department
    Add Tags>(Specific Tag)

    Apparently it's not working at all. Tried and tested so many conditions.

    0
  • Christine Felicia
    Zendesk Engineering
    Hi Jahn,

    We'll continue to assist you on the ticket that you raised with us related to this issue. Kindly check your email for updates. Thanks!
    0
  • Joey

    For anyone coming across this.

    We have had this issue for such a long time with zero resolution, department is being set in the widget code but intermittently passes the department with a null value. The resolutions in this article are not everything there is to it.

    Something is broken underneath.

    1
  • Marine
    Zendesk Customer Care
    Hi Joey! 
     
    How are you exactly passing the departments in the chats when the chats come in? You mention that is being set in the widget code - do you have any customisations set in your own script? Feel free to share the details.
     
     
    0
  • Pat Behrens

    Joey, did you have any success finding out why that was happening? My company is using the chat widget and we set the department via the API. We will intermittently have issues where the department is not set and the chat will be sent to our default which is a problem.

     

    Our code looks like this:

    (function() {
    window.opener = null;
    window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c);},$=z.s=d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set._.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');$.src='https://v2.zopim.com/?3XwTShAYzG4dmNuhM8rHkll6wjX9mXIN';z.t=+new Date;$.type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
    $zopim(function(){
    $zopim.livechat.addTags('webcode: 0-015C');
    $zopim.livechat.setOnChatStart(function(){$.post('https://{{devURL}}/zchat/start',{e: $zopim.livechat.getEmail()},null,'json');});
    $zopim.livechat.setOnChatEnd(function(){$.post('https://{{devURL}}/zchat',{v: $zopim.livechat.getName()},null,'json');});
    $zopim.livechat.window.setOffsetVertical(2);
    $zopim.livechat.window.setPosition('tl');
    $zopim.livechat.window.setSize('medium');
    $zopim.livechat.window.show();
    $zopim.livechat.departments.filter('');
    $zopim.livechat.departments.setVisitorDepartment('SpecificDepartment');
    $zopim.livechat.theme.setColor('#0076bf');
    $zopim.livechat.window.setTitle('SpecificDepartment');
    $zopim.livechat.concierge.setAvatar('https://{{devURL}}/images/rs/zopim_chat/chat_logo.png');
    $zopim.livechat.theme.reload();
    });
    })();
    0
  • Jahn Bronilla
    Community Moderator

    Hello Pat Behrens - this is what we are currently doing and using.

    Chat Department Routing via API - https://developer.zendesk.com/api-reference/widget/settings/#departments 

    NOTE: we have visitor tag as the main identifier for us to route chats to their respective departments

    0

Please sign in to leave a comment.

Powered by Zendesk