Skip to content

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.
    kore-agentai-configuration

  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 AI for Service.
    2. Go to Agent AI > Flows & Channels > Digital.
    3. Select Web/Mobile Client and expand the JWT App Details section.
    4. Select the copy buttons against the required fields.
      jwt-app-details-section
  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 does not automatically have access to the prior bot conversation. When this option is enabled, the bot–user conversation history is passed to the Agent AI widget, allowing it to maintain context and perform accurate intent recognition. The conversation messages are sent under the userBotMessages key. Any forms completed during the Einstein Bot interaction are stored in Salesforce as key–value pairs and are retrieved and included in the custom data. To control which conversation attributes are shared, see Selecting 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.
    enable-omnichannel-and-save

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 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 AvailableChat, On Break, and Busy.
    presence-status-available

Assign Permission Set License Agreement

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

  1. Go to Setup > Users, and click Users. setup-users
  2. Click a user name, and it opens up the User Details page.
    user-details-page
  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.
    permission-set-license-assignments

Configuring the App

  1. Select App Launcher.
  2. Click the tile for the app that you want (Service Console, in this case).
    app-tile

  3. Click the Omni-Channel widget to set the agent online.
    omni-channel-widget-online-7.png

Testing the Chat

  1. Go to Service Console, open the Omni-Channel widget, and set Presence Status to Available – Chat.
    presence-status-available-chat

  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.
      embedded-service-deployments-view

    4. Click Test Messaging from the Embedded Service Deployment Settings.
      test-messaging

      1. It opens up a Visualforce page, and the bottom-right side of the page shows a chat popup button:
        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).
        chat-window

      3. Accept the chat in the Salesforce Omni-Channel inside the service console. Initially, it comes under the New tab.
        accept-chat-new-tab

      4. Once you accept the work item, it comes under the My work tab. Now, you can start a conversation with a customer. It pops up a new Messaging Sessions page for every new conversation.
        my-work-tab

  3. Start the conversation.
    start-conversation

    chat-conversation

Troubleshooting with Setup

To troubleshoot common issues encountered during this configuration for the first time, follow the Troubleshoot Enhanced Chat Setup document.