AI Agent — Map to Chat

Message Routing rules in Messaging Settings make a published AI Agent the answering party for messaging conversations that match a web page URL or SMS number.

A published AI Agent with the Messaging channel turned on answers only the conversations routed to it. Routing is set in Message Routing, part of the messaging configuration in Messaging Settings: each rule matches where a conversation comes from — part of the web page URL the chat widget sits on, or the number texted for SMS — and sends matching conversations to a destination. Selecting an AI Agent as a rule's destination makes it the answering party for those conversations.

📘

Before Mapping

The AI Agent must be published with the Messaging channel turned on. Calls reach an AI Agent through an IVR instead — see AI Voice Bot.


Accessing Message Routing

Message Routing is accessible to accounts with Admin permissions.

  1. Navigate to Admin (System) > System Settings > Messaging
  2. The Messaging Configuration field is listed with the current routing rule count alongside its edit icon

Mapping Messaging to an AI Agent

  1. Select the edit icon next to Messaging Configuration to open the messaging editor
  2. In the Message routing section, add a rule or edit an existing one, and complete the following fields:
FieldDescription
Mapping NameNames the rule, so it can be identified in the list
URL/SMS Source MatchingPart of the web page URL where the chat widget is installed, or the DNIS number texted for SMS. A * before and/or after the value allows other characters to precede or follow it — for example, *support*
DestinationWhere matching conversations go — see Destination
  1. Move the rule up or down so it sits in the right order — see Rule Order
  2. Select Save

Once saved, the AI Agent answers every conversation that matches the rule. When a conversation needs a person, the AI Agent hands it off according to its own Transfers and escalation settings.

Destination

DestinationDescription
A skillConversations queue for agents in the selected skill
An AI AgentThe AI Agent answers the conversation. AI Agents are listed by name with an (AI) - prefix — for example, (AI) - Clinic Receptionist
A messaging flowA Messaging Flow runs first and can hand the conversation to an AI Agent with its AI Messaging Bot action
Skill DisabledConversations matching the rule are not routed
📘

AI Agents Missing From the Destination List

AI Agents built in the Agent Builder are listed as destinations in the web messaging editor starting with version 5.67. On earlier versions, set the AI Agent as the destination through URL to Skill Mappings in the Desktop Client instead — see Web Chat Configuration.


Rule Order

Rules are checked from the top down, and the first rule that matches wins. A more specific rule — such as one matching a single page — must sit above a broader one, or the broader rule answers first. Rules placed below a * rule can never be reached, and the editor marks them as unreachable.

Catch-All Rule

The last rule should be a catch-all: a rule whose URL/SMS Source Matching is exactly *, pointing to a real destination such as a skill or an AI Agent. Conversations that match no other rule follow it.

⚠️

A Catch-All Rule Is Required for AI Agents

On accounts using AI Agents built in the Agent Builder, the messaging editor does not save until the last rule is a * catch-all whose destination is a skill or an existing AI Agent — not Skill Disabled or blank. Without it, the chat widget is not published and the Chat Code Snippet stays empty.

📌

Use Case

A clinic wants its AI Agent to answer chats on the booking page and everything else to go to its front desk team:

  1. Booking Bot — *example.com/book* → (AI) - Clinic Receptionist
  2. Default — * → Front Desk skill

Installing the Chat Widget

After the routing is saved, the Chat Code Snippet in Messaging Settings holds the code that adds the chat widget to a web page. Copy it into every page the routing rules should cover. On accounts using AI Agents built in the Agent Builder, the snippet appears only after a routing configuration with a valid catch-all rule has been saved.


Troubleshooting

SymptomResolution
The AI Agent is not listed under DestinationConfirm the AI Agent is published with the Messaging channel on. On versions before 5.67, set the destination in the Desktop Client — see Destination
The messaging editor does not saveAdd a * catch-all as the last rule, pointing to a skill or an existing AI Agent — see Catch-All Rule
The Chat Code Snippet is emptySave the messaging configuration with a valid catch-all rule to generate it
Chats reach a skill instead of the AI AgentA rule above the AI Agent's rule matches first. Move the AI Agent's rule higher, or make the earlier rule more specific