February 5, 2021

How to pre-populate Pre-Chat Form Fields in Salesforce Embedded Service Chat?

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: "magulandemo@infallibletechie.com"
        };
 
Output:
 

 

2 comments:

  1. Thx, but I haven't been able to pre populate custom fields...

    ReplyDelete
    Replies
    1. Did you add this to your embedded snippet? Also, make sure you are not using custom pre chat component.

      Delete