Genesys Cloud - Main

 View Only

Sign Up

WebChatService updateUserData after session has started.

  Thread closed by the administrator, not accepting new replies.
  • 1.  WebChatService updateUserData after session has started.

    Posted 07-21-2020 23:26
    No replies, thread closed.
    Hi community,

    I am trying to achieve a relatively simple task: I want to update userdata after the chat session has started.

    Example, I have implemented the following:
    customPlugin.subscribe("WebChatService.started"function (e) {
        ...

        customPlugin.command("WebChatService.updateUserData", {startLocation: "some_value"})
            .done(() => console.log("User Data successfully updated."))
            .fail(() => console.log("User Data not updated."));
        // console.log(window._genesys.widgets.webchat.userData.location);

        ...
    });

    The above gives me the following error: 
    Error (WebChatService.updateUserData): This transport doesn't support updating userData during an active chat session.

    Not being able to update userdata after a session has started is relatively limiting, and I was wondering if there was a workaround.

    Regards,
    Aurelien

    #Implementation

    ------------------------------
    Aurelien Plancque
    Cigna New Zealand
    ------------------------------