Sunday 7 February 2021

How Set Pre-Chat Form Fields to Automatically Populate when Customers Log In (Snap-In)

 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

How to include a screen flow in a Lightning Web Component

 Hi, Assume  you have a flow called "Quick Contact Creation" and API Name for the same is "Quick_Contact_Creation". To i...