Configuring Genesys Widgets
After you deploy the Genesys Widget on your website, you can override the default configuration by defining new options in the global window._genesys object. Mandatory and optional configuration widget options must be executed before the cx-widget.min.js script is included. To make sure that these config options apply, place the following script inline above the location where cx-widget.min.js script tag is included.
<script>
if(!window._genesys)window._genesys = {};
if(!window._gt)window._gt = [];
window._genesys.cxwidget = {
main: {},
webchat: {},
gwe: {},
cobrowse: {}
};
</script>The following is an example of a custom Chat Widget configuration:
<script>
if(!window._genesys)window._genesys = {};
if(!window._gt)window._gt = {};
window._genesys.cxwidget = {
main: {
theme: "dark",
lang: "en",
i18n: "http://HOST:PORT/path/to/lanaguages/file.json",
customStylesheetID: "genesys_cx_widget_stylesheet"
},
webchat: {
apikey: "0123456789", // Used for Apigee service only
dataURL: "http://HOST:PORT/path/to/chat/service",
userData: {},
proactive: {
enabled: true,
idleTimer: 5,
cancelTimer: 30
},
chatButton: {
enabled: true,
openDelay: 1000,
effectDuration: 300,
hideDuringInvite: true
}
},
gwe: {
httpEndpoint: "",
httpsEndpoint: "",
dslResource: ""
},
cobrowse: {
src: "",
url: ""
}
};
</script>Configuration Options
apikey
Type: string
Default: none
Requirement: Optional
Description: For customers utilizing the secure Apigee proxy, they must provide the apikey value to connect. The apikey is provided by Genesys.
dataURL
Type: string
Default: none
Requirement: Mandatory
Description: A fully qualified web URL to your Genesys Mobile Services API (GMS). Please consult to person in charge of your Genesys environment.
userData
Type: object
Default: none
Requirement: Optional
Description: An object to pass arbitrary page-specific, product-specific, user-specific values to assist with tracking and routing chats.
proactive
Type: object
Default: none
Requirement: Optional
Description: The Chat Widget comes with a basic proactive engagement invitation system that uses user input idle tracking.
proactive.enabled
Type: boolean
Default: false (disabled)
Requirement: Optional
Description: Enable or disable proactive engagement chat invitations.
proactive.idleTimer
Type: integer (seconds)
Default: 5
Requirement: Optional
Description: The number of seconds the user must be idle —not using mouse or keyboard— before a chat invite appears.
proactive.cancelTimer
Type: integer (seconds)
Default: 30
Requirement: Optional
Description: The number of seconds before the chat invitation automatically closes if the user does not accept or decline the invitation.
chatButton
Type: object
Default: none
Requirement: Optional
Description: Configure the built-in chat button to initate a chat
chatButton.enabled
Type: boolean
Default: false (disabled)
Requirement: Optional
Description: Enable or disable the built-in chat button
chatButton.openDelay
Type: integer (milliseconds)
Default: 1000
Requirement: Optional
Description: Delay in milliseconds before the chat button will appear upon loading the page or after closing the chat widget
chatButton.effectDuration
Type: integer (milliseconds)
Default: 300
Requirement: Optional
Description: Duration in milliseconds of the show and hide animation effects
chatButton.hideDuringInvite
Type: boolean
Default: false (always show)
Requirement: Optional
Description: Hide the chat button when the chat invite view is open
gwe
Type: object
Default: none
Requirement: Optional
Description: Configure the Genesys Web Engagement implementation for CX Widget
gwe.httpEndpoint
Type: string (url)
Default: none
Requirement: Optional
Description: URL to web engagement service (HTTP)
gwe.httpsEndpoint
Type: string (url)
Default: none
Requirement: Optional
Description: URL to web engagement service (HTTPS)
gwe.dslResource
Type: string (url)
Default: none
Requirement: Required
Description: Monitoring rules file (XML). See more here
cobrowse
Type: object
Default: none
Requirement: Optional
Description: Configure the Genesys Co-browse implementation for CX Widget
cobrowse.url
Type: string (url)
Default: none
Requirement: Required
Description: URL to Genesys Co-browse service (HTTP)
cobrowse.src
Type: string (url)
Default: none
Requirement: Required
Description: URL to the Co-browse javascript library (hosted on Co-browse server)
Can I modify the Chat Registration Form?
The Chat Registration Form does not currently support modifications. To implement a custom chat registration, you must create your own form, and then use the Widget Bus API to launch the actual Chat Widget with your custom user data, thus bypassing the default Chat Registration Form.
