Issue symptoms

I am having issues with live chat department routing. Department routing is active in live chat, but does not route chats correctly.

  • Chats route to the wrong agents and wrong departments.
  • Chats route to offline agents.
  • Chats do not route to a department when they should.

How do I set or change the department in Zendesk Chat?

Resolution steps

Note: This article applies to accounts using live chat in Agent Workspace. To route conversations using messaging, see the article: Routing messaging tickets and notifications.

To verify the issue is not caused by online status

  • Verify that agents in the department are online to receive chats.

When you route live chats with triggers, the conversation goes to the department specified in the trigger even if that department is offline. This behavior can cause lost chats.

To verify the pre-chat form works correctly

If you use the pre-chat form to allow customers to choose a department:

  1. Turn on the pre-chat form and verify that it works correctly in the account.
  2. Ensure the department option is not hidden on the pre-chat form.
  3. With the pre-chat form turned on, select the Require Department to allow end users to choose the department when they request a chat.
Note: The mobile SDK does not support the use of chat triggers to set departments. This feature is only compatible with the Web Widget or Chat widget.

To verify the trigger setup

First, use the correct trigger

When using triggers to route live chats to different groups in Agent Workspace:

  • Use Chat triggers that can set the department for a chat before the visitor reaches out. This ensures the chat will be routed to the appropriate group in Support from
    the moment the ticket is created, and is recommended for chat routing in Agent
    Workspace.
  • Do not use Support triggers, these cannot run until the ticket has been created later on.
  • If your chat routing needs are more robust than what chat trigger conditions have to offer, the next best method for routing is through the use of the department's API endpoint and custom code. Similar to chat triggers, using the API to set the department on chats will take effect for the chat before a ticket is created.

Then, use the correct department condition

If you use a trigger to route chats to departments, use the correct department condition in the trigger.

  • Use the Set visitor department action in a live chat trigger > make sure Run trigger is 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:

Chat trigger setup

  • If a proactive chat trigger starts the chat instead of the visitor, this bypasses other routing triggers. In this case, the chat routes to any available agent regardless of the department. If you want chats that start with a proactive message to route correctly, make sure proactive chat triggers include the Set visitor department action.
Note: The Set visitor department action must be above the Send message to visitor action. The visitor department can only set the chat department before a chat starts.

After a chat starts

After a chat session starts:

  • It's too late for a trigger to make a change.
  • Your agents can manually reassign the ticket.
  • If you use a bot and your team has developers, assign the chat with the Chat Conversations API. The bot will read the message and initiates a transfer to your specified department.

Why are live chats routing to the wrong department or team? Why do live chats route to offline agents? How do I fix live chat department routing issues?

Routing issues occur in Agent Workspace due to offline department status, hidden pre-chat form fields, or incorrect trigger settings. Chat triggers or auto-reply rules send chats to specified departments even if offline, which can cause lost chats.

How do I fix department routing on the pre-chat form? How do I route live chats using the pre-chat form?

To verify that your pre-chat form routes chats correctly:

  1. Verify that you activate the pre-chat form and that it functions in your account.
  2. Ensure you do not hide the department option on the pre-chat form.

How do I configure chat triggers for department routing? What setting causes live chat trigger routing to fail?

To route live chats with triggers correctly:

  1. Add the Set visitor department action to your live chat trigger.
  2. Set Run trigger to When a visitor has loaded the chat widget.

Department routing fails if you set Run trigger to When a visitor requests a chat or When a chat message is sent.

How do proactive chat triggers route to departments? Why do proactive chats route to any available agent?

Proactive chat triggers bypass other routing triggers, sending chats to any available agent or support person. To route proactive chats correctly:

  1. Include the Set visitor department action in your proactive chat trigger.
  2. Place the Set visitor department action above the Send message to visitor action. You must set the visitor department before a chat starts.
Powered by Zendesk