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
Saurabh Kulkarni 76Saurabh Kulkarni 76 

Define visitor name in embedded service chat without using pre chat form

Hello All,

I am using a visualforce page to add the embedded service chat, as it is going to be chat between internal users and agent. I want to use the logged in user name as visitor name and email. I don't need a pre chat form and want this basic information to be taken from logged in user. Is there a way by which we can do this? I saw some options to override the prechat info in script however that works only if I have a pre chat form

Thanks
Best Answer chosen by Saurabh Kulkarni 76
VinayVinay (Salesforce Developers) 
Hi Saurabh,

As per my understanding,  You would need pre-chat form to define visitor name in embedded service also haven't found any other workaround for same.

Reference:
https://developer.salesforce.com/docs/atlas.en-us.live_agent_dev.meta/live_agent_dev/live_agent_pre_chat_forms.htm

Please mark as Best Answer if above information was helpful so that it can help others in the future.

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Saurabh,

As per my understanding,  You would need pre-chat form to define visitor name in embedded service also haven't found any other workaround for same.

Reference:
https://developer.salesforce.com/docs/atlas.en-us.live_agent_dev.meta/live_agent_dev/live_agent_pre_chat_forms.htm

Please mark as Best Answer if above information was helpful so that it can help others in the future.

Thanks,
This was selected as the best answer
Saurabh Kulkarni 76Saurabh Kulkarni 76
Thanks, Vinay.  Another question is can I share additional information with the agent, before chat? For example, even before pre-chat form comes up, I have some context information that I want agent to know. Is it possible to send a start message to agent with that information? Like how greeting message goes to the visitor?

Thanks much!
Xi ShuangXi Shuang
You can follow the guide in this page
https://developer.salesforce.com/docs/atlas.en-us.232.0.snapins_web_dev.meta/snapins_web_dev/snapins_web_prechat_code_examples.htm
To have the user's name show up in the Waiting state, or any context info agent might need by using "displayToAgent".