Revision as of 18:56, January 22, 2016 by KrisMcG (talk | contribs) (Configuring Genesys Widgets)
Jump to: navigation, search

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

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.

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.

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.

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.

Comments or questions about this documentation? Contact us for support!