Skip to main content
IrisGPT answers first and hands the chat to a human when needed. The customer stays in the IrisGPT widget, and the agent replies from Salesforce Service Cloud.

Before you begin

  • Salesforce Service Cloud with Enhanced Chat (formerly Messaging for In-App and Web) and the required Digital Engagement entitlements
  • Salesforce admin access
  • Omni-Channel set up for the agents who take messaging sessions
  • An IrisGPT chatbot on your website, and access to the IrisAgent dashboard
This uses a Salesforce Enhanced Chat Custom Client deployment. Salesforce’s standard chat widget is not shown.

1. Prepare Salesforce routing

Skip to step 2 if Enhanced Chat sessions already route to your agents. Otherwise, in Salesforce Setup:
  1. Enable Omni-Channel.
  2. Create a service channel for the Messaging Session object.
  3. Create a queue and add the agents who should get IrisGPT handoffs.
  4. Create presence statuses for messaging.
  5. Create and activate an Omni-Channel flow that routes the recordId input to your queue, agent, or skills.
  6. Add Enhanced Chat to the Service Console.
Full guide: Prepare a Salesforce Org for Enhanced Chat.

2. Create a custom client deployment

  1. In Setup, open Messaging Settings and create or open an Enhanced Chat channel.
  2. Select the Omni-Channel flow and fallback queue for IrisGPT handoffs.
  3. Turn off Use reCAPTCHA (or reCAPTCHA Verification) and save the channel.
  4. In Setup, open Embedded Service Deployments and click New Deployment.
  5. Select Enhanced Chat → Next → Custom Client → Next.
  6. Name the deployment. Its API Name is the deployment name IrisAgent uses.
  7. Select the channel from step 1 and save.
  8. Publish the deployment. Stay on the page until it finishes.
  9. Enable the Enhanced Chat REST API for the org if it is not already on.
Allow up to 10 minutes after publishing for Salesforce to make the deployment available.
  • Choose Custom Client, not Web. A Web deployment cannot be converted and does not work with IrisAgent. Create a new Custom Client deployment instead.
  • Keep reCAPTCHA off. IrisAgent does not send a Salesforce captchaToken. If you turn reCAPTCHA off after publishing, save the channel and republish. See reCAPTCHA requirements for API clients.
Salesforce reference: Configure a Custom Client Deployment for Enhanced Chat.

3. Connect the deployment in IrisAgent

Copy these values from the published deployment’s configuration (all from the same org and deployment):
The Service URL must start with exactly one https://, have no Markdown brackets, and have no path after the hostname.
  1. In the IrisAgent dashboard, go to Deploy → Chat channels.
  2. On the Salesforce Messaging card, click Configure.
  3. Turn on Enable Salesforce Messaging.
  4. Enter Service URL, Organization ID, and Deployment Name.
  5. Optional: enter a No-agent reply to show when no agent is available.
  6. Click Save. The card shows Connected.
These settings apply to all your IrisGPT website chatbot configurations, including future ones.
Connected only means the values are saved. It does not confirm the deployment is published or is a Custom Client. Run the test in step 5.
Do not enter Salesforce passwords, tokens, session IDs, or client secrets. The three values above are all you need.

4. Turn on live chat handoff

  1. Go to AI Products → Chatbot and click Configure and deploy.
  2. Open the chatbot configuration your website uses.
  3. Under Agent Handoff, select Start a live chat and save.
The data-token in your website’s embed snippet must belong to this configuration. See Chatbot on Website.

5. Test the handoff

  1. Have an agent open the Service Console and set the Omni-Channel presence used by the queue.
  2. On your website, ask IrisGPT for a human.
  3. Check that IrisGPT shows a waiting or queue status.
  4. Accept the Messaging Session in Salesforce and send a reply. It should appear in the widget.
  5. Reply from the widget. It should appear in the same Salesforce session.
  6. Reload the website. The conversation and agent connection should be restored.
Handoff supports text only. File and image attachments are not available.

6. Optional: Send pre-chat answers to your Omni-Channel flow

Because IrisGPT uses a Custom Client deployment, Salesforce’s own pre-chat form is not shown. Instead, an IrisGPT procedure asks your pre-chat questions before the handoff, and IrisAgent passes the answers to your Omni-Channel flow as routing attributes. Your flow can then branch on them exactly as it would on native pre-chat values, for example routing on an I am a answer.

Plan your fields

List every value the flow needs. For each one, decide:
  • The IrisAgent field key: the snake_case key of the procedure field that collects it (for example, i_am_a).
  • The Salesforce Channel Variable Name it maps to.
  • The exact values the flow compares against, if it branches on the field.
Example:

Set up Salesforce

  1. Standard fields (first name, last name, email, subject) use the built-in names _firstName, _lastName, _email, and _subject. Keep them enabled in the deployment’s pre-chat settings. They need no parameter mapping.
  2. Custom fields: in Setup, open Messaging Settings, open your Enhanced Chat channel, and add a Parameter Mapping for each field. Each mapping has a Parameter API Name and a Channel Variable Name, and they can differ. IrisAgent sends the Channel Variable Name, so that is the name to send us.
  3. In the channel’s Omni-Channel flow, create an input variable for each field. Make it Text and select Available for input, then map the channel variable to it.
  4. In Embedded Service Deployments, add each custom field to the deployment’s pre-chat fields. Hidden fields work, since IrisGPT asks the questions. Then republish the deployment.
Salesforce reference: Pre-chat API.

Create the intake procedure in IrisAgent

  1. Go to Automate → Procedures and create or edit the procedure that runs when a customer asks for a human. See Workflows.
  2. Choose Instructions for AI Agent.
  3. Under Information to collect, add one field per row of your table, in the order the AI should ask. Check that each field’s key matches your IrisAgent field key exactly.
  4. In the steps, give the exact allowed values for every field the flow branches on, and finish with the handoff. For example:
  5. Under Availability, select Chat so email and voice conversations do not get these questions, then save.
Spelling and capitalization must match your flow exactly. If the flow checks for Participant and IrisGPT sends participant, the flow takes its default path. Listing the allowed values in the steps is the most reliable way to get exact matches.

Ask IrisAgent to turn it on

The field mapping cannot be edited in the dashboard yet. Email support@irisagent.com with your table’s IrisAgent field key and Channel Variable Name columns, and say which chatbot or environment (for example, your sandbox) it is for. We will confirm once it is active.

How the answers are sent

  • Only the fields in your mapping are sent as routing attributes. Other answers the procedure collects are not.
  • Values are sent once, when the Salesforce session starts. Answers given after the handoff are not sent.
  • If a customer answered the same field more than once, the latest answer is sent.
  • Empty answers, and answers longer than 255 characters, are skipped.
  • The answers are not stored with the chat or shown in the widget.
  • The chat transcript passed to your agent still contains every message the customer typed, including answers to questions you did not map. Do not rely on the mapping to keep information out of Salesforce.

Test it

  1. Start a chat on your website (or sandbox), ask for a human, and answer every question.
  2. Accept the Messaging Session in Salesforce.
  3. Check that the session’s fields are filled in, or use a Flow debug run, and that the flow took the expected branch.

Troubleshooting

“No agents are available”
  • At least one agent in the queue must be online with the right presence status and have capacity.
  • The channel’s flow and fallback queue must be active.
Stuck in waiting
  • The Omni-Channel flow must route the Messaging Session service channel.
  • The flow’s input variable must be named exactly recordId, be text, and be available for input.
  • The deployment must be published and the Enhanced Chat REST API enabled.
“There was an error processing your request”
  • Wait up to 10 minutes after publishing, then retry.
  • Confirm the deployment type is Custom Client, not Web.
  • Use the exact DeveloperName (API name), not the display label or a Web deployment’s name.
  • Confirm all three values come from the same org and deployment.
  • If Salesforce says the deployment type is unsupported or must be api, create and publish a new Custom Client deployment.
  • If you see Verification requires a valid reCAPTCHA token, turn off Use reCAPTCHA, save the channel, republish, and wait up to 10 minutes.
Pre-chat values are empty in the flow
  • Use the Channel Variable Name in the mapping, not the Parameter API Name.
  • The flow variable must be Text and Available for input, and the channel variable must be mapped to it.
  • Each custom field must be on the deployment’s pre-chat field list, and the deployment must be republished.
  • The procedure must collect every field before it hands off. Values are only sent when the session starts.
The flow takes the default path
  • The value IrisGPT sends must match the flow’s comparison value exactly, including capitalization. List the allowed values in the procedure steps.
Messages do not appear in IrisGPT
  • The Salesforce deployment must include the exact top-level domain where the widget runs.
  • The values on the Salesforce Messaging card must match the published deployment. Update them if the deployment was replaced or renamed.