> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce overview

> Route email cases and live conversations from OpenCX to Salesforce Service Cloud agents.

OpenCX works alongside your agents inside Salesforce Service Cloud. The AI resolves what it can, escalates what it can't, and files every handoff straight into a <Tooltip tip="A unit of work in Salesforce that tracks a single customer issue across comments, assignees, and status.">Case</Tooltip> or live messaging thread your reps already work in — no separate inbox, no context rebuild.

<Tip>
  Setup starts at [**Settings → Integrations**](https://platform.open.cx/settings/integrations) in your OpenCX dashboard.
</Tip>

## What you get

<AccordionGroup>
  <Accordion title="Cases your reps pick up with full context" icon="ticket">
    When the AI escalates an email conversation, OpenCX creates a Salesforce Case with the conversation summary as the description and the full transcript attached as comments. Rep replies on the Case sync back to the contact's inbox.
  </Accordion>

  <Accordion title="Live conversations routed to your reps in real time" icon="messages">
    Chat, SMS, WhatsApp, and phone handoffs land in the Salesforce console as <Tooltip tip="Salesforce's real-time messaging layer. Conversations appear in the console as live chats routed through Omni-Channel.">Messaging for In-App and Web</Tooltip> threads with the AI transcript attached. Your reps pick up where the AI left off.
  </Accordion>

  <Accordion title="Session data mapped to routing attributes" icon="route">
    Channel, language, priority, and session ID flow into Salesforce as <Tooltip tip="Key-value pairs attached to messaging conversations. Omni-Channel flows read these to route conversations to the right queue or agent." cta="See attributes" href="/integrations/salesforce/live-messaging#routing-attributes">routing attributes</Tooltip> so Omni-Channel routes each conversation to the right queue without manual triage.
  </Accordion>

  <Accordion title="Every answer grounded in your training data" icon="book">
    Reps see the conversation summary and the AI's reasoning to continue where the AI stopped. No guessing what the customer already tried.
  </Accordion>
</AccordionGroup>

## Supported channels

Pick the channel you want to wire through Salesforce — each page covers the implementation details for that channel on top of the shared setup.

<CardGroup cols={2}>
  <Card title="AI Chat Widget" icon="comments" href="/integrations/salesforce/channels/widget">
    Live chat handoff into the Salesforce console via Messaging.
  </Card>

  <Card title="AI WhatsApp Support" icon="whatsapp" href="/integrations/salesforce/channels/whatsapp">
    Business WhatsApp threads routed to your reps.
  </Card>

  <Card title="AI SMS Support" icon="comment-sms" href="/integrations/salesforce/channels/sms">
    Inbound SMS handed off as live messaging conversations.
  </Card>

  <Card title="AI Phone Support" icon="phone" href="/integrations/salesforce/channels/phone">
    Voice conversations with transcript attached for your reps.
  </Card>

  <Card title="AI Email Support" icon="envelope" href="/integrations/salesforce/channels/email">
    Email handoff creates a Salesforce Case with the thread attached.
  </Card>
</CardGroup>

## Observability

Every conversation OpenCX hands to Salesforce is traceable from the Salesforce side back to the exact OpenCX session. Your reps debug in the tool they're already in; your admins audit without re-running the AI.

<AccordionGroup>
  <Accordion title="Session ID on every case and conversation" icon="fingerprint">
    For email, OpenCX stores the Salesforce Case ID on the OpenCX session (`salesforce_case_id`). For live messaging, the conversation is created with the OpenCX session ID as the external identifier (`salesforce_miaw_session_id`). Both are searchable from either side.
  </Accordion>

  <Accordion title="Case and routing markers" icon="tag">
    Cases get `Case_From__c` set to `opencx` so you can filter views and reports to AI-escalated cases. Live messaging conversations carry routing attributes — `OpencxSessionId`, `Chat_Consumer_Type`, `Origin`, `Priority`, and `Chat_language` — readable in your Omni-Channel flow and analytics.
  </Accordion>

  <Accordion title="Handoff debug events in OpenCX" icon="bug">
    Every handoff logs a debug event with routing attributes and transcript data, visible in the session detail in your [OpenCX Inbox](https://platform.open.cx/inbox). Click any session to see the full AI reasoning, tool calls, and handoff context.
  </Accordion>
</AccordionGroup>

## Pick your setup path

Two paths, one for email and one for everything real-time. Most teams start with one and add the other later.

<Tabs>
  <Tab title="Email (Cases)">
    Use the Case Management path for **email**. OpenCX creates a Salesforce Case on handoff and syncs your reps' replies back to the contact's inbox.

    Credentials: an <Tooltip tip="A Salesforce configuration that defines the OAuth settings, consumer key, and consumer secret for external applications to authenticate.">External Client App</Tooltip> with OAuth 2.0 (Client ID, Client Secret, Login URL).

    <Card title="Set up Email Cases" icon="envelope" href="/integrations/salesforce/email-cases">
      Create the External Client App, connect OAuth, and configure the webhook.
    </Card>
  </Tab>

  <Tab title="Live Messaging">
    Use the <Tooltip tip="Salesforce's real-time messaging layer for web, mobile, and third-party channels. Conversations route through Omni-Channel to available agents.">Messaging for In-App and Web</Tooltip> path for every real-time channel — web chat, SMS, WhatsApp, and phone. Conversations land in the Salesforce console as live messaging threads.

    Credentials: Instance URL, <Tooltip tip="The API name of your Embedded Service Deployment in Salesforce Setup.">ES Developer Name</Tooltip>, Salesforce Org ID, and an RSA key pair for JWT authentication.

    <Card title="Set up Live Messaging" icon="messages" href="/integrations/salesforce/live-messaging">
      Register your keys and connect Messaging for In-App and Web.
    </Card>
  </Tab>
</Tabs>

<Note>
  You can enable both paths. Email handoffs create Cases; chat, SMS, WhatsApp, and phone handoffs route through live messaging.
</Note>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Email Cases" icon="envelope" href="/integrations/salesforce/email-cases">
    OAuth setup, webhook, and Apex configuration for email.
  </Card>

  <Card title="Live Messaging" icon="messages" href="/integrations/salesforce/live-messaging">
    JWT setup for chat, SMS, WhatsApp, and phone.
  </Card>

  <Card title="Human Handoff" icon="user-group" href="/handoff/introduction">
    Global handoff rules and office hours.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/salesforce/troubleshooting">
    Connection failures, missing cases, routing issues.
  </Card>
</CardGroup>
