ForumCategory: QuestionsJS SDK Pre chat survey : How to get/set field of type customer name?
Anusha asked 49 years ago

We have a field of the type “Consumer Name” in live engage pre chat survey. We use JS SDK. When we invoke getPreChatSurvey method and fetch the pre chat survey, we get it as type “text field”. As a developer we are not able to distinguish between type “Consumer Name” and  “text field”. Now when the user fills the consumer name and sends it as part of the pre chat survey, the Consumer name field does not appear in the agent’s portal. The consumer name is completely ignored.
We use the setVisitorName() method to set the user’s name. But if the user wants to override the name set by the system and enter his name, he is not able to do so.
How do we send identify an incoming field of the type “consumer name” and how do we send it back as part of requestChat so that the live engage detects it to be of the type “consumer name” and displays it to the agent?