Issue symptoms
Department routing is set up in Chat but is not routing chats correctly.
- Chats are being routed to the wrong agents and wrong departments.
- Chats are routed to offline agents.
- Chats are not being routed to a department when they should be.
Resolution steps
Make sure the issue is not caused by online status
The routing issue may be caused by a department's offline status. When chats are routed with triggers, the chat goes to the department specified in the trigger even if that department is offline. This can cause issues with lost chats. For more information, see the article: Why do triggers route live chats to departments with no available agents?
Make sure your pre-chat form is working correctly
If you use the pre-chat form to allow customers to choose a department, make sure the pre-chat form is enabled and working correctly in your account. Also, make sure the department option is not hidden on the pre-chat form. For more information, see the article: Can I hide the department field on the pre-chat form?
Make sure your trigger is set up correctly
If you use a trigger to route chats to departments, make sure you are using the correct department condition in your trigger. Learn more about the three different department conditions and how each one works in this article: Should I use the department, department status, or visitor department condition in my Chat trigger?
When you use the Set visitor department action in a Chat trigger, make sure you have Run trigger set to When a visitor has loaded the chat widget. Department routing does not work if Run trigger is set to When a visitor requests a chat or When a chat message is sent. See the image below for an example of this setup:
If the chat was started by a proactive chat trigger instead of by your visitor, this will bypass any other routing triggers you have in place. In this case, the chat will route to any available agent regardless of the department. If you want chats started with a proactive message to route correctly, make sure your proactive chat triggers include the action Set visitor department as well.
11 comments
Jahn
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
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
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:
0
Jahn
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
DMKT
We've had the same issue as Joey & Pat, and recently our chat visitors started being randomly assigned to the wrong department despite our logs showing no sign of errors. This is really driving us crazy and the support has been less than helpful since "custom APIs are not supported". We rout our customers by IP and sort them into region departments, however there has been at least 5~10 cases a day that are all routed to a certain department which has usually less than 2 cases a day. I wonder if anyone out there has encountered similar issues and can guide us in the right direction. About 10% of the cases are routed to the wrong department.
We also use the older https://api.zopim.com/files/meshim/widget/controllers/liveChatAPI/Departments-js.html API in our code.
0
Joey
We spoke with all kinds of Zendesk representatives without a solution. My theory is an issue within Zopim's own core. We have multiple products that have the code implemented slightly different and on different platforms (Help Center, Product, iOS app) and all have this issue.
We also tried Sunshine conversations in a production env. but that was lacking features and too immature.
We are in the process of moving all our chat teams to a different platform as the Zopim Chat has not seen any love in a very long time (I'm confident this won't get fixed).
0
ilker devrim
About 2 hours ago, without making any changes, suddenly zendesk kicked out all reps.
When we access our Zendesk accounts again, chats continue to be assigned automatically, but they cannot be answered without doing "Assign Recording to Me" and then "Send Openly".
We have been experiencing this problem for 2 hours. We didn't make any changes to any settings, this happened automatically. We can't understand what the problem is.
0
Darenne
I trust you are well! It appears that your concern requires internal investigation. Therefore, I will proceed to open a ticket for you so that one of our Advocates can help you with your issue.
Warm regards,
0
Ljiljana Bozickovic
You can solve this
0