function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michal BaranecMichal Baranec 

Concatenate fields from snap-in prechat form

In the snap-in prechat form I am gathering First Name and Last Name fields of the chat visitor. I would need to concatenate these fields and pass them as a single value to the field SuppliedName [Text(80)] on Case using the embedded_svc.settings.extraPrechatInfo.

Is there a way how to achieve this please?

Right now I am passing only the Last Name which works, but I need to change this and pass the full name.

embedded_svc.settings.extraPrechatInfo = [{"entityFieldMaps":[{"doCreate":true,"doFind":false,"fieldName":"Subject","isExactMatch":false,"label":"Subject"},{"doCreate":true,"doFind":false,"fieldName":"SuppliedEmail","isExactMatch":false,"label":"Email"}, {"doCreate":true,"doFind":false,"fieldName":"SuppliedName","isExactMatch":false,"label":"Last Name"},{"doCreate":true,"doFind":false,"fieldName":"Origin","isExactMatch":false,"label":"CaseOrigin"}],"entityName":"Case","saveToTranscript":"Case","showOnCreate":true}];