" /> Chat widget could not initial - Genesys CTI User Forum

Author Topic: Chat widget could not initial  (Read 4159 times)

Offline joker

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Chat widget could not initial
« on: October 10, 2017, 07:30:08 AM »
Advertisement
Hello guys,

I have deployed GMS service and I have determined some its services: request-chat, request-interaction, ...
After that, I try to use chat widget with [code]url:gmsserver:8080/genesys/1/service/request-chat[/code].
When I click to start chat, nothing is happend, from my wireshark trace, I see 200 ok from gmsserver returns to widget machine but session could not start. From my poitn of view, chat widget just support by chat API version 2 right?.
Meaning right url is : [code]http://10.56.237.76:8080/genesys/2/service/request-chat[/code].
But I server returns not found with above url. Please give me some advices.
Thank everyone so much!


Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Chat widget could not initial
« Reply #1 on: October 10, 2017, 07:44:59 AM »
Try to describe or post your chat services configuration and also the GMS log covering the issue. Also, double check the Genesys Widget configuration.

Offline joker

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Chat widget could not initial
« Reply #2 on: October 10, 2017, 08:13:39 AM »
Hello Kubig,

My issue now is I can not start chat session by chat widget. Firstly, As I know, after extract widget package, you can try to use widget functionality by the way insert url : <gms_server>:8080/geneys/2/service/<chat service name>.
Is this the right point?
[code]15:07:08.836 Dbg 09900  [qtp2032977625-25] [SESSION] Session created at 2017-10-10 and session is d3d4xp2ezrsm1n1pnxtodjvg
15:10:09.152 Dbg 09900  [qtp2032977625-23] [SESSION] Session created at 2017-10-10 and session is uds1gfh6q3td11lpf8ppho3pe
15:11:08.063 Dbg 09900  [qtp2032977625-25] [SESSION] Session created at 2017-10-10 and session is 19p5tsszq4ho71s1xvpu21anfj
15:11:08.079 Dbg 09900  [qtp2032977625-25] (POST) Client IP Address: 172.16.1.23, URI:http://172.16.1.24:8080/genesys/1/service/request-chat/, Params: KVList:
'lastName' [str] = "test"
'text' [str] = ""
'userData[_genesys_OS]' [str] = "Windows"
'nickname' [str] = ""
'alias' [str] = ""
'userData[_genesys_pageTitle]' [str] = "Widgets Project"
'userData[_genesys_browser]' [str] = "Firefox"
'subject' [str] = "nothing"
'userData[_genesys_source]' [str] = "web"
'emailAddress' [str] = "testgms@gmail.com"
'secureKey' [str] = ""
'userData[_genesys_url]' [str] = "file:///C:/Users/Administrator/Desktop/Genesys_Widgets_G313_8500300_ENU_ISO/G313_8500300_ENU/solution_specific/Widgets/data/widgets/launcher.html"
'userId' [str] = ""
'userData[_genesys_referrer]' [str] = ""
'firstName' [str] = "test"
15:11:08.141 Trc 09900  [qtp2032977625-25] >>>Create service: [name=request-chat]
15:11:08.141 Dbg 09900  [qtp2032977625-25] ttl: 3600, userdata id: 247-377084a0-059d-4c36-842e-142e7f2fc2f4
15:11:08.141 Dbg 09900  [qtp2032977625-25] _client_timeout option is not defined in chat service section
15:11:08.141 Dbg 09900  [qtp2032977625-25] _client_timeout option is not defined in chat section
15:11:08.141 Dbg 09900  [qtp2032977625-25] Chat Client Timeout set to 900
15:11:08.141 Dbg 09900  [qtp2032977625-25] _client_timeout_notification is not defined in chat service section
15:11:08.141 Dbg 09900  [qtp2032977625-25] _client_timeout_notification option is not defined in chat section
15:11:08.141 Dbg 09900  [qtp2032977625-25] Chat Client Notification Timeout set to 90
15:11:08.157 Trc 09900  [qtp2032977625-25] <<<Create service result: {_id=d0547a61-907f-4881-b1dc-2d1caaed7e6f}
15:11:15.681 Dbg 09900  [qtp2032977625-22] [SESSION] Session created at 2017-10-10 and session is iwdfn429wppl1se3vuiwnttwk
15:11:15.681 Dbg 09900  [qtp2032977625-22] (POST) Client IP Address: 172.16.1.23, URI:http://172.16.1.24:8080/genesys/1/service/request-chat/, Params: KVList:
'lastName' [str] = "test"
'text' [str] = ""
'userData[_genesys_OS]' [str] = "Windows"
'nickname' [str] = ""
'alias' [str] = ""
'userData[_genesys_pageTitle]' [str] = "Widgets Project"
'userData[_genesys_browser]' [str] = "Firefox"
'subject' [str] = "nothing"
'userData[_genesys_source]' [str] = "web"
'emailAddress' [str] = "testgms@gmail.com"
'secureKey' [str] = ""
'userData[_genesys_url]' [str] = "file:///C:/Users/Administrator/Desktop/Genesys_Widgets_G313_8500300_ENU_ISO/G313_8500300_ENU/solution_specific/Widgets/data/widgets/launcher.html"
'userId' [str] = ""
'userData[_genesys_referrer]' [str] = ""
'firstName' [str] = "test"
15:11:15.697 Trc 09900  [qtp2032977625-22] >>>Create service: [name=request-chat]
15:11:15.697 Dbg 09900  [qtp2032977625-22] ttl: 3600, userdata id: 247-3793b1a8-e87a-466b-9680-0211cae3f4fd
15:11:15.697 Dbg 09900  [qtp2032977625-22] _client_timeout option is not defined in chat service section
15:11:15.697 Dbg 09900  [qtp2032977625-22] _client_timeout option is not defined in chat section
15:11:15.697 Dbg 09900  [qtp2032977625-22] Chat Client Timeout set to 900
15:11:15.697 Dbg 09900  [qtp2032977625-22] _client_timeout_notification is not defined in chat service section
15:11:15.697 Dbg 09900  [qtp2032977625-22] _client_timeout_notification option is not defined in chat section
15:11:15.697 Dbg 09900  [qtp2032977625-22] Chat Client Notification Timeout set to 90
15:11:15.697 Trc 09900  [qtp2032977625-22] <<<Create service result: {_id=88751e05-35bd-4ecf-b7ae-0e2fd1c2f383}
15:11:44.433 Dbg 09900  [pool-1-thread-1] BusinessAttributesValues have been changed, notifying observers[/code]
Above is gms log!
Do you have any suggestion?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Chat widget could not initial
« Reply #3 on: October 10, 2017, 11:36:24 AM »
It seems the GMS did not answer on request chat. Please, post your service configuration for request-chat from GMS UI.

Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Chat widget could not initial
« Reply #4 on: October 10, 2017, 08:51:45 PM »
Do you have latest gms, chat server and widgets? I did it today and it works fine.

Odoslané z D5803 pomocou Tapatalku


Offline joker

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Chat widget could not initial
« Reply #5 on: October 11, 2017, 01:38:23 AM »
Hello RobertH,

What version of componets have you used? Besides, pls tell me know what's service you configure on GMS? "request-chat"?
And exact url: http://<gmsserver>:<port>/genesys/1/service/request-chat?

Thank you!

Offline joker

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Chat widget could not initial
« Reply #6 on: October 11, 2017, 04:04:54 AM »
Hello guys,

I created new service called "chat.mychat" in section of GMS with option: Environment:default. Besides, I add an option "default:Chat inbound queue". However, when I try http://<gms>:8080/genesys/2/chat/mychat; but the method still can not allowed :(.

Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Chat widget could not initial
« Reply #7 on: October 12, 2017, 06:23:44 AM »
[quote author=joker link=topic=10672.msg48472#msg48472 date=1507694694]
Hello guys,

I created new service called "chat.mychat" in section of GMS with option: Environment:default. Besides, I add an option "default:Chat inbound queue". However, when I try http://<gms>:8080/genesys/2/chat/mychat; but the method still can not allowed :(.
[/quote]
Hi guys, I did just what has been written in dep guide and dev guide. Deployed gms and configures section chat.service-name with builtin request-chat service. Then used postman to verify whether it works. I did use api version 2. So url is genesys/2/chat/service-name. But I can double check when I will be in office. Robert

Odoslané z D5803 pomocou Tapatalku


Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Chat widget could not initial
« Reply #8 on: October 12, 2017, 08:35:22 AM »
Agree with RobertH, just follow the dep guide steps.

In short, you have to do following:

[list]
[li]Configure chat service on GMS level (API V2) - for example chat.customer-chat[/li]
[li]Implement CSS and JS file into your websites to allow Genesys Widget[/li]
[li]Configure Genesys Widget's parameters within web page source code - options like dataURL (pointing to the created service above), theme, etc.[/li]
[/list]

To get the right format for Genesys Widget configuration, you can use embedded "launcher" webapp.

HTH!

Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Chat widget could not initial
« Reply #9 on: October 13, 2017, 11:11:31 AM »
Hi

I had chance to check my config finally. Below are details about service setting and sample widget application with Widget Chat enabled. There is not much coding to be done. Just read the documentation carefully and follow the steps.

as I told previously use POST man to verify whether your chat configuration is correct.  For me this POST request created interaction successfully (change host port to yours):
http://<host>:<port>/genesys/2/chat/request-chat?nickname=RoboH&firstName=Robo&lastName=H&subject=Test&emailAddress=rh@test.com

Response:
{
    "messages": [
        {
            "from": {
                "nickname": "RoboH",
                "participantId": 1,
                "type": "Client"
            },
            "index": 1,
            "type": "ParticipantJoined",
            "utcTime": 1507896457000
        }
    ],
    "chatEnded": false,
    "statusCode": 0,
    "alias": "146",
    "secureKey": "3171da1c85953d90d20d",
    "userId": "009259E0AC890001",
    "chatId": "0002HaCX19K2000K",
    "nextPosition": 2
}

br
Robert

---- Code Here ----

[b]GMS setting[/b]

[chat.request-chat]
_chat_endpoint=Environment:default
_service=request-chat
_ttl=3600
_type=builtin

[b]Widget code:[/b]
index.html
<!DOCTYPE html>
<html>
<head>
<link id="genesys-widgets-styles" href="css/widgets.min.css" type="text/css" rel="stylesheet"/>
<script id="genesys-widgets-script" src="js/jquery.min.js"></script>
<!-- my widget code here start -->
<script id="genesys-widgets-script" src="js/chat_sidebtn.js"></script>
<!-- my widget code here end -->
<script id="genesys-widgets-script" src="js/gw/widgets.min.js"></script>
</head>

<body>
<p> Test genesys Widgets </p>
</body>

chat_sidebtn.js:
if(!window._genesys)window._genesys = {};
if(!window._gt)window._gt = [];

    window._genesys.widgets = {
        main: {
theme: "dark",
lang: "en",
plugins: [
                                "cx-webchat-service",
"cx-webchat"
],
mobileMode: 'auto',
mobileModeBreakpoint: 600
}
}

window._genesys.widgets.webchat = {
apikey: "",
        dataURL: "http://<gms-host>:<gms-port>/genesys/2/chat/request-chat",
        userData: {},
        proactive: {
            enabled: false,
            idleTimer: 5,
            cancelTimer: 30
        },
        chatButton: {
            enabled: true,
template: false,
            openDelay: 1000,
            effectDuration: 300,
            hideDuringInvite: true
}
};
« Last Edit: October 13, 2017, 11:19:03 AM by RobertH »

Offline joker

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Chat widget could not initial
« Reply #10 on: October 22, 2017, 02:00:50 PM »
Hi Robik,

Thank you about your reply. I have done on my chat widget production. However, I have some problems with integration chat widget via F5 LoadBalancing. Have you got any experience on that case?

Thank you!

TinNT

Offline RobertH

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 1
Re: Chat widget could not initial
« Reply #11 on: October 23, 2017, 12:03:39 PM »
No sorry, you need F5 expert.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Chat widget could not initial
« Reply #12 on: October 23, 2017, 12:10:50 PM »
What's the problem while using F5 - try to be more specific in your issue

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Chat widget could not initial
« Reply #13 on: October 23, 2017, 06:50:51 PM »
GMS deployment guide has an example on how to load balance between nodes using HAProxy: https://docs.genesys.com/Documentation/GMS/8.5.1/Deployment/ConfiguringandStartingaCluster#Load_Balancing_Between_GMS_Instances

It also has example for Apache Load Balancer: https://docs.genesys.com/Documentation/GMS/latest/Deployment/ConfiguringApacheLoadBalancer


You can use those as references to adapt the configuration for your F5 Balancer.