
We can pass Pre-Chat information to Salesforce Agentforce Agents. In order to do so, update the Messaging Session record with the Pre-Chat information. In the Agentforce Agent, use the Messaging Session Context Variable to refer it.
Boost Agentforce Efficiency with Pre-Chat Data:
Want to give your Salesforce Agentforce agents a head start? Pass valuable information collected during the pre-chat phase directly into their console.
How it works:
- Collect Pre-Chat Info: Use the pre-chat form to gather details.
- Update Messaging Session: In the Omni-Channel Flow, update the Salesforce Messaging Session record with the pre-chat data.
- Expose in Agentforce: Configure Messaging Session Context Variables in the Agentforce configuration to utilize the updated fields to Agentforce agents.
Why it matters:
- Agents get instant context, reducing the need to ask repetitive questions.
- They can personalize interactions more effectively.
- Resolution times improve, leading to happier customers and more efficient agents.
By integrating pre-chat data, you empower your agents with crucial information right from the start, leading to smoother, more efficient, and ultimately better customer service interactions within Salesforce Agentforce.
Steps:
1. Create a custom field in Salesforce Messaging Session object/entity. This will field will be updated with the Pre-Chat information. I have created a Picklist field “Request Type”.

2. Use Update Records flow element to update the Messaging Session record.

Here, requestType is an Input Flow Variable.
3. Open the Messaging Channel. Create a Custom Parameter. Also, do the Parameter Mapping. I have mapped the Request Type Custom Parameter to the requestType Flow Input Variable to update the Messaging Session Request Type Custom Field.

4. Open the Embedded Service Deployment and add the Pre-Chat field.

5. Add the custom field created in Step1 in the Salesforce Agentforce Agent Context Variable.

Please check the following Blog Post to know more about Context Variables in Salesforce Agentforce.
6. You can create Filter using the Context Variable.
