> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Web Messaging Configuration (New Chat)

This document provides instructions on connecting your messaging channel to a website with a new embedded deployment on the Salesforce Omni-Channel Service Cloud with Agent AI.

## Prerequisites

* Developer or a Production Salesforce org
* Basic knowledge of Salesforce terminology
* Agent AI configured in your Salesforce app

## Steps to Configure Agent AI in Salesforce

1. Sign in to **Salesforce**.

2. Select **App Launcher**.

3. Type **config** in the **search bar**, and select **Kore Agent AI Configuration** from the displayed list.

4. Select **New** from the top-right corner of the page.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/kore-agentai-configuration.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=b286c4a368c329bcc4e1c5fc77dde1d2" alt="kore-agentai-configuration" width="1088" height="1780" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/kore-agentai-configuration.png" />

5. Enter the required values in the **Agent AI URL**, **Bot ID**, **Client ID,** **Client Secret**, and **Language (bot language)** fields. To get these values:
   1. Sign in to Platform.
   2. Go to **Agent AI** > **Flows & Channels** > **Digital**.
   3. Select **Web/Mobile Client** and expand the **JWT App Details** section.
   4. Select **copy** next to the required fields.
      <img src="https://mintcdn.com/koreai/ugVMrxbjksuX9sjq/ai-for-service/agentai/integration/salesforce-omni-channel/images/jwt-app-details-section.png?fit=max&auto=format&n=ugVMrxbjksuX9sjq&q=85&s=7b02d63a29b70f03c5b4c0e807a80f59" alt="jwt-app-details-section" width="675" height="877" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/jwt-app-details-section.png" />

6. Select **Include Einstein Bot and User Messages in Agent AI Context** to share Salesforce Einstein Bot-user conversation data with Agent AI as custom data.

   Since the Einstein Bot runs natively on Salesforce, Agent AI doesn't automatically have access to the prior bot conversation. When you select this option, the system passes the bot-user conversation history to the Agent AI widget, allowing it to maintain context and perform accurate intent recognition. The system sends the conversation messages under the `userBotMessages` key. Salesforce stores all forms completed during the Einstein Bot interaction as key-value pairs and retrieves and includes in the custom data. For information on controlling which conversation attributes to share, see [Selecting conversation metadata](/ai-for-service/agentai/configuration/linked-services#conversation-metadata).

7. Click **Save**.

## Enable Omni-Channel

1. Sign in to your organization.
2. Go to **Salesforce Service Setup**.
3. In the **quick find** box, search **Omni-Channel Settings**.
4. Select **Enable Omni-Channel**, and click **Save**.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/enable-omnichannel-and-save.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=c8b251e648d05aaebe6585e0587dd7a2" alt="enable-omnichannel-and-save" width="1008" height="728" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/enable-omnichannel-and-save.png" />

## Configure a Messaging Channel for Web Deployment

1. Sign in to your organization-if you are in **Salesforce Classic**, switch to **Lightning Experience**.
2. Follow [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm\&type=5) to configure your Embedded Service Deployment.

## Add the Omni-Channel Utility to your Lightning Application

1. Go to **Lightning Experience** > **Setup**.
2. Enter **App** in the **quick find** box.
3. Select **App Manager**.
4. Click the **dropdown list** next to the console app that you want to add Omni-Channel to (for example, Service Console), and click **Edit**.
5. Click **Utility Bar** > **Add**.
6. Click **Omni-Channel**.
7. Click **Save**.
8. Click **Done**.

## Enable Service Presence Status Access

1. Enter **Profile** in the **quick find** box, and then select **Profiles**.
2. Select **System Administrator**.
3. Edit **Enable Service Presence Status Access**, and assign **Presence Status Available** - **Chat**, **On Break**, and **Busy**.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/presence-status-available.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=95b3b60a548f6459094fe5e13a94c176" alt="presence-status-available" width="1338" height="598" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/presence-status-available.png" />

**Assign Permission Set License Agreement**

Users must have the following Permissions Set License Agreement to handle incoming chat request as an agent:

