Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-25-2023 15:19
    No replies, thread closed.

    Hi,

    For Web Messenger, we have built a Custom Form where Customer can fill in the Data which will be posted as Custom Attributes to Genesys Cloud Web Messenger.

    Now, when User Clicks on Start Chat, we are able to display the Web Messenger Window successfully.

    Now, if User hits the "Disconnect Conversation" button on the right top of the Messenger Window, we would need the web form back (first image). How, we can capture this Close event from User and post it back to the UI portal. We tried to "Inspect Element" in browser, and realized that the iframe object which holds the Messenger Window is same when the Chat is in Minimized state or when the Chat is disconnect. In both cases, it goes to the same state:

    Please suggest how we can capture the "Disconnect Conversation" so that we can hide the Web Messenger and bring the form back.


    #DigitalChannels

    ------------------------------
    Anwita Acharya
    ------------------------------


  • 2.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-25-2023 17:43
    No replies, thread closed.

    Hi Anwita - 

    We are using the JS example below to subscribe to the Clear Conversation event and then resend two custom attributes in our training sandbox (IsAuthenticated and MessagingDeployment). 

    I'm sure you could re-purpose this and wrap it around your form launch code snippet. By replacing the "Genesys("command","Database.set",{messaging:{customAttributes:{IsAuthenticated: false,MessagingDeployment:"Web Messaging Training"}}});" code with your code snippet, it will bne launched any time the button is used.

    Example - 
    =====================================

    Genesys("subscribe", "MessagingService.conversationCleared", function(response) {
        var data = response.data;
        console.log(data);

        Genesys("command","Database.set",{messaging:{customAttributes:{IsAuthenticated: false,MessagingDeployment:"Web Messaging Training"}}});
    });



    ------------------------------
    Tony Freestone
    Providence Health & Services
    ------------------------------



  • 3.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-25-2023 18:54
    No replies, thread closed.

    Hi Tony, curious why you need to resend the isAuthenticated flag, have you had problems with end-users starting a new conversation after clearing a previous one?



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 4.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-25-2023 19:03
    No replies, thread closed.

    Hi Vaun - 

    We found that all custom attributes set at the start of a web messaging session were cleared/nulled out. If/when those attributes were used as part of a switch/decision point in a flow we had issues.

    In the case of training flow we are not using authenticated web messaging. The IsAuthenticated variable/attribute was added initally by the Genesys PS team and I left it.

    However, we decided to use it for a 'hybrid' deployment in which the widget is not available until the customer authenticates into a portal. In that case the dev team of the portal controls the presentation/access of the widget and sends along the IsAuthenticated attribute as 'true' along with other attributes for customer metadata.



    ------------------------------
    Tony Freestone
    Providence Health & Services
    ------------------------------



  • 5.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-26-2023 15:32
    No replies, thread closed.

    Thanks Tony for the suggestion. We are able to capture the clear conversation event successfully and bringing out form back. Below are few snippets we are using:

    Genesys("subscribe", "MessagingService.conversationCleared", function(response) 
        {
          var data = response.data;
          console.log(data.class);
          document.getElementById("myForm").style.display = "block";
          document.getElementsByName("genesysMessengerLauncherFrame")[0].style.display="none";
        });

    However, we observed that if we Close the browser without clearing the conversation, then the Web Messenger window reappears automatically with all the last chat on re-opening the browser. Is there a way to prevent that, so that anytime a browser is closed, the Web Messenger will not come up on reopening the browser?



    ------------------------------
    Anwita Acharya
    Cognizant Technology Solutions India Private Limited
    ------------------------------



  • 6.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-26-2023 18:46
    Edited by Tony Freestone 10-26-2023 18:46
    No replies, thread closed.

    Hi Anwita - 

    The only way I can think of to eliminate that with the current state would be to disable the threading timeline for web messaging. I haven't tested it though.



    ------------------------------
    Tony Freestone
    Providence Health & Services
    ------------------------------



  • 7.  RE: Capture Web Messenger Clear Conversation event when User clicks the delete button

    Posted 10-27-2023 11:58
    No replies, thread closed.

    I understand the threading  Web Messaging Timeline value, is an org setting, i wonder is there anyway of disabling this at the individual deployment level?



    ------------------------------
    Shalom Benzaquen
    Elevance Health
    ------------------------------