Department routing is not working correctly in chat

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.

Note: The action Set visitor department needs to be positioned above the Send message to visitor action. The visitor department can only set the chat department before a chat is started.