1. Go to **Setup** > **Users**, and click **Users**.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/setup-users.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=4732133ac2337e86d79f1c382a6e16c1" alt="setup-users" width="1845" height="754" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/setup-users.png" />
2. Click a user name, and it opens up the **User Details** page.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/user-details-page.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=40ec1672ad27233aa99e0a336f2a91be" alt="user-details-page" width="1566" height="860" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/user-details-page.png" />
3. Scroll down to the **Permission Set License Assignments** section, click **Edit Assignments**, and search for **Messaging User** and **Messaging for In-App and Web User**.
4. Enable these two, and click **Save**.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/permission-set-license-assignments.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=88d3eabe64f1e089ec0514709b65a955" alt="permission-set-license-assignments" width="1558" height="238" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/permission-set-license-assignments.png" />

## Configuring the App

1. Select **App Launcher**.

2. Click the **tile** for the app that you want (**Service Console**, in this case).
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/app-tile.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=75395ab913ec5aa5c056130e9fcbe3ee" alt="app-tile" width="1351" height="585" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/app-tile.png" />

3. Click the **Omni-Channel** widget to set the agent online.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/omni-channel-widget-online.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=dbb0cc76247d4feab8b58949e57e53e5" alt="omni-channel-widget-online" width="1342" height="613" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/omni-channel-widget-online.png" />

## Testing the Chat

1. Go to **Service Console**, open the **Omni-Channel** widget, and set **Presence Status** to **Available - Chat**.
   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/presence-status-available-chat.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=100a079886368009bc3760abd8d1fb08" alt="presence-status-available-chat" width="1847" height="918" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/presence-status-available-chat.png" />

2. Open the **chat** from the **Chat Client**:
   1. Go to **Setup**, and type **Embedded** in the **quick find** box.

   2. Select **Embedded Service Deployments**.

   3. Click the **dropdown** list, and select **View**.
      <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/embedded-service-deployments-view.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=c4cac75a26e8ed9f6c204a1657133715" alt="embedded-service-deployments-view" width="1561" height="737" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/embedded-service-deployments-view.png" />

   4. Click **Test Messaging** from the **Embedded Service Deployment Settings**.

      <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/test-messaging.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=7d6ac43ab16333a773c84a44d9e44699" alt="test-messaging" width="1628" height="898" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/test-messaging.png" />

      1. It opens up a **Visualforce** page, and the bottom-right side of the page shows a chat popup button.

      2. Click this **chat popup** button, and it expands and opens up a chat window, where you as a user can initiate a conversation. (If you get any error message on the browser console, see the [Troubleshooting steps](#troubleshooting-with-setup).)
         <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/chat-window.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=a0ab2dd47aa9856d3a11e99b3a87291d" alt="chat-window" width="1820" height="939" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/chat-window.png" />

      3. Accept the chat in the **Salesforce Omni-Channel** inside the service console. Initially, it comes under the **New** tab.
         <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/accept-chat-new-tab.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=92e0c047d1d1ef0eb23b5fcad1ea69a9" alt="accept-chat-new-tab" width="343" height="483" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/accept-chat-new-tab.png" />

      4. When you accept a work item, it moves to the **My work** tab, and you can start a conversation with the customer. The Agent AI widget automatically generates a conversation summary when the Einstein Bot hands off a customer interaction to a live agent.
         <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/my-work-tab.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=ef56744c0780dc549fbf6acad9fbaa53" alt="my-work-tab" width="1416" height="952" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/my-work-tab.png" />

3. Start the conversation.

   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/start-conversation.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=f112062053ce3f5510ab8f0796254a07" alt="start-conversation" width="1190" height="811" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/start-conversation.png" />

   <img src="https://mintcdn.com/koreai/ebWLPXNtu13b1ba-/ai-for-service/agentai/integration/salesforce-omni-channel/images/chat-conversation.png?fit=max&auto=format&n=ebWLPXNtu13b1ba-&q=85&s=657ec315acd100bef0a86dd01286e422" alt="chat-conversation" width="344" height="558" data-path="ai-for-service/agentai/integration/salesforce-omni-channel/images/chat-conversation.png" />

## Troubleshooting with Setup

To troubleshoot common issues encountered during this configuration for the first time, follow the
[Troubleshoot Enhanced Chat Setup](https://help.salesforce.com/s/articleView?id=service.miaw_troubleshoot.htm\&type=5) document.

***
