Genesys Engage on-premises

 View Only

Discussion Thread View

Change dataURL value based on user selection

  • 1.  Change dataURL value based on user selection

    Posted 05-16-2020 00:22
    Genesys folks,Genesys folks,I am trying to update the dataURL in my configuration based on what the user has selected. I've tried a few ways using jQuery to update dataURL if the user selected a particular option before starting chat.So the current URL and set up is all working great today. This is a new enhancement where I need to connect to a different URL dynamically. 
        window._genesys.widgets.webchat = { dataURL: gmsServicesConfig.GMSChatURL(), enableCustomHeader: true.................................................................................................
    window._genesys.widgets.onReady = function (CXBus) {     // Use the CXBus object provided here to interface with the bus     // CXBus here is analogous to window._genesys.widgets.bus     localWidgetPlugin = CXBus.registerPlugin('LocalCustomization');          localWidgetPlugin.subscribe("WebChat.opened", function (e) { 
                  //some code here             $("body").on('change', '#question_field', function() {       if($('#question_field').val() === 'ID Card Request'){     window._genesys.widgets.webchat.dataURL = chatBotEndPoint;       }       });
    The part where I am trying to update the question_field is not working. It seems that the dataURL is getting updated to the new URL as I can see it on Chrome console but not so when the chat begins. It's defaulting to the original URL. Let me know if you need nay other details. Any help is appreciated!
    Edit: This question seems very similar to mine. Would you be able to show me how to use the e parameter of the event may contain the source of the event, i.e. what launched it?
    https://developer.genesys.com/q2a/570/different-services-depending-initiation-reactive-proactive?show=570#q570
    #DigitalChannels

    ------------------------------
    -Vineel
    ------------------------------


Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources