Chat: Department operating hours are ignored when agent is online.


  • Joe Beaudoin
    Comment actions Permalink

    Hi Simon,

    Thanks for reaching out!

    Unless the user in question is designated a department value, they can chat in the widget with the agent who's online - regardless of if that agent is in the department with active business hours or not.

    In order to restrict a user's ability to chat in the widget based on a department's schedule, you need to set the department value for that visitor.

    The best way to go about this is to use the Chat JS API, you can set the visitor's department so that the widget they interact with respects the department hours of operation:

    You can also set department values when a user loads the chat widget by navigating to the webpage it lives on, based on the URL. More on that workflow is in the following:

    I hope that helps! Give it a shot and let us know if there's anything else you need.

  • Simon Blouner
    Comment actions Permalink

    Hey Joe,

    Thanks for the response and your suggestions!
    I don't know if my initial post wasn't clear enough or not, but your suggestions, unfortunately, doesn't solve the situation.

    As I mention, the Dep.A Chat will still be considered to be online on the Dep. A website, because of the agent being online - thereby ignoring Dep.A operating hours, because the agent is online to work for Dep. B with the extended operating hours. 

    Zendesk have confirmed this to be a problem.

    We're currently testing a workaround for this, using scripts that only offers the chat if the user is visiting the site inside of the defined operating hours in the script.

    Once we're done testing, I will update with a link to my colleagues' solution post.

    With #helpsome regards,
    Simon Blouner
    Zendesk Consultant @

  • Louise Dissing
    Comment actions Permalink


    I just created a tip on how to implement a Javascript solution that'll help you keep your chat departments closed even if an agent is online in another department.

    Take a look at it here:


    With #helpsome regards,
    Louise Dissing
    Team Lead @


Please sign in to leave a comment.

Powered by Zendesk