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

Best Practices for Building Prompt Templates

 Hi, The following best practices should be considered when building prompt templates: Make sure that your prompt templates are concise and ...