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
Diego MurielDiego Muriel 

Channel Menu + Chat with prepopulatedPrechatFields

Hi,

before the spring'20 version, chat had been implemented, along with the channel menu. Everything worked perfectly. The code looked like this:
 

<script type='text/javascript' src='https://service.force.com/embeddedservice/menu/fab.min.js'></script>

<script type='text/javascript'>
	var initESW = function(gslbBaseURL) {
		embedded_svc.menu.chat.settings.prepopulatedPrechatFields = {
            FirstName: "{{fName}}",
            LastName: "{{lName}}",
            Email: "{{email}}",
            Telefone: "{{phone}}"
        };
		
		
		embedded_svc.menu.init(
			'https://xxxxxxx.my.salesforce.com',
			'https://d.xxxxxxxxxxxxxx.salesforceliveagent.com/chat',
			gslbBaseURL,
			'xxxxxxxxxxxx',
			'Channel_Menu'
		);
		
	};

	if (!window.embedded_svc || !window.embedded_svc.menu) {
		var s = document.createElement('script');
		s.setAttribute('src', 'https://xxxxxxx.my.salesforce.com/embeddedservice/menu/fab.min.js');
		s.onload = function() {
			initESW(null);
		};
		document.body.appendChild(s);
	} else {
		initESW('https://service.force.com');
	}
</script>
 

After the update stopped working. An undefined object error now occurs. Investigating, I imagine that this happens because now the channel menu options are dynamic and can be changed by the client side.

Any suggestions or examples to fill in the pre-form data?

Abh1 NeupaneAbh1 Neupane
Hi Diego,
Were you able to resolve this? We are trying to implement Channel menu and it is not recognizing logged in user.
Diego MurielDiego Muriel
No, we abandon the channel menu and continue using only the chat.
Samuel RichardsSamuel Richards
Unfortunately, I, too, did not find a solution to this problem, and I had to finish the Online Craps https://casinocanada.com/games/craps/ game script for one of the Canadian gaming sites only in chat mode, which, although it did not complicate the task very much, nevertheless brought certain difficulties.
 
GJS GregGJS Greg

It took me forever to work this out also. Finally came across this link yesterday which solved my problems:
https://www.infallibletechie.com/2021/02/channel-menu-setup-in-salesforce_26.html

 

And this helped a little too:
https://salesforce.stackexchange.com/questions/360952/channel-menu-settings-file-not-working

GJS GregGJS Greg
Also, the official SF documentation and examples weren't as clear: https://help.salesforce.com/s/articleView?id=sf.embedded_menu_code_changes.htm&type=5
jerknoz joejerknoz joe
Step-by-step instructions for how to configure your Live Chat or Chat Messaging channel in Digital First Omnichannel. You can create a popup or widget, ...www microsoft com link code xbox (https://tractorsinfo.com/https-www-microsoft-com-link-code-xbox/)