![](https://www.infallibletechie.com/wp-content/uploads/2022/07/Pre-Chat-in-Salesforce-Messaging-for-In-App-and-Web-1024x576.jpg)
Pre-chat will work only for the Messaging Channels where the Routing Type is set as Omni Flow.
Reference Article:
https://help.salesforce.com/s/articleView?id=sf.miaw_limitations.htm&type=5
To setup Pre-Chat in Salesforce Messaging for In-App and Web, follow the below steps:
1. Create an Omni-Flow.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Omni-Flow-for-Salesforce-Messaging-for-In-App-and-Web.jpg)
Check Email Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Email-Check-Salesforce-Messaging-for-In-App.png)
Fetch Contact Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Fetch-Contact-Salesforce-Messaging-for-In-App.png)
Fetch Messaging Session Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Fetch-Messaging-Session-Salesforce-Messaging-for-In-App.png)
Contact Check Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Contact-Check-Salesforce-Messaging-for-In-App.png)
Update Messaging End User Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Update-Messaging-End-User-Configuration-Salesforce-Messaging-For-In-App.png)
Route Messaging Session Configuration:
![](https://www.infallibletechie.com/wp-content/uploads/2022/11/Route-Messaging-Session-Salesforce-Messaging-For-In-App.png)
2. When you create the Messaging Channel, set the Routing Type as Omni-Flow. Select the Flow from Step 1 in the Flow Definition.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Omni-Flow-in-Salesforce-Messaging-for-In-App-and-Web.jpg)
3. Map Pre-Chat to Omni-Flow variables.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Map-Prechat-to-Omni-Flow-for-Salesforce-Messaging-for-In-App-and-Web.jpg)
Output:
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Pre-Chat-in-Salesforce-Messaging-for-In-App-and-Web.jpg)