Jump to: navigation, search

Genesys Widgets Deployment Guide

The latest version of our documentation (titled “Current”) relates to release 9.0.x.

This guide provides the steps required to instrument your website with Genesys Widgets.

As of release Genesys Widgets is no longer available to download through the Genesys Downloads Center. Instead, it can be downloaded as a zip file from the Content Delivery Network (CDN).


This document is for website developers who are in charge of website code. You must have knowledge of HTML, JavaScript, and CSS.


Genesys Widgets uses cookies to store non-sensitive data in the browser. These cookies are used to restore a chat session, to track the state of the UI, to store a user's decision, and more. The end-user's browser must allow cookies for Genesys Widgets to operate properly.

No personally identifiable information (PII) is ever stored in cookies, local storage, or session storage by Genesys Widgets.


Normally, cookies cannot be transferred between sub-domains of a website unless they are configured to do so. Genesys Widgets automatically detects the domain of the host site and configures all cookies to be transferable between sub-domains. For example, you could start a chat on www.testsite.com and restore that chat session on store.testsite.com, support.testsite.com, or portal.testsite.com.

Cookie Support in Test Environments

Genesys Widgets uses special cookies that persist across sub-domains. This is a critical feature for plugins like WebChat that need to restore an active chat session while navigating around a website. The side effect of using this type of cookie is they won't work when using test environment domain names such as "localhost" or an IP address. You must use a fully-qualified domain name (FQDN) such as "localhost.com" or any other variant that can be identified as a domain name. Cookies will also fail to work if you run the test site as an HTML file path directly in the browser.

One workaround is to update your system's hosts file to create an FQDN alias for "localhost", your test environment's name, or an IP address.

Example       localhost       localhost.com

Starting version, a fully-qualified domain name (FQDN) such as "localhost.com" or any other variant that can be identified as a domain name is not mandatory but recommended. These cookies will also work when using test environment domain names such as "localhost" or an IP address.

How Can I Deploy Genesys Widgets?

We support two deployment methods:

  • Lazy loading—Lazy loading breaks the JavaScript bundle apart into individual plugin files and loads them into the page only as you need them. This is the preferred method of deploying Genesys Widgets.
  • All-In-One—The All-In-One method is the deprecated method of deploying Genesys Widgets. In this method, you have one JavaScript file and one CSS file that contain all plugins and resources.

Deploying Genesys Widgets (Lazy loading)

Files Used

  • widgets/cxbus.min.js
  • widgets/plugins/widgets-core.min.js
  • widgets/plugins/*.*

A good starting point is the following script:

<script src="widgets/cxbus.min.js" onload="javascript:CXBus.configure({debug:true,pluginsPath:'build/plugins/'});CXBus.loadFile('path/to/widgets.config.js').done(function(){CXBus.loadPlugin('widgets-core')});"></script>

This script does the following:

  1. Loads cxbus.min.js. This makes the global CXBus instance available.
  2. Configures CXBus to turn on debug logging and set the path to the Widgets plugin folder.
  3. Load your configuration file, widgets.config.js. (This is an imaginary file. You must create it).
  4. Loads widgets-core, the core Genesys Widgets library.

Use this script as a starting point and customize it as needed.

Remember that your configuration can be defined inline on the page or loaded in as a separate file (as shown in this script).

Whichever method you choose, you must ensure your configuration is in the page before you load widgets-core. Otherwise, widgets-core cannot read the configuration.
Refer to this article for help configuring Genesys Widgets.

On-Demand Lazy loading

Genesys Widgets is designed to load plugins into the page on-demand as you use the product. For example, if you call the command WebChat.open, CXBus fetches the webchat.min.js plugin from the plugins/ folder and loads it into the page. Any WebChat command triggers it to load. Likewise, WebChat calls WebChatService commands, thus CXBus loads webchatservice.min.js into the page as well.

Preloading Plugins

In some cases, you might not want to load plugins on-demand, or the demand is to load them at startup. A good example is SideBar. You probably want this plugin to appear on the screen immediately so the customer can use it. To make this possible, you can specify which plugins you want to preload at startup in your configuration.

    _genesys.widgets.main.preload = [


You may specify as many plugins as you want in the preload list. The plugins load in order after you load Widgets Core.

All plugin names are lower-case. Please refer to the file names in the plugins/ folder. For example, to preload webchat.min.js, specify webchat, the first part of the file name.

You may find other plugins or features of plugins that necessitate preloading.

Deploying Genesys Widgets (All-in-One)

Files Used

  • widgets/widgets.min.css
  • widgets/widgets.min.js

A good starting point is the following script:

<script src-"widgets/widgets.config.js"></script>
<script src="widgets/widgets.min.js"></script>
<link id="genesys-widgets-styles" href="http://www.yourhost.com/path/to/widgets.min.css" type="text/css" rel="stylesheet"/>

First, you must define your configuration for Genesys Widgets. You can do this inline on the page by using a script tag, or you can store it in a separate file and load it in before widgets.min.js. In the script example above, we assume your configuration is stored in another file. You must create the widgets.config.js file for this script to function properly.

Whichever method you choose, you must ensure your configuration is in the page before you load widgets.min.js. Otherwise, widgets.min.js cannot read the configuration.
Refer to this article for help configuring Genesys Widgets.

Alternative Deployment Script

To simplify the deployment process while using tools like Google Tag Manager, you can use below script to embed Widgets.

    var widgetBaseUrl = 'https://apps.mypurecloud.ie/widgets/9.0/',
        widgetScriptElement = document.createElement('script');
    widgetScriptElement.setAttribute('src', widgetBaseUrl + 'cxbus.min.js');

    widgetScriptElement.addEventListener('load', function () {
       CXBus.configure({debug: false, pluginsPath: widgetBaseUrl + 'plugins/'});


Releases hosted on Content Delivery Network (CDN)

As announced in version, customers must migrate to new CDN URLs, as the legacy URLs at app.genesys.cloud are now disabled, and will not be kept up to date with any later versions.

Genesys Widgets are now available over CDN, providing optimized load times and instant access to new releases.


Note that <version> and <filename> are placeholders.


This value varies based on the deployment method you choose. Please refer to deployment section for more details.

In the case where a CDN URL that you are trying to access is not found, it means that either the release or the file you are looking for, is not yet available.


version can take one of the following 3 values.

  • 9.0 - (Major) - A version that is company-wide or
  • 9.0.xxx - (Major).(Minor) - Minor version is product specific and is tied to each Widget’s iteration or
  • 9.0.xxx.xx - (Major).(Minor).(Release candidate) - Specific release version

For all the available released versions, refer to the Genesys Widgets Releases Notes.

Choose Region

Widgets is available in a number of regions worldwide as shown below. Choose the nearest or appropriate region URL based on where you are located.

Region URL
North America (East) https://apps.mypurecloud.com/widgets/{version}/{path/to/file}
North America (West) https://apps.usw2.pure.cloud/widgets/{version}/{path/to/file}
North America (Canada) https://apps.cac1.pure.cloud/widgets/{version}/{path/to/file}
Australia or New Zealand https://apps.mypurecloud.com.au/widgets/{version}/{path/to/file}
EU (Ireland) https://apps.mypurecloud.ie/widgets/{version}/{path/to/file}
EU (Frankfurt) https://apps.mypurecloud.de/widgets/{version}/{path/to/file}
UK (London) https://apps.euw2.pure.cloud/widgets/{version}/{path/to/file}
Japan https://apps.mypurecloud.jp/widgets/{version}/{path/to/file}
Mumbai https://apps.aps1.pure.cloud/widgets/{version}/{path/to/file}
Seoul https://apps.apne2.pure.cloud/widgets/{version}/{path/to/file}

Using Genesys Widgets CDN with versions

Starting in the release, all the released versions are accessible from the Genesys CDN URL. The sections below explain how to access the latest available released version or a specific released version using Genesys CDN.

To get the latest released version under the 9.0 family:


To get the last available released version under a specific (Major).(Minor) version (this also includes any hot fixes for that release):


Example: https://apps.mypurecloud.com/widgets/9.0.006/widgets.min.js

To get a specific release/hot-fix version:


Example: https://apps.mypurecloud.com/widgets/

Note that all older versions of Genesys Widgets may not be available in the CDN. All the released versions are available only starting with the version.

Versioning examples with scenarios

When a new release version comes out, it is available under all the 3 different CDN URLs below. In this example, if is the first ever release announced, then it is available under the following CDN URLs.

  • /9.0/
  • /9.0.006/
  • /

When is released, it is available under /9.0/ but not under /9.0.006/ or / Instead, /9.0.007/ and / CDN URLs are created and this release is available under them:

  • /9.0/
  • /9.0.007/
  • /

If a hot fix (such as is released after is released, then the hot fix is available under the following CDN URLs:

  • /9.0.006/
  • /

If a hot fix (such as is released before announcing any new release, then it is available under the following CDN URLs:

  • /9.0/
  • /9.0.007/
  • /

Deployment Methods

Lazy loading

Recommended approach: When using the lazy loading method, the base Genesys CDN URL must be prefixed in the lazy loading deployment script. The <filenames> value is not needed in this scenario because they are auto-loaded from the base CDN configured. Here is what the deployment script looks like when using release:

<script src="https://apps.mypurecloud.com/widgets/" onload="javascript:CXBus.configure({debug:true,pluginsPath:'https://apps.mypurecloud.com/widgets/'});CXBus.loadFile('path/to/widgets.config.js').done(function(){CXBus.loadPlugin('widgets-core')});"></script>


Legacy approach (deprecated): When using the all-in-one deployment method, the values are the files mentioned in the All-In-One section. For example, if you would like to use widgets.min.js and widgets.min.css under release, CDN URLs will look like this:

Lazy loading is the recommended method for Widgets. The (All-In-One) method is deprecated.

Checking Widgets Version

At any point of time after deploying Widgets, the version used can be easily determined using one of the below scripts.


Prints out the debug header with version info.


Returns the version number directly, as a string.

Download a version

As of release, Genesys Widgets is no longer available to download through the Genesys Downloads Center. Instead, it can be downloaded as a zip file from the Content Delivery Network (CDN).

You can download the latest released version under the 9.0 family here: https://apps.mypurecloud.com/widgets/9.0/dist.zip.

To download a specific version, simply change the version in the above URL to the desired version. The version here takes the same pattern as described above in the Versioning examples with scenarios section.

Genesys Web Fonts

Google Fonts are now hosted in Genesys Infrastructure. Please Choose the nearest or appropriate region URL based on where you are located and configure it through the googleFontUrl option.

By default, Genesys web fonts are loaded from the North America (East) region.
Region URL
North America (East) https://apps.mypurecloud.com/webfonts/roboto.css
North America (West) https://apps.usw2.pure.cloud/webfonts/roboto.css
North America (Canada) https://apps.cac1.pure.cloud/webfonts/roboto.css
Australia or New Zealand https://apps.mypurecloud.com.au/webfonts/roboto.css
EU (Ireland) https://apps.mypurecloud.ie/webfonts/roboto.css
EU (Frankfurt) https://apps.mypurecloud.de/webfonts/roboto.css
UK (London) https://apps.euw2.pure.cloud/webfonts/roboto.css
Japan https://apps.mypurecloud.jp/webfonts/roboto.css
Mumbai https://apps.aps1.pure.cloud/webfonts/roboto.css
Seoul https://apps.apne2.pure.cloud/webfonts/roboto.css
This page was last edited on June 9, 2022, at 14:18.
Comments or questions about this documentation? Contact us for support!