Skip to content

Salesforce MIAW

Version badge

Salesforce MIAW

Description

The Salesforce MIAW handover connector bridges Cognigy.AI and Salesforce Messaging for In-App and Web, enabling end users to connect with human agents working in a contact center that uses Salesforce.

Prerequisites

Configuration on the Handover Provider Side

1. Configure Omni-Channel Settings
  1. Log in to Salesforce.
  2. On the Salesforce home page, select Setup in the upper-right corner, then select Setup from the menu.
  3. In the Quick Find box, enter Omni-Channel Settings and follow the Feature Settings > Service > Omni-Channel path.
  4. On the Omni-Channel Settings page, ensure that the Enable Omni-Channel setting is activated.
  5. In the Quick Find box, enter Service Channels and follow the Feature Settings > Service > Omni-Channel path.
  6. Create a channel by clicking New. Fill in the following fields:
    • Service Channel Name – enter the name of your channel, for example, Messaging.
    • Developer Name – the developer name will be generated automatically as soon as you enter the service channel name. Change the developer name if needed.
    • Salesforce Object – select Messaging Session. In case the Messaging Session is not available for you, select Case.
2. Create a Queue
  1. In the Quick Find box, enter Queues and follow the Users > Queues path.
  2. Create a new queue by clicking New. Fill in the following fields:
    • Label – enter the name of your channel, for example, Messaging.
    • Queue Name – the queue name will be generated automatically as soon as you enter the channel name. Change the queue name if needed.
  3. In the Supported Objects section, add the following options:
    • Messaging User
    • Messaging Session
    • Chat Session
    • Case (if you selected Case as a Salesforce object in the Service Channels settings)
  4. In the Queue Members section, add the human agents you want to include in the queue. Save Changes.
3. Create a Flow
  1. In the Quick Find box, enter Flows, and select Flows.
  2. To create a new flow, click New and select Omni-Channel Flow.
  3. On the Manager tab, create a New Resource.
    1. From the Resource Type list, select Variable.
    2. In the API Name field, enter recordId.
    3. From the Data Type list, select Text.
    4. Activate Available for Input, then click Done.
  4. In the Flow editor, click + to add an element. Select Route Work from the list.
  5. In the Label field, specify Custom Action. The value in the API Name field will be generated automatically.
  6. In the Set Input Values section, configure the following fields:
    • Record ID Variable — select recordId.
    • Service Channel — select the service channel that you created previously.
    • Route To — select Queue.
    • Queue ID — select the ID related to your queue that you created previously.
  7. Click Save. Fill it the following fields:
    • Flow Label — enter the name of your flow.
    • Flow API Name — the flow API name will be generated automatically. Change flow API name if needed.
  8. Click Activate, then Publish. At this stage, you will route your flow via the queue. You can also configure routing for a specific agent, bot, or skill. For more details, refer to the Salesforce documentation.
4. Create a Messaging Channel
  1. In the Quick Find box, enter Messaging Settings and follow the Feature Settings > Service > Messaging path.
  2. On the Messaging Settings page, click New Channel. Select Messaging for In-App and Web. Fill in the following fields:
    • Channel Name — enter the name of your messaging channel.
    • Developer Name — the developer name will be created automatically.
  3. In the Omni-Channel Routing section, configure the following fields:
    • Routing Type — select Omni-Flow.
    • Flow Definition — enter the Flow name that you created.
    • Fallback Queue — enter the queue name that you created. Save the changes.
  4. Ensure that your channel is active. On the Messaging Settings page, check if the channel is marked as Active in the Active column. If not, select your channel and click Activate in the upper-right corner.
5. Create an Embedded Service
  1. In the Quick Find box, enter Embedded Service Deployments and follow the Feature Settings > Service > Messaging path.
  2. On the Embedded Service Deployments page, click New Deployment.
  3. Select the Messaging for In-App and Web type, then Custom Client. Fill in the following fields:
    • Embedded Service Deployment Name — enter the name of your deployment.
    • API Name — the API name will be created automatically. Change API name if needed.
  4. From the Messaging Channel list, select the channel you created previously. Save changes.
  5. Go to Code Snippet. Copy the *OrganizationId,DeveloperName, andUrl` values for later use in Cognigy.AI.
  6. Click Done. Check whether your deployment is active and publish it. The deployment will take about 10 minutes. Afterward, you can go to Cognigy.AI to configure the handover settings.

Configuration on the Cognigy.AI Side

1. Create a Handover Connector (Beta)

Note

This feature is in Beta. We encourage you to try it out and provide us with feedback.

  1. Go to Build > Handover Providers and click + New Handover Provider.
  2. In the New Handover Provider window, select Salesforce MIAW from the list and name the connector.
  3. (Optional) Activate the Forward Events to the Flow setting. This setting forwards any event to the Flow, which can be handled in the Lookup Node. Select the Handover Status type in the Lookup Node. In the Case Node, select Events from the Handover Status list. Agent Replies and Conversation Closed events are not forwarded.
  4. Fill in the following fields:
Field Description
Base URL The URL of your configured service in Salesforce, copied from Url.
Organization ID The unique identifier of your organization in Salesforce, copied from OrganizationId.
Embedded Service Developer Name The ID of your deployment in Salesforce, copied from DeveloperName.
Capabilities Version The API version is 1.
2. Add a Handover to Agent Node

In the Salesforce Settings section of the Handover to Agent Node, configure the following settings:

  • Send Transcript as a first message — the setting allows Salesforce to receive the conversation transcript as a first message. This setting is turned off by default.
  • Conversation Routing Attributes — the setting supports key-value pairs which allow you to specify information that can be used in the Omni-Channel flow in Salesforce.

Test your Flow to ensure it works as expected. You can use Demo Webchat to send messages to the Salesforce contact center.
On the Salesforce side, go to the Service Console. In the Service Console, open Messaging Sessions, and make sure that your human agent is online.

Additional Configuration

AI Copilot Workspace

Within the Salesforce MIAW integration, you can use the AI Copilot workspace as an assistant to your human agents.

Salesforce MIAW supports the AI Copilot workspace only as a standalone application:

Standalone

AI Copilot will be available via the following link: https://${AICopilotBaseUrl}/?userId=${userId}&sessionId=${sessionId}&URLToken=${URLToken}

Where:

  • AICopilotBaseUrl — the base URL of AI Copilot. It represents the main web address where the AI Copilot service is hosted.
  • sessionId — the Cognigy Session ID. A session is a period of interaction or communication between the human agent and the AI Copilot Workspace.
  • userId — the Cognigy User ID. It helps AI Copilot associate the interaction with a specific user, allowing for tracking user-specific information.
  • URLToken — the Endpoint token on the Cognigy side. To find this token, navigate to the Endpoint linked with AI Copilot. In the Config URL field, copy the token found after https://endpoint-trial.cognigy.ai. For example, in the URL https://endpoint-trial.cognigy.ai/f38791ae20d4961acf0e97d9f377c4fe3df92894e1eff1c7a774a8ed089a4590, the token would be f38791ae20d4961acf0e97d9f377c4fe3df92894e1eff1c7a774a8ed089a4590. Note that only authorized users can access or interact with the AI Copilot system through this URL.

For example:

https://ai-copilot-trial.cognigy.ai/?sessionId=session-17738489-e767-4d47-b669-cb0dd2e899e0&userId=52476cc5-710c-40db-8108-e99109f45d91&URLToken=a4d5c86c98f27730311591f28d194510e05ffed30ca148e3344970defd418e7d

More Information