If your support team works in Salesforce Service Cloud, Rep AI can hand shoppers to your agents right inside the Rep AI chat. When the AI can't help, or the shopper asks for a person, Rep AI opens a live chat in your agents' Service Console. Your agents chat with the shopper in real time, and when they end the chat the AI takes over again.
You can also use Salesforce Cases: Rep AI opens a Case, and your agents reply on the Case. With Cases, the AI can also answer your support emails.
Time: about 15 minutes if your team already uses Salesforce live chat, and about an hour for an org that has never set up live chat. Most steps happen in Salesforce and need a Salesforce administrator. If you're not one, share this article with whoever manages your Salesforce. We've marked every step that needs them.
Choose how Rep AI hands off
| Live chat (recommended) | Cases | |
|---|---|---|
| What the shopper gets | A live conversation with your agent, inside the Rep AI chat | A reply from your agent in the Rep AI chat, sent from a Case |
| Where your agents work | Service Console, through Omni-Channel | The Case record |
| What your org needs | Salesforce live chat (Enhanced Chat), see below | Enterprise, Unlimited or Developer Edition, and the Rep AI app |
| App install or Salesforce login | Not needed | Needed |
You can start with live chat and add Cases later. With both set up, Rep AI opens a Case whenever a live chat can't start, and you can switch every handoff to Cases at any time.
What your Salesforce org needs for live chat
- Salesforce Enhanced Chat (also called Messaging for In-App and Web). For production orgs it comes with the Digital Engagement add-on. Developer Edition orgs include it.
- Omni-Channel, which delivers chats to your agents.
- Agents set up for Service Cloud: each agent needs the Service Cloud User setting and access to Messaging (details in step 1.2).
- A Salesforce administrator for the setup steps.
A few Salesforce words, in plain English
- Messaging channel — where live chats arrive in Salesforce. It decides which queue a chat goes to.
- Custom Client deployment — the connection Rep AI uses to open chats on your messaging channel. You create it once and paste three of its values into Rep AI.
- Pre-Chat fields — the details a chat carries when it starts, such as the shopper's name, email and topic. Salesforce only accepts the fields you list on the deployment.
- Omni-Channel Flow — a small Salesforce automation that runs on every new chat and picks the queue.
- Queue — a shared inbox for chats or Cases, so the right team picks them up.
- Case — a support ticket in Salesforce.
Part 1 — Set up live chat in Salesforce (Salesforce admin)
Already using Salesforce live chat (Enhanced Chat) with Omni-Channel? Skip to step 1.6. You only need a new Custom Client deployment on your existing channel.
Work through the steps in order. Salesforce asks for things in a fixed order, and most steps fail silently when skipped: nothing shows an error, but chats never reach an agent or land in the wrong queue.
1.1 — Turn on Omni-Channel and Messaging
- Setup → Omni-Channel Settings → check Enable Omni-Channel → Save.
- On the same page, set agent login to Automatically log agents in to Omni-Channel in the new window or tab. With the other option, Omni-Channel can show "Online" while it isn't sending chats.
- Setup → Messaging Settings → switch Messaging on.
1.2 — Set up your agents
For each agent (Setup → Users → the user → Edit):
- Check Service Cloud User. Without it, Omni-Channel never offers chats to that agent.
- Make sure the Messaging for In-App and Web User permission set license is assigned. Some orgs call it Enhanced Chat User.
Then make a status your agents can use to go online:
- Setup → Presence Statuses → New: for example "Available - Chat", status Online, and add the Messaging service channel.
- Setup → Profiles → your agents' profile → Enabled Service Presence Status Access → add the new status. This isn't granted by default, even to admins. Without it, agents can only choose "Offline".
Finally, Setup → App Manager → Service Console → Edit:
- Under Utility Items, add Omni-Channel.
- Under Navigation Items, add Messaging Sessions. Without it, Omni-Channel refuses to log agents in.
1.3 — Create queues
- Setup → Routing Configurations → New. Give it a name, a priority of 1, and the Least Active routing model.
- Setup → Queues → New, one per team (for example Sales and Support). For each queue, pick the routing configuration, add Messaging Session as a supported object, and add the team's agents as members.
1.4 — Create a routing flow
Setup → Flows → New Flow → Omni-Channel Flow:
- Add a Text variable named
recordId, marked Available for input. - Add a Route Work step: Record ID
recordId, service channel Messaging, route to your main queue. - Save and Activate. An inactive flow routes nothing.
You can add routing by topic later (Part 4).
1.5 — Create a messaging channel
Setup → Messaging Settings → New Channel → Enhanced Chat:
- Give it a name.
- For Deployment Type, choose Mobile, not Web. Web requires Digital Experiences, which live chat doesn't need. Rep AI connects through the deployment you create in step 1.6.
- For Routing, choose Omni-Flow, select your flow from step 1.4, and set a fallback queue.
- Save, wait until the progress window closes, and check that the channel is Active.
Using User Verification on this channel? Rep AI doesn't support it yet. Use a channel without User Verification.
1.6 — Create the Custom Client deployment
This is the connection Rep AI uses.
- Setup → Embedded Service Deployments → New Deployment → Enhanced Chat → choose Custom Client. Salesforce preselects Web, so make sure you switch it. The channel wizard can't create this type of deployment; it has to be created here.
- Give it a name, keep the suggested API Name, and pick your messaging channel. Save.
Then set up Pre-Chat on the same deployment. This step is easy to miss, and without it your agents see every shopper as "Guest":
- Open Pre-Chat → Edit → turn on Activate the pre-chat feature. The Pre-Chat card must show a green Active badge. Fields you add while it's off do nothing.
- Add First Name, Last Name, Email and Subject as visible fields. Shoppers never see a form; Rep AI fills these in from the conversation.
- Under Visitor Name, pick First Name and Last Name, so agents see the shopper's name.
- If you'll route chats by topic (Part 4), add your routing fields as hidden fields.
- Save, then click Publish.
Wait about 10 minutes after every Publish, until the "We're processing your update" note is gone. Chats started before that may take too long to open, and Rep AI then sends the handoff by email instead.
Last, open the deployment's Code Snippet panel. You'll need three values from it in Part 2: the URL (it ends in my.salesforce-scrt.com), the Organization ID (starts with 00D) and the deployment's API Name.
1.7 — Show the conversation to agents
Open any Messaging Session record → gear menu → Edit Page. If the conversation area is empty, add the Enhanced Conversation component (not the one called "Conversation"). Save and activate the page as the Org Default. Newer orgs often have this already.
Part 2 — Connect Rep AI
- In the Rep AI Console, go to Settings → Integrations, find Salesforce Service Cloud, and click Connect.
- Choose Live chat (Messaging Sessions) and continue.
- Paste the three values from the deployment's Code Snippet panel: Messaging URL, Org ID and Deployment name.
- Click Connect live chat.
Rep AI checks the values with Salesforce right away. The page then shows Connected, with Live chat as the handoff method. No app install and no Salesforce login are needed.
If Rep AI can't connect:
- "Salesforce rejected these details" — check the values against the Code Snippet panel. The usual causes: the deployment isn't a Custom Client one, it was never published, or User Verification is on for the channel.
- "Couldn't reach Salesforce" — your details may be fine. Try again in a moment.
Part 3 — Turn on the handoff
- In the Console, go to AI Support → Support Skills → Human handoff → Edit settings.
- Set the integration to Salesforce Service Cloud — Live chat.
- Check the message the AI sends when it hands off. If it promises a reply time, such as "within 24 hours", change it: your shoppers now reach a live agent.
- Save, then Publish Changes.
Now open your store, start a chat and ask to talk to a person. The chat should appear in your agents' Omni-Channel inbox, named after the shopper.
Part 4 — Route chats to the right team (optional)
Without routing, every chat goes to the queue your flow picks by default. To send billing questions to Billing, product questions to Sales, and so on, set up both sides.
In Salesforce (admin)
- Messaging Settings → your channel → Custom Parameters → New. Create a Text field for each routing value, for example
Issue_Type. - Make sure the channel's routing is Omni-Flow (step 1.5). Parameter mappings only save after that.
- Add a Text input variable for each field in your flow, for example
issueType. - Messaging Settings → your channel → Parameter Mappings → map each field to its flow variable.
- In your flow, add a Decision on the variable, and a Route Work step to the right queue for each value. Keep a default route for everything else.
- On the Custom Client deployment (step 1.6), add each field as a hidden Pre-Chat field, then Publish and wait about 10 minutes.
In Rep AI
In Human handoff → Edit settings, the Routing rules section appears once live chat is active. Click Add routing rule and fill in:
- Rule name — for example "Billing".
- When it applies — describe the situation in your own words, for example "Charges, refunds, payment methods or invoices". The AI reads the conversation and picks the rule that fits.
- Salesforce chat fields — one or more rows of field name and value, for example
Issue_Type=Billing.
Rep AI picks at most one rule per conversation and sends its fields when it opens the chat. When no rule fits, Rep AI sends no fields, and your flow's default route applies.
Things to know:
- Field names must match your Salesforce field names exactly. Salesforce silently ignores a misspelled field, and the chat goes to the default queue.
- Values aren't case-sensitive in a flow decision, so
billingandBillingboth match. - With the Cases extension (Part 6), you pick field names from a list read from your Salesforce, so typos can't happen.
Link chats to Contacts
Rep AI sends the shopper's first name, last name and email with each chat, when the shopper shared them. To show a Contact on each chat, your flow can look up the Contact by email and create one when none exists, then link it to the chat's Messaging User. Map the standard _firstName, _lastName and _email fields to flow variables to use them.
What a live chat looks like
- The shopper asks for a person. The AI tells them it's connecting them, and a chat appears in your Omni-Channel queue.
- The agent accepts. The first message in the chat is Rep AI's summary: the shopper's details, the topic, a summary, the full conversation so far and the pages they visited. The shopper sees "You're now chatting with" followed by your agent's name.
- They chat in real time. Messages go both ways. Files and photos your agent sends reach the shopper as links. Photos the shopper sends stay in the Rep AI chat and don't reach the agent, so ask shoppers to describe the issue in text.
- The agent ends the chat. The shopper is back with the AI, which tells them the live chat has ended.
- After the chat: if the shopper just says thanks, or asks again about the same request, the AI answers and no new chat opens. If they raise a new problem and ask for a person, Rep AI opens a new chat.
When nobody is available, the chat waits in your queue until an agent goes online. What happens next, such as an away message or a different queue, is up to your Salesforce routing.
If your channel sends chats to a Salesforce AI agent first (Agentforce), add a branch to your flow so chats from Rep AI go straight to a human queue. Otherwise the shopper meets a second AI after Rep AI's.
When a live chat can't open
If Salesforce doesn't answer in time or refuses the chat, the shopper isn't left waiting. Rep AI sends the handoff to your support email address instead, or opens a Case if you've set up the Cases extension.
If this keeps happening, the integration page shows Live chat degraded. It clears by itself after the next chat opens successfully. Common causes are in the troubleshooting table below.
Part 5 — Use Cases only (without live chat)
If your team works from Cases rather than live chat:
- Settings → Integrations → Salesforce Service Cloud → Connect → choose Cases.
- Enter your My Domain URL (Setup → My Domain, for example
yourcompany.my.salesforce.com, not thelightning.force.comaddress) and click Save. Sandbox orgs are detected automatically. - Click Install in Salesforce, sign in as an administrator, choose Install for Admins Only, approve the "Approve Third-Party Access" warning, and wait for "Installation Complete".
- Back in Rep AI, confirm the install, click Connect, then click Allow on the Salesforce "Allow Access?" screen.
Then complete the Case setup in Part 6 (steps 6.3 to 6.5) so your agents can reply.
Part 6 — Extend live chat with Cases (optional)
On the integration page, the Extend with Cases card adds:
- A Case when a live chat can't start, instead of an email.
- A list of your Salesforce field names when you write routing rules.
- The option to switch every handoff to Cases.
- AI answering Case comments, including support emails (Part 7).
Your org needs Enterprise, Unlimited or Developer Edition, because the Rep AI app installs a few small automations.
6.1 — Install the Rep AI app (Salesforce admin)
- Click Install Rep AI in Salesforce. A Salesforce tab opens.
- Sign in as an administrator, choose Install for Admins Only, and click Install.
- If you see an orange "Approve Third-Party Access" warning, that's normal for a private app. Approve it.
- Wait for Installation Complete.
6.2 — Sign in
Back in Rep AI, sign in to Salesforce and click Allow on the "Allow Access?" screen. The page now shows both methods: Live chat marked Active, and Support ticket (Case) marked "Used if chat can't start".
To send every handoff as a Case, click Use Cases for all handoffs. To go back, click Use live chat for all handoffs. Your routing rules are kept either way.
6.3 — Turn on Digital Experiences (Salesforce admin, one time)
Agent replies on a Case reach the shopper only when the comment is marked Public, and the Public checkbox appears only once Digital Experiences is on.
- Setup → Digital Experiences → Settings → check Enable Digital Experiences. Keep the suggested domain → Save.
You don't need to create or publish a site.
6.4 — Let agents reply on Cases (Salesforce admin, one time)
Agents reply by adding a Case Comment. Open any Case → gear menu → Edit Page, add a Related List – Single component set to Case Comments, then Save and Activate. A Chatter post doesn't reach the shopper.
6.5 — Let agents close Cases (Salesforce admin, one time)
New orgs hide "Closed" from the Case status list. Setup → Support Settings → enable Show Closed Statuses in Case Status Field → Save. Agents must log out and back in to see it.
What a Case handoff looks like
- A shopper asks for a person → a Case appears with the full conversation, the shopper's details and their browsing context.
- An agent adds a Case Comment → the shopper sees it in the chat within seconds.
- The shopper's replies come back as Case Comments on the same Case.
- The agent sets the Case to Closed → the chat ends and the AI takes over again.
In the Human handoff skill you can pick a Case queue, or leave it blank to let your Salesforce assignment rules route the Case.
Part 7 — Let AI answer support emails (needs Cases)
This turns incoming support emails into Cases and lets the AI answer them.
7.1 — Turn on Email-to-Case (Salesforce admin)
- Setup → Email-to-Case → Continue → Edit → check Enable Email-to-Case → Save.
- Edit again → check Enable On-Demand Service → Save. This generates the Salesforce address your email forwards to.
- Under Routing Addresses, click New: enter your support inbox, set Case Origin to Email, Save, then Verify through the link Salesforce emails you.
- Forward your support inbox to the long Email Services Address Salesforce shows after verifying.
7.2 — Let the AI send replies (Salesforce admin)
- Setup → Deliverability → set Access to Send Email to All email → Save.
- Setup → Organization-Wide Addresses → add and verify the address the AI sends from (usually your support address), and set its purpose to User Selection or Default No-Reply.
If your org can't send email, Rep AI saves the AI's answer as a private draft on the Case and doesn't close it, so nothing is lost.
7.3 — Turn on AI answering in Rep AI
On the Salesforce integration page, turn on AI answering Case comments, then choose a mode in its settings. You can also add an "AI-generated" label, Do-Not-Answer rules and email-specific instructions. AI email answering needs an active Omnichannel AI subscription; if the toggle shows Get Access, add the plan first.
What to expect:
- Answerable question — the AI replies and resolves the Case.
- Can't answer — the AI escalates to a person instead of guessing.
- Spam, out-of-office and security emails — skipped, with no reply and no charge.
- Customer replies after it's resolved — the Case reopens and the AI answers.
- Billing — one Omnichannel AI charge per resolved email thread.
- Reporting — the AI tags each Case with Salesforce Topics (Handled_By_AI, Resolved_By_AI, Human_Agent_Needed and an escalation reason).
Troubleshooting
| Problem | Fix |
|---|---|
| Agents see "Guest" instead of the shopper's name | Pre-Chat isn't active on the Custom Client deployment, or First Name, Last Name and Email aren't listed, or Visitor Name isn't set. Fix it (step 1.6), Publish, and wait 10 minutes. |
| Every chat lands in the default queue | Check the field is a hidden Pre-Chat field on the deployment, the deployment was published after the change, the parameter mapping exists, and the field name in your Rep AI rule matches exactly. |
| "Salesforce rejected these details" when connecting | Make sure the deployment is a Custom Client one (the channel wizard only creates Web or Mobile), that it's published, and that User Verification is off for the channel. |
| A handoff went by email instead of live chat | Salesforce didn't answer in time. This is common in the first few minutes after a Publish. Wait 10 minutes after publishing. If it keeps happening, check that the channel is active and that your org has free data storage: Salesforce refuses new chats when storage is full. |
| Agents only see "Offline" in Omni-Channel | Give their profile access to your presence status (step 1.2). |
| "Unable to log you in" in Omni-Channel | Add Messaging Sessions to the Service Console navigation items (step 1.2). |
| Omni-Channel shows Online but no chats arrive | Check the agent is a Service Cloud User and a queue member, and that your flow is active. Go Offline and back to Available. |
| Chats wait and are never assigned | Check that the flow is active and routes to a queue, and that agents have free capacity. An ended chat holds an agent's slot until its tab is closed. |
| The conversation area is blank for agents | Add the Enhanced Conversation component to the Messaging Session page (step 1.7). |
| "Ask your Salesforce admin to enable skills-based routing" | The channel has no routing target. Set Omni-Flow routing with a fallback queue (step 1.5). |
| A Pre-Chat change has no effect | Publish the deployment again and wait about 10 minutes. |
| Agent's reply on a Case doesn't reach the shopper | Use a Case Comment, not Chatter, and mark it Public (steps 6.3 and 6.4). |
| Agent can't set a Case to Closed | Enable Show Closed Statuses (step 6.5) and have the agent log out and back in. |
| "Rep AI app not found in your org" | Install the app in the same org you connected, then try again. |
| AI email replies stay as internal notes | Complete Deliverability and the Organization-Wide Address (step 7.2). |
Removing the integration
Click Disconnect on the Salesforce integration page. Open live chats end, and Rep AI stops calling Salesforce. Afterwards, open the Human handoff skill and pick another handoff option so escalations still reach your team. If you installed the Rep AI app, your admin can remove it in Salesforce: Setup → Installed Packages → Rep AI → Uninstall.
Appendix — what the Rep AI app installs (Cases only)
Live chat installs nothing in your org. The Rep AI app, used for Cases, sets up two custom Case fields, a remote site setting, an Apex helper class and four triggers. They power the real-time reply relay and email answering, and they're refreshed every time you reconnect. Exact names, for admins: Case fields Rep_AI_Managed__c and Rep_AI_Session_External_Id__c; remote site setting RepAI_Webhook; Apex class RepAIWebhookHelper (with its test class); triggers on Case, CaseComment, CaseCreated and InboundEmail.
Related articles
- Contact Support Skill
- Sell on Salesforce Commerce Cloud? Connect Rep AI to Your SFCC Store