Configure an Omni-Channel flow to map the pre-chat variables from the chat deployment to the custom fields on the Messaging Session object and route chats to your Agentforce Service agent.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
| Available in: Aura and LWR Experience Cloud Sites |
| Available in: Enhanced Chat with the Einstein for Service, Einstein Platform, Community, Community Plus, or Agentforce Service Agent add-on |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with Foundations or Agentforce 1 Editions. Access to some standard agent actions requires additional add-on licenses |
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- Click New Flow. From the New Automation screen, select Omni-Channel Flow under Frequently Used.
- Click the Toolbox icon on the left-hand side to access the resource panel.
- Click New Resource for each custom parameter for example, lastViewedArticleId.
- Set Resource Type to Variable.
- Set the API Name to match the custom parameter defined in your Messaging Channel exactly for example, lastViewedArticleId.
- Set the Data Type to Text.
- Under Availability Outside the Flow, check the box for Available for Input and then Click Done.
- To update the messaging session record, click the Add Element button (+) between Start and End.
- Select the Update Records element.
- Set up the element to update the Messaging Session record that initiated the flow.
- Map each of your new Input Variables to the corresponding Custom Field on the Messaging Session object. For example, map the flow variable {!lastViewedArticleId} to the custom field lastViewedArticleId__c.
- To route the chat, click the Add Element button (+) after the Update Records element.
- Select the Route Work element and configure it to route the chat session to your Agentforce Service agent.
- Click Save, provide a name, and then click Activate to make the Omni-Channel Flow available.