1. In the Embedded Chat, make sure only Contact is selected in the Pre-Chat.
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Salesforce2BEmbedded2BChat2BContacts2BCreation.jpg)
2. Create a Flow to Create Case record and Update Chat Transcript with the Case Id.
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Flow2Bto2BCreate2BCase2Band2BUpdate2BChat2BTranscript.jpg)
Case Assignment:
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Case2BAssignment2BSalesforce2BFlow.jpg)
Create Case:
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Create2BCase2BSalesforce2BFlow.jpg)
Chat Transcript Assignment:
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Chat2BTranscript2BAssignment2BSalesforce.jpg)
Update Chat Transcript:
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Update2BChat2BTranscript2BSalesforce2BFlow.jpg)
3. Update “Transfer to Agent” Dialog in the BOT. Get the Subject for Case. Call the Flow to create a the Case and update Chat Transcript with the Case Id.
![](https://www.infallibletechie.com/wp-content/uploads/2021/08/Transfer2Bto2BAgent2BDialog2BSalesforce.jpg)