> ## 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.

# AI WhatsApp Support in Salesforce

> Route WhatsApp Business conversations from OpenCX into the Salesforce console as live messaging threads.

WhatsApp conversations route through <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>. When the AI hands off a WhatsApp thread, your rep picks it up as a live messaging thread in the Salesforce console and replies on the same number the customer wrote in on.

## Pre-requisites

<Warning>
  **Connect your WhatsApp Business number first.** No WhatsApp messages can reach OpenCX until the channel is live — start with [Connect WhatsApp](/whatsapp/connect-whatsapp) and come back here.
</Warning>

* **WhatsApp Business number connected** — see [Connect WhatsApp](/whatsapp/connect-whatsapp).
* **Salesforce Live Messaging credentials saved** — see [Live Messaging setup](/integrations/salesforce/live-messaging).

## How conversations land in Salesforce

```mermaid theme={"dark"}
flowchart LR
  A[Customer messages your WhatsApp number] --> B[AI replies on WhatsApp]
  B --> C{AI can resolve?}
  C -- Yes --> D[Conversation closes]
  C -- No --> E[Handoff via Live Messaging]
  E --> F[Messaging thread in Salesforce]
  F --> G[Rep replies — lands on WhatsApp]
```

## Setting up

<Steps>
  <Step title="Confirm WhatsApp is connected">
    Open [**Channels → WhatsApp**](https://platform.open.cx/channels/whatsapp) in the OpenCX dashboard. Your WhatsApp Business number should be listed and active.
  </Step>

  <Step title="Confirm Live Messaging is connected">
    In [**Settings → Integrations**](https://platform.open.cx/settings/integrations), open **Salesforce → MIAW**. All six fields should be filled and saved.
  </Step>

  <Step title="Trigger a test handoff">
    Send a WhatsApp message to your connected number and ask to speak to a human. The AI should hand off.
  </Step>

  <Step title="Verify in the Salesforce console">
    The conversation should appear as a **messaging thread** with the full AI transcript. Reply from Salesforce and confirm the response lands on the customer's WhatsApp.
  </Step>
</Steps>

## What the rep sees

* A **messaging thread in the Salesforce console** routed through Omni-Channel.
* The contact's WhatsApp profile (name, phone number) in the conversation.
* Full transcript of the AI-to-customer exchange so far.
* `OpencxSessionId` routing attribute — the trace key to the full OpenCX session.
* Replies land on the customer's WhatsApp within a couple of seconds.

## Channel-specific details

<AccordionGroup>
  <Accordion title="24-hour messaging window" icon="clock">
    WhatsApp's policy lets reps send free-form messages within 24 hours of the customer's last message. Outside that window, replies must use an approved <Tooltip tip="Pre-approved message formats WhatsApp requires for outbound messages sent after the 24-hour customer service window has closed.">message template</Tooltip>. Your rep will need to use templates from the WhatsApp side if the window has closed.
  </Accordion>

  <Accordion title="Contact matching by phone number" icon="phone">
    OpenCX matches contacts primarily on phone number. If the customer has previously shared an email, that link is preserved. No duplicate contact records.
  </Accordion>

  <Accordion title="Media messages" icon="image">
    Images, audio, and documents the customer sends on WhatsApp appear as attachments on the messaging thread in the Salesforce console. Size limits follow WhatsApp's per-media-type limits.
  </Accordion>

  <Accordion title="Proactive outbound" icon="paper-plane">
    Sending a WhatsApp template-message campaign from OpenCX is independent of the Salesforce integration — see the [WhatsApp channel docs](/whatsapp/introduction). Replies to a template land as a messaging thread in the Salesforce console once the customer engages.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI WhatsApp Support" icon="whatsapp" href="/whatsapp/introduction">
    The channel itself — connect, messaging rules, templates.
  </Card>

  <Card title="Live Messaging setup" icon="plug" href="/integrations/salesforce/live-messaging">
    JWT credentials, routing attributes, and connection.
  </Card>

  <Card title="Salesforce overview" icon="cloud" href="/integrations/salesforce/overview">
    What Salesforce lights up across every channel.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/salesforce/troubleshooting">
    Conversations not appearing, replies not reaching WhatsApp.
  </Card>
</CardGroup>
