Salesforce Service Cloud¶
Description¶
Warning
Salesforce announced the removal date for LiveAgent, Salesforce Chat, Embedded Chat, and Service Chat. The removal date is February 14, 2026. This handover provider connector will remain active until the removal date. Before this date, migrate to a new connector for the Salesforce provider that supports Messaging for In-App and Web. If you configured the embedded Agent Copilot workspace, make sure that you update its configuration during the migration.
The Salesforce handover connector bridges Cognigy.AI and Salesforce Service Cloud, enabling end users to connect with human agents working in a contact center that uses Salesforce Service Cloud.
Prerequisites¶
- Access to Salesforce Service Cloud.
- Created Endpoint compatible with Salesforce.
Configuration on the Handover Provider Side¶
Configure Salesforce Service Cloud
- Log in to Salesforce.
- If no chat deployment is available in Salesforce, using the following guides:
- On the Salesforce home page, navigate to Feature Settings > Service > Chat > Chat Settings. On the Chat Settings page, go to the API Information > Chat API Endpoint. Copy the Chat API Endpoint value without the
/chat/rest
part, for examplehttps://x.xxx-xx-xxx.salesforceliveagent.com
. Save it for future use. - Navigate to Feature Settings > Service > Embedded Service > Embedded Service Deployments. In the raw with the deployment you want to use, click
, then select View.
-
deploymentId
buttonId
organizationId
In the Embedded Service Code Snippets section, click Get Code. Copy and save the values from the following parameters without the single quotes
''
:embedded_svc.init( 'https://...', 'https://...', gslbBaseURL, '<your-organization-id>', // Copy the Organization ID '...', { baseLiveAgentContentURL: '...', deploymentId: '<your-deployment-id>', // Copy the Deployment ID buttonId: '<your-button-id>', // Copy the Button ID } );
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.
- Go to Build > Handover Providers and click + New Handover Provider.
- In the New Handover Provider window, select Salesforce from the list and name the connector.
- (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.
- Fill in the following fields:
Field | Description |
---|---|
Live Agent Base URL | The URL, copied from the Chat API Endpoint field. |
API Version | The API version is 52 . |
Organization ID | The unique identifier for your Salesforce organization, copied from organizationId . |
Deployment ID | The ID of your deployment in Salesforce, copied from deploymentId . |
Button ID | The ID of the button for the related deployment in Salesforce, copied form buttonId . |
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 first message — the setting allows Salesforce to receive the conversation transcript as the first message. This setting is turned off by default.
- Button ID — the ID of the Button you created in the Salesforce installation. This setting will override the default Button ID that you specified in the Endpoint configuration. You can use different Button IDs for individual Handover to Agent Nodes.
- Pre-chat Entities and Details — the additional context sent in a custom JSON structure, providing the information before engaging with the human agent.
2.1 Configure Pre-Chat Entities and Details
By default, Cognigy.AI doesn't send a conversation transcript from the chat with the AI Agent to the chat with the human agent. If you activate the Send Transcript as a first message setting, Cognigy.AI sends the conversation transcript to the chat with the human agent as the first message. The conversation transcript includes the entire chat between the user and the AI Agent.
The conversation transcript is displayed when the human agent receives the first message from the user and can be found in the Salesforce Service Console, under the Transcripts tab, in the Transcript > Details > Transcript > Body section.
Moreover, Cognigy.AI allows users to send Pre-chat Details and Pre-chat Entities arrays as a custom JSON structure. This feature allows users to include additional context or relevant information before initiating the chat with the human agent. This information can then be used for further processing or personalizing the conversation based on the provided details.
Pre-Chat Entities
Cognigy.AI allows the creation of fields and linking User details obtained through Pre-Chat Details to Salesforce Entities like Contact or Case.
To do this, you must send the Pre-Chat Entities array to the live chat session on Salesforce.
The JSON example shows how to connect the conversation to a Case and use Pre-Chat Details:
[
{
"entityName":"Contact",
"saveToTranscript": "Contact",
"linkToEntityName":"Case",
"linkToEntityField":"ContactId",
"showOnCreate":true,
"entityFieldsMaps":[
{
"fieldName":"LastName",
"label":"LastName",
"doFind":true,
"isExactMatch":true,
"doCreate":true
},
{
"fieldName":"FirstName",
"label":"FirstName",
"doFind":true,
"isExactMatch":true,
"doCreate":true
},
{
"fieldName":"Email",
"label":"Email",
"doFind":true,
"isExactMatch":true,
"doCreate":true
}
]
}
]
Pre-Chat Details
Cognigy.AI allows sending conversation information to Salesforce Live Agent using Pre-chat Details.
By using the entityMaps field, this information can be mapped to specific Pre-Chat Entity fields.
CognigyScript can fetch values from Cognigy input, profile, and context objects before sending the data.
[
{
"label":"LastName",
"value":"Mustermann",
"entityMaps":[
{
"entityName":"contact",
"fieldName":"LastName"
}
],
"transcriptFields":[
"LastName__c"
],
"displayToAgent":true
},
{
"label":"FirstName",
"value":"Max",
"entityMaps":[
{
"entityName":"contact",
"fieldName":"FirstName"
}
],
"transcriptFields":[
"FirstName__c"
],
"displayToAgent":true
},
{
"label":"Email",
"value":"max.mustermann@mail.de",
"entityMaps":[
{
"entityName":"contact",
"fieldName":"Email"
}
],
"transcriptFields":[
"Email__c"
],
"displayToAgent":true
}
]
For more information about the Pre-Chat Entities and Pre-Chat Details fields and their usage, read the Salesforce API documentation.
To check the handover, go to the installation that your server administrator has deployed.
Additional Configuration¶
Agent Copilot Workspace
To integrate Agent Copilot directly into Salesforce Service Cloud, refer to the Salesforce Integrations documentation on GitHub.