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
}
};