You need to sign in to do that
Don't have an account?
Diego 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?
Were you able to resolve this? We are trying to implement Channel menu and it is not recognizing logged in user.
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