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

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...