Chat ends unexpectedly

Hi Guys, someone of you had trouble when the chat starts then it finish rapidly, without any interaction between agent and client? I'm using V2 widget, subscribing events log, I can see that client is disconnected before chat is canceled;

if someone has been through this, I will be happy if you can help me with this.

Hello,

Without seeing your logs and config, and knowing if your Widget v2 configuration (PureCloud Admin - Contact Center - Widgets) is linked to an Architect flow or not, it is hard to say.

One possibility, if your chat is established and then released/terminated (by PureCloud platform), and if you have created a Widget v2 configuration linked to an Architect Inbound Chat Flow (via Route to Flow in the Widget configuration), is that your error comes from your Architect flow.

A possible way to check this would be to start your chat using the Developer Tools Web Chat.
If this fails the same way, that would point to the Architect Inbound Chat flow (if you are using one). If not, to the client side widgets v2.0 configuration (html/js of the page exposing the WebChat widgets).

If it fails from the Developer Tools Web Chat, you could edit your Architect Inbound Chat Flow, and right after the Start action, add a "Send Response" (Message Style = Standard). If you then see the sent message in your webchat client, that would point to an error after this.

Regards,

1 Like

Hi Jerome,

Thanks for your help, well, my widget is V2 linked to an architect inbound chat flow, my config is:

window._genesys = {
        widgets: {
          main: {
            lang: 'pt-BR',
            i18n: process.env.NUXT_ENV_WEBCHAT_I18N,
            theme: 'light',
            cookieOptions: {
              secure: true,
              sameSite: 'None'
            }
          },
          webchat: {
            transport: {
              type: process.env.NUXT_ENV_WEBCHAT_TYPE,
              dataURL: process.env.NUXT_ENV_WEBCHAT_DATA_URL,
              deploymentKey: process.env.NUXT_ENV_WEBCHAT_DEPLOYMENT_KEY,
              orgGuid: process.env.NUXT_ENV_WEBCHAT_ORG_GUID,
              interactionData: {
                routing: {
                  targetType: 'QUEUE',
                  targetAddress,
                  priority: 2
                }
              }
            },
            userData
          }
        }
      }

I will try to do what you said in the last paragraph, but in advance, thanks for your help.

Regards,

I assume you didn't copy the full configuration.
I mean targetAddress and userData not being correct like this with no value as posted above. You would need at least something like targetAddress: '' and userData: {}.
Otherwise WebChatService would probably fail to start and you wouldn't be able to get to the Chat Registration Form.

Hi @Jerome.Saint-Marc,

well, I did the right copy, because targetAddress is a parameter received by the function, which can be one of the valid queue options, selected by the user, and userData is an object that contains client information, which is also received by the function.

thanks.

What I meant is that the resulting object (after "targetAddress is a parameter received by the function, which can be one of the valid queue options, selected by the user, and userData is an object that contains client information, which is also received by the function") must be a structure where you have targetAddress: 'something' (attribute name is targetAddress - attribute value is a string) and userData: {firstParam: '1234', secondParam: '5678'} (attribute name is userData - attribute value is an object/dictionary)

Regarding steps for widgets as it is described here: https://developer.mypurecloud.com/api/webchat/widget-version2.html#deploy_the_widget_s_code_snippet
you would first have to load cxbus.min.js
then, set your window._genesys.widgets configuration (in the same page or in a different file - it doesn't matter)
and then load widgets-core

Have you tried to initiate your WebChat from the Developer Tools?
Just to know if your problem comes from your widgets configuration/setup or from your Architect flow.
If you don't have that disconnect behavior when you initiate your chat from the Developer Tools WebChat, then that would point to your widgets configuration (I mean js/html of your web page).
Otherwise to your Architect Chat flow.

You can also check in Chrome Developer Network tab to see what is sent and if there is something failing at one stage.

Regards,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.