Setup takes about 20 minutes. You need a Salesforce admin who has configured an with Omni-Channel routing, and admin access in OpenCX.
Before you start
Salesforce edition with Messaging for In-App and Web
Salesforce edition with Messaging for In-App and Web
Service Cloud with Messaging for In-App and Web enabled. Contact your Salesforce admin if the Embedded Service Deployments section is missing from Setup.
Embedded Service Deployment configured
Embedded Service Deployment configured
An Embedded Service Deployment must already exist in Salesforce with Omni-Channel routing configured. OpenCX connects to this deployment — it does not create one for you.
RSA key pair for JWT authentication
RSA key pair for JWT authentication
OpenCX signs identity tokens with an RSA private key. You register the matching public key in Salesforce. Generate the pair before starting setup.
Owner or admin in OpenCX
Owner or admin in OpenCX
Required to save integration settings in Settings → Integrations.
Setup
Gather your Salesforce identifiers
You need three values from Salesforce Setup:
| Identifier | Where to find it |
|---|---|
| Instance URL | Your Salesforce domain (e.g. https://yourcompany.my.salesforce.com). |
| ES Developer Name | Setup → Embedded Service Deployments → select your deployment → copy the API Name. |
| Salesforce Org ID | Setup → Company Information → Organization ID. |
Generate and register JWT keys
- Generate an RSA key pair (2048-bit or higher).
- In Salesforce, open your Embedded Service Deployment’s Auth Key settings and register the public key (PEM format).
- Note the Auth Key ID Salesforce assigns after registration — you need it in the next step.
Enter credentials in OpenCX
In your OpenCX dashboard, open Salesforce and select the MIAW tab.
Click Save.
| Field | Value |
|---|---|
| Instance URL | Your Salesforce domain (include https://). |
| ES Developer Name | The API name from your Embedded Service Deployment. |
| Salesforce Org ID | The Organization ID from Company Information. |
| Auth Public Key | The public key in PEM format (include -----BEGIN PUBLIC KEY----- headers). |
| Auth Private Key | The private key in PEM format (include -----BEGIN PRIVATE KEY----- headers). |
| Auth Key ID | The Key ID Salesforce assigned when you registered the public key. |
The private key is stored encrypted. After saving, the dashboard displays only a redacted preview — the full key is never shown again.
Verify end to end
Send a test message on a connected channel (web widget, WhatsApp, or SMS). Escalate the conversation.
- A messaging thread appears in the Salesforce console with the AI transcript.
- Reply from the Salesforce console.
- The reply lands back on the original channel within a couple of seconds.
How handoff lands in Salesforce
When triggers, OpenCX:- Generates a JWT identity token for the contact, signed with your private key.
- Obtains a messaging access token from Salesforce.
- Builds a transcript with the AI summary and conversation history.
- Extracts routing attributes from the session — channel, language, priority, and session ID.
- Creates a conversation in Salesforce with routing attributes attached.
- Sends the transcript as the opening message so your rep has full context.
- Rep replies sync back to the OpenCX session in real time.
OpenCX retries handoff up to 3 times with increasing delays if Salesforce is temporarily unreachable.
Routing attributes
OpenCX attaches these attributes to every messaging conversation. Your flow can read them for routing decisions.| Attribute | Value | Purpose |
|---|---|---|
OpencxSessionId | Session UUID | Trace back to the OpenCX session. |
Chat_Consumer_Type | Authenticated or Non-Authenticated | Differentiate identified vs anonymous contacts. |
Origin | MIABOT | Identifies conversations that came from OpenCX. |
Priority | Low (default) | Baseline routing priority. |
Chat_language | Detected language code | Route to language-specific queues. |
Additional attributes may populate from session and contact data depending on your organization’s configuration. Your Omni-Channel flow must reference the attribute names to use them for routing.
Disconnecting
In OpenCX, open the Salesforce integration, select the MIAW tab, and click Delete. Active conversations finish on their current channel; no data is deleted from Salesforce.Related Documentation
Channels
Per-channel implementation details for Widget, WhatsApp, SMS, Phone, and Email.
Email Cases
The companion path for email handoff.
Troubleshooting
Access token errors, missing conversations, routing issues.
Handoff settings
Global handoff rules and office hours.