Embedding Webchat widget v2 in a website

In order to integrate the widget in the website, we need to add some configuration.

window._genesys = {
widgets: {
webchat: {
transport: {
type: 'purecloud-v2-sockets',
dataURL: 'https://api.mypurecloud.com', // replace with API URL matching your region
deploymentKey : 'YOUR_DEPLOYMENTKEY_HERE', // replace with your Deployment ID
orgGuid : 'YOUR_ORGGUID_HERE', // replace with your Organization ID
interactionData: {
routing: {
targetType: 'QUEUE',
targetAddress: 'YOUR_QUEUENAME_HERE',
priority: 2
}
}
}
}
}
};

and use the following script tag:

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

What are https://api.mypurecloud.com and https://apps.mypurecloud.com used for?

Hello,

https://apps.mypurecloud.com (or apps.mypurecloud.ie, apps.mypurecloud.de, ... - depending on your Genesys Cloud region) is the url/path to the Genesys Widgets libraries, hosted on Content Delivery Network (CDN).
You can host the widgets libraries wherever you want: on your own web server, on Genesys CDN, ...
For information on Genesys Widgets hosted on Genesys CDN.

https://api.mypurecloud.com (for dataUrl in widgets configuration - or api.mypurecloud.ie, api.mypurecloud.de, ... - depending on your Genesys Cloud region) is for the Web Chat protocol and connectivity.
It is the API Server (url/path) for Guest Chat API requests.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.