Introduction
I often get asked about how to get access to the Name and Email fields in a pre-chat survey. A pre-chat survey allows you to collect information about a visitor before engaging with them in a chat. This is often used to collect basic identifying information such as the visitor's name and email address.
Since July 2018, these fields are now set as named fields in the Chat Activity making it easy to access and use the data in your workflows.
Configuring the Pre-Chat Survey
Pre-chat surveys are part of the 3 surveys (video) that Live Assist for Dynamics 365 provides. It is easy to configure a pre-chat survey in Live Assist for Dynamics 365. During the configuration phase, you can specify a question as being of a specific type. There are many types that you could use, but of specific interest here are the "Consumer name" and "Email address" types:
You can only have one "Consumer name" question and one "Email address" question in a pre-chat survey.
The Chat Activity fields
Live Assist for Dynamics 365 will automatically detect the presence of these two questions in a pre-chat survey and will populate the corresponding Chat Activity fields in Dynamics 365. The Chat Activity has two fields configured for this:
Their schema names are:
- cxlvhlp_visitorfirstname
- cxlvhlp_visitoremail
Note: Passed values should not contain any control symbols, such as newline characters or braces.
This may cause errors to appear in the widget.
You can view these values in the Chat Activity directly:
Even though the first field is labelled as visitor First Name, it will contain the full text that the visitor entered into the "Consumer name" field in the pre-chat survey.
If the questions are not populated in the pre-chat survey, then the "Visitor First Name" will read "visitor" and the "Visitor Email" will be empty.
With these fields now being declared in the Chat Activity and accessible to the Dynamics 365 framework, it is possible to use this information easily and directly in your different Workflows.