I am using snippet settings in my Salesforce chat from Community. The logic in snippet settings is the same as provided over Salesforce developer guide : https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_snippet_settings_file.htm

When the chat is initiated for the first time, the logic written in the snippet settings doesn't executes, but when it is initiated for the 2nd time in the same session, it runs perfectly fine.

If there had been something wrong with the code it must not have run the second time as well. Any suggestions?

2 Answers 2


I also ran into same problem and the response from Salesforc was like as follows. In my snippetSetting file of the embedded service chat component I've added below code.

embedded_svc.settings.extraPrechatFormDetails instead of embedded_svc.snippetSettingsFile.extraPrechatFormDetails

then I changed the settings to snippetSettingsFile and it worked for the first time as well.


I was able to resolve this by using embedded_svc.snippetSettingsFile.extraPrechatInfo & embedded_svc.snippetSettingsFile.extraPrechatFormDetails

in the snippetSettings file.

Not sure why settings works after the first init, seems like it should be one or the other.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .