> For the complete documentation index, see [llms.txt](https://docs-en.dydu.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-en.dydu.ai/livechat/salesforce-livechat-connector.md).

# Salesforce Livechat connector

This documentation guides you through setting up livechat escalation to Salesforce directly from your Dydu interface (BMS). It focuses exclusively on the settings required on the Dydu side to establish the connection between your chatbot and your contact center tool.

Before proceeding with the configuration, you must enable the Salesforce connector by navigating to **Preferences > Bot**. Once activated, you will find the external connector configuration interface directly within your **Livechat Settings**.

<figure><img src="/files/ZTLtaE6qJSyd7Vn1zIFN" alt=""><figcaption></figcaption></figure>

## Salesforce Connector

This first step establishes the core link between the Dydu BMS and your Salesforce environment. You must provide the following three essential pieces of information, which can be retrieved directly from your Salesforce administration interface:

* **Chat Server Address (SCRT)**: The specific URL of your Salesforce chat server required to route conversations.
* **Organization ID**: The unique identifier (ID) corresponding to your Salesforce environment.
* **Technical Configuration Name**: The developer name (or API name) of your Livechat configuration created within Salesforce.

<figure><img src="/files/nsTTwfRrKLuOWZPAEMnK" alt="" width="563"><figcaption></figcaption></figure>

## Security and Authentication

This second step secures the exchanges between the Dydu chatbot and the Salesforce servers by configuring the required cryptographic authentication elements. You will need to fill in the following fields:

* **Key ID (KID)**: The identifier of the key used to sign the exchanges.
* **Token Issuer (ISS)**: The entity responsible for issuing the authentication token.
* **Subject / Target User (SUB)**: The identity of the target user or system for which the token is issued. You must specify the corresponding context variable here.
* **Key Import**: The field used to upload your private key, which must strictly be in .PEM format.
* **Certificate Import**: The field used to upload your public certificate, which must strictly be in .CER format.
* **Key Password**: Only required if the imported PEM key is encrypted.

<figure><img src="/files/9IMMPqyjmQ4LowXs9vFl" alt="" width="563"><figcaption></figcaption></figure>

## Salesforce Connection Credentials

This third step configures the credentials needed for API authentication and queue management to route users to your agents. You must specify:

* **Client ID**: The identifier of your Salesforce connected application.
* **Client Secret**: The secret key associated with your Salesforce application.
* Queue Configuration:
  * **Queue Name**: The exact name of the queue to direct users to, as defined in your Salesforce environment.
  * **Maximum Queue Capacity**: The maximum number of users allowed to wait in this queue simultaneously.

<figure><img src="/files/sCbFXBoZmwbqu2C3UJn5" alt="" width="563"><figcaption></figcaption></figure>

## Context Variables to Salesforce Tokens

This final step is optional but highly useful. It allows you to map context variables from the bot conversation to tokens (JWT claims) to manipulate them or pass them to Salesforce if needed.

The interface consists of an interactive table where you can add as many rows as necessary. For each new entry, configure:

* **Variable Name (JWT Claim)**: The name of the data you want to include in the token.
* **Pass to Agent (transmittorouting)**: An option to determine whether this variable should be sent to the Salesforce agent. Since these variables are often used on the Dydu side purely for statistics, you can choose to hide them from the agent during escalation.

**Variable Management**: Once a variable is added to the table, you retain full control over it and can modify or delete it at any time.

<figure><img src="/files/QLJnZ5pg0yCUTYcdgDx1" alt="" width="563"><figcaption></figcaption></figure>
