---
schema_version: "1"
id: 6be65548694f5fba4d58a0291c1c3bf7e21260437201deee5226a61ecc47dd7b
title: Connect a Service Agent to Enhanced Chat v2 in the Legacy Builder
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/service_agent_deploy_enhanced_chat_v2_route_legacy.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.service_agent_deploy_enhanced_chat_v2_route_legacy.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b4235dc702e139b613b248075e6457d7bf0c459f905b3f4281f8838c7e3bf12c
description: To connect an agent to Enhanced Chat v2 in the legacy Agentforce Builder, set up the Enhanced Chat v2 connection. Route messages to a Service agent directly or with an inbound Omni-Channel flow.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Connect a Service Agent to Enhanced Chat v2 in the Legacy Builder

To connect an agent to Enhanced Chat v2 in the legacy Agentforce Builder, set up the Enhanced Chat v2 connection. Route messages to a Service agent directly or with an inbound Omni-Channel flow.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and
              <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required
                add-on licenses vary by agent type.</a>
            </td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p><span style="vertical-align:text-bottom;display:inline-block;"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/resources-global/_corporate/images/checkmark.png" alt="Check mark"></span>This article applies to: Agentforce Service agents and Agentforce Employee
                agents</p>
              <p style="margin-bottom:0;">To learn about channel support for other agent types, see the documentation for
                that type.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="text-align:center;vertical-align:top;" id="d89551e95">User Permissions Needed</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d89551e98">&nbsp;</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d89551e95 ">To build and manage Service Agents:</td>

            <td data-label="" class="slds-cell-wrap" style="vertical-align:top;" headers="d89551e98 ">
              <p>Manage Agentforce Service Agents AND Manage AI Agents</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application</p>
            </td>

          </tr>
        </tbody>
      </table>

![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_warning.png)

Warning Make sure that the routing procedures don’t simultaneously route conversations to a service rep and an AI agent. For more information, see [_Knowledge Article_: Messaging Session Stuck in Waiting or Inactive Status When a Bot and an Agent Are Engaged](https://www.google.com/url?q=https://help.salesforce.com/s/articleView?id%3D004518025%26type%3D1%26language%3Den_US&sa=D&source=docs&ust=1741369183913264&usg=AOvVaw2NlhM_DYxhX715qEmS7vCn&language=en_US).

1. [Add the Enhanced Chat v2 connection](https://help.salesforce.com/s/articleView?id=ai.agent_response_enable.htm&release=264.0.0&type=5 "To get started with deploying your agent to channels, set up connections. Each connection includes behind-the-scenes instructions that help an agent reason and respond for one or more channels. Each connection contains adaptive response formats that help your agent structure responses and deliver multimedia content, such as images, buttons, links, and videos. You can find adaptive response formats and other settings, including the Omni-Channel flows that route conversations to and from an agent, in your connection settings.") to your agent.
2. To route messages directly to your agent, [create an Enhanced Chat channel](https://help.salesforce.com/s/articleView?id=service.miaw_quick_start.htm&language=en_US). In the Channel Routing window, enter these field values.
    
    - Routing Type: Agentforce Service Agent
    - Agentforce Service Agent: Select your agent's name. If your agent name doesn't appear, activate your agent, and try again.
    - Fallback Queue: Select a messaging queue to route to if no agent is available.
3. To route messages to your agent with an Omni-Channel flow, [create an inbound Omni-Channel flow](https://help.salesforce.com/s/articleView?id=service.omnichannel_create_a_flow.htm&language=en_US) from scratch.
    1. For the Route Work action in your inbound Omni-Channel flow, enter these field values.
        
        - Record ID: The record ID variable that you created to store values in your Omni-Channel flow.
        - Service Channel: Messaging
        - Route To: Select the Agentforce Service Agent type, and then select your agent's name. If your agent type and name don’t appear, activate your agent, refresh Flow Builder, and try again.
        - A messaging queue. When your inbound Omni-Channel flow can't route conversations to your agent, it sends the conversation to this queue. Select a messaging queue that supports the Messaging Session object.
    2. [Create an Enhanced Chat channel](https://help.salesforce.com/s/articleView?id=service.miaw_quick_start.htm&language=en_US). Add your inbound flow to the channel and then activate the channel.
        
        You can connect your agent to multiple inbound channels, but you can connect an inbound channel to only one agent.
    3. Open your agent in the legacy builder. On the Connections panel, confirm that your inbound Omni-Channel flow appears in the Inbound Routing section of the Enhanced Chat v2 connection. If a flow doesn’t appear, activate the flow and refresh the builder.
4. On the Embedded Service Deployment Settings page for your channel's deployment, click **Publish**.
5. To preview and verify your branding and configurations, on the Embedded Service Deployments Settings page, click **Test Enhanced Web Chat**.
6. Set up [outbound routing](https://help.salesforce.com/s/articleView?id=ai.service_agent_escalation.htm&language=en_US) for your agent. Agents connected to Enhanced Chat v2 use the Escalation subagent and an outbound Omni-Channel flow to transfer conversations.
7. Add the Enhanced Chat v2 to your [external web site](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm&language=en_US) or to your [Salesforce site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm&language=en_US).