Jump to: navigation, search
(Update with the copy of version: 8.5.0)
(Update with the copy of version: draft)
Line 1: Line 1:
 
= Configuration =
 
= Configuration =
 +
__NOTOC__
 
== Description ==
 
== Description ==
 
WebChat and WebChatService share the configuration namespace '_genesys.widgets.webchat'. WebChat has UI options while WebChatService has connection options.
 
WebChat and WebChatService share the configuration namespace '_genesys.widgets.webchat'. WebChat has UI options while WebChatService has connection options.
 +
 
== Example ==
 
== Example ==
 
<pre>
 
<pre>
Line 8: Line 10:
 
apikey: 'n3eNkgLLgLKXREBMYjGm6lygOHHOK8VA',
 
apikey: 'n3eNkgLLgLKXREBMYjGm6lygOHHOK8VA',
 
dataURL: 'https://api.genesyscloud.com/gms-chat/2/chat',
 
dataURL: 'https://api.genesyscloud.com/gms-chat/2/chat',
 +
cometD: false,
 
userData: {},
 
userData: {},
 
emojis: true,
 
emojis: true,
Line 41: Line 44:
 
| apikey
 
| apikey
 
| string
 
| string
| Apigee Proxy secure token
+
| Apigee Proxy secure token.
 
| n/a
 
| n/a
 
| Yes, if using Apigee Proxy
 
| Yes, if using Apigee Proxy
Line 47: Line 50:
 
| endpoint
 
| endpoint
 
| string
 
| string
| Manually select the endpoint to initiate the chat on
+
| Manually select the endpoint to initiate the chat on.
 
| n/a
 
| n/a
 
|  
 
|  
Line 53: Line 56:
 
| dataURL
 
| dataURL
 
| URL String
 
| URL String
| URL of GMS server
+
| URL of GMS server.
 
| n/a
 
| n/a
 
| Always
 
| Always
 +
|-
 +
| cometD
 +
| boolean
 +
| Enable or disable CometD using Websockets or Long-polling.
 +
| false
 +
|
 
|-
 
|-
 
| userData
 
| userData
 
| object
 
| object
| Arbitrary JSON attached data to include when initiating a chat
+
| Arbitrary JSON attached data to include when initiating a chat.
 
| {}
 
| {}
 
|  
 
|  
Line 65: Line 74:
 
| ajaxTimeout
 
| ajaxTimeout
 
| number
 
| number
| Number of milliseconds to wait before AJAX timeout
+
| Number of milliseconds to wait before AJAX timeout.
 
| 3000
 
| 3000
 +
|
 +
|-
 +
| xhrFields
 +
| object
 +
| Allows you to set the properties for the AJAX xhrFields object (for example {withCredentials: false}).
 +
| {withCredentials: false}
 
|  
 
|  
 
|-
 
|-
Line 77: Line 92:
 
| restoreTimeout
 
| restoreTimeout
 
| number
 
| number
| Number of milliseconds before restore timeout. Prevents the chat session from restoring after a certain time away from the session (e.g. user navigated to a different site during chat and never ended the session).
+
| Number of milliseconds before restore timeout. Prevents the chat session from restoring after a certain time away from the session (for example user navigated to a different site during chat and never ended the session).
 
| 60000
 
| 60000
 
|  
 
|  

Revision as of 14:02, August 25, 2017

Configuration

Description

WebChat and WebChatService share the configuration namespace '_genesys.widgets.webchat'. WebChat has UI options while WebChatService has connection options.

Example

window._genesys.widgets.webchat = {

	apikey: 'n3eNkgLLgLKXREBMYjGm6lygOHHOK8VA',
	dataURL: 'https://api.genesyscloud.com/gms-chat/2/chat',
	cometD: false,
	userData: {},
	emojis: true,
	actionsMenu: true,

	autoInvite: {

		enabled: false,
		timeToInviteSeconds: 10,
		inviteTimeoutSeconds: 30
	},

	chatButton: {

		enabled: true,
		template: '<div>CHAT NOW</div>',
		effect: 'fade',
		openDelay: 1000,
		effectDuration: 300,
		hideDuringInvite: true
	}
};

Options

Name Type Description Default Required
apikey string Apigee Proxy secure token. n/a Yes, if using Apigee Proxy
endpoint string Manually select the endpoint to initiate the chat on. n/a
dataURL URL String URL of GMS server. n/a Always
cometD boolean Enable or disable CometD using Websockets or Long-polling. false
userData object Arbitrary JSON attached data to include when initiating a chat. {}
ajaxTimeout number Number of milliseconds to wait before AJAX timeout. 3000
xhrFields object Allows you to set the properties for the AJAX xhrFields object (for example {withCredentials: false}). {withCredentials: false}
pollExceptionLimit number Number of successive poll exceptions (chat server offline) before WebChatService publishes 'chatServerWentOffline'. 5
restoreTimeout number Number of milliseconds before restore timeout. Prevents the chat session from restoring after a certain time away from the session (for example user navigated to a different site during chat and never ended the session). 60000
Comments or questions about this documentation? Contact us for support!