![](https://www.infallibletechie.com/wp-content/uploads/2023/02/Pre-populate-Pre-Chat-Form-Fields-in-Salesforce-Embedded-Service-Chat-1024x576.jpg)
prepopulatedPrechatFields attribute can be used to pre-populate Pre-Chat Form Fields in Salesforce Embedded Service Chat.
Sample Code:
embedded_svc.settings.prepopulatedPrechatFields = {
FirstName: "Magulan",
LastName: "Duraipandian",
Email: "[email protected]"
};
Output:
![](https://www.infallibletechie.com/wp-content/uploads/2021/02/Auto2BPopulate2BPre2BChat2BSalesforce2BEmbedded2BChat.jpg)