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

Grounding Prompt Templates with Apex Merge Fields

 Hi, You can include an Apex merge field in a prompt template to surface data retrieved from a SOQL query or an external API. Apex is also u...