Hi,
The following sample code for embedded_svc.settings.prepopulatedPrechatFields populates the First Name, Last Name, Email, and Subject fields in the pre-chat form.
embedded_svc.settings.prepopulatedPrechatFields = {
FirstName: “John”,
LastName: “Doe”,
Email: “john.doe@salesforce.com”,
Subject: “Hello”
};
Note: It should be added before "embedded_svc.init"
Reference:
https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_populate_prechat.htm
No comments:
Post a Comment