You need to sign in to do that
Don't have an account?
regidsites
embedded_svc.menu.settings.directToButtonRouting Possible?
I have used the following code before for Live Chat and it's working fine to direct to a button ID based on the Pre chat question customer answers. Now, this code seems to be not working when I started using the new 'Channel Menu'. Has anyone found a solution to direct to button routing if use a channel menu?
embedded_svc.settings.directToButtonRouting = function(prechatFormData) { if (prechatFormData[3].value === 'English') return 'XXXX000000XYYY'; if (prechatFormData[3].value === 'Spanish') return 'XXXXX000000XAAA'; if (prechatFormData[3].value === 'French') return 'XXXX000000XBBB'; };
I was getting "Uncaught TypeError: Cannot set properties of undefined (setting 'directToButtonRouting') at initESW". And I was getting this only for Channel Menu code
embedded_svc.settings.directToButtonRouting = function(prechatFormData) { if (prechatFormData[3].value === 'English') return 'XXXX000000XYYY'; if (prechatFormData[3].value === 'Spanish') return 'XXXXX000000XAAA'; if (prechatFormData[3].value === 'French') return 'XXXX000000XBBB'; };
I was getting "Uncaught TypeError: Cannot set properties of undefined (setting 'directToButtonRouting') at initESW". And I was getting this only for Channel Menu code
>> Please check if the code used in the static resource is formatted correctly. You need to use the format mentioned here
https://help.salesforce.com/articleView?id=sf.embedded_menu_static_examples.htm&type=5
Experience site: Example code >>At the moment this functionality is not available for VF pages. Please consider logging an Idea with Salesforce IdeaExchange(https://trailblazer.salesforce.com/ideaSearch ) so that the salesforce product development team can consider implementing this feature based on number of upvotes.
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
All Answers
>> Please check if the code used in the static resource is formatted correctly. You need to use the format mentioned here
https://help.salesforce.com/articleView?id=sf.embedded_menu_static_examples.htm&type=5
Experience site: Example code >>At the moment this functionality is not available for VF pages. Please consider logging an Idea with Salesforce IdeaExchange(https://trailblazer.salesforce.com/ideaSearch ) so that the salesforce product development team can consider implementing this feature based on number of upvotes.
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you