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
1. Prepare Salesforce routing
Skip to step 2 if Enhanced Chat sessions already route to your agents. Otherwise, in Salesforce Setup:- Enable Omni-Channel.
- Create a service channel for the Messaging Session object.
- Create a queue and add the agents who should get IrisGPT handoffs.
- Create presence statuses for messaging.
- Create and activate an Omni-Channel flow that routes the
recordIdinput to your queue, agent, or skills. - Add Enhanced Chat to the Service Console.
2. Create a custom client deployment
- In Setup, open Messaging Settings and create or open an Enhanced Chat channel.
- Select the Omni-Channel flow and fallback queue for IrisGPT handoffs.
- Turn off Use reCAPTCHA (or reCAPTCHA Verification) and save the channel.
- In Setup, open Embedded Service Deployments and click New Deployment.
- Select Enhanced Chat → Next → Custom Client → Next.
- Name the deployment. Its API Name is the deployment name IrisAgent uses.
- Select the channel from step 1 and save.
- Publish the deployment. Stay on the page until it finishes.
- Enable the Enhanced Chat REST API for the org if it is not already on.
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.
- In the IrisAgent dashboard, go to Deploy → Chat channels.
- On the Salesforce Messaging card, click Configure.
- Turn on Enable Salesforce Messaging.
- Enter Service URL, Organization ID, and Deployment Name.
- Optional: enter a No-agent reply to show when no agent is available.
- Click Save. The card shows Connected.
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.
4. Turn on live chat handoff
- Go to AI Products → Chatbot and click Configure and deploy.
- Open the chatbot configuration your website uses.
- Under Agent Handoff, select Start a live chat and save.
data-token in your website’s embed snippet must belong to this configuration. See Chatbot on Website.
5. Test the handoff
- Have an agent open the Service Console and set the Omni-Channel presence used by the queue.
- On your website, ask IrisGPT for a human.
- Check that IrisGPT shows a waiting or queue status.
- Accept the Messaging Session in Salesforce and send a reply. It should appear in the widget.
- Reply from the widget. It should appear in the same Salesforce session.
- Reload the website. The conversation and agent connection should be restored.
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.
Set up Salesforce
- 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. - 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.
- 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.
- 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.
Create the intake procedure in IrisAgent
- Go to Automate → Procedures and create or edit the procedure that runs when a customer asks for a human. See Workflows.
- Choose Instructions for AI Agent.
- 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.
-
In the steps, give the exact allowed values for every field the flow branches on, and finish with the handoff. For example:
- Under Availability, select Chat so email and voice conversations do not get these questions, then save.
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
- Start a chat on your website (or sandbox), ask for a human, and answer every question.
- Accept the Messaging Session in Salesforce.
- 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.
- 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.
- 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.
- 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 value IrisGPT sends must match the flow’s comparison value exactly, including capitalization. List the allowed values in the procedure steps.
- 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.