Question
I am using triggers to route chats to departments. Some departments have agents available, but not in the departments that the trigger routes the chats. Why do triggers route live chats to departments with no available agents?
Answer
When you use triggers to route chats to departments and no agents are available in a department, those chats are still routed to the department. For example, the trigger below sets the visitor department to "VIP":
Any agents that are not in the department VIP won't have access to those chats.
As a workaround, you can implement custom API code to only route chats based on if agents are online within the department. See the developer documentation: