Engage
Learn how to use the Genesys Engage plugin to integrate any Engage solution with Genesys Widgets.
Overview
The Genesys Engage plugin can integrate any Engage solution with Genesys Widgets. This plugin is generic and contains commands that automate engagement within Widgets.
Configuration
The Genesys Engage plugin doesn't have any configuration options.
Localization
The Genesys Engage plugin doesn't have any localization options.
API Commands
Once you've registered your plugin on the bus, you can call commands on other registered plugins. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.command('Engage.invite');
invite
Opens the Engage Widget and renders the text based on the options provided. If no options are provided, it doesn't open.
Example
oMyPlugin.command('Engage.invite', {
'type':'toast',
'timeout':3000,
'title':'Engagement Title',
'body':'Engagement invite body content',
'accept':'Yes',
'decline':'No, thanks',
'command': 'WebChat.open',
'options':{'proactive'; true, 'userData': {'category': 'shoes'}}
});
oMyPlugin.command('Engage.invite',{
'type':'toast',
'timeout':3000,
'title':'Engagement Title',
'body':'Engagement invite body content',
'accept':'Yes',
'decline':'No, thanks'
}).done(function(response){
// Act upon the received response code
switch(response){
case 'accepted':oMyPlugin.command('WebChat.open');
break;
case 'declined': break;
case 'closed': break;
case 'timeout': break;
}
});
Options
Option | Type | Description |
---|---|---|
type | string | Widget display type. |
timeout | number | Timeout integer in milliseconds. |
title | string | String for widget title. |
body | string | String for offer body text. |
accept | string | String for Accept button text. |
decline | string | String for Decline button text. |
command | string | Command to execute. |
options | object | Options related to the command provided. |
Resolutions
Status | When | Returns |
---|---|---|
resolved | When engage invite is accepted by user. | accepted |
resolved | When engage invite is declined by user. | declined |
resolved | When engage invite widget is closed by user. | closed |
resolved | When engage invite widget closes due to timeout. | timeout |
API Events
Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.subscribe('KnowledgeCenterService.ready', function(e){ /* sample code */ };
Name | Description | Data |
---|---|---|
ready | The KnowledgeCenterService widget is loaded. | n/a |
online | The KnowledgeCenterService widget is configured and ready to execute requests. | n/a |
sessionChanged | The session started or one of its parameters had changed. | {sessionId: (string), language: (string), media: (string), customer: (string)} |
noResultsFound | Search did not return results or results are empty | {query: (string), language: (string), media: (string), knowledgebases: (list of string), sessionId: (string), tenantId: (string)} |
documentOpened | Full document content has been requested | {language: (string), knowledgebase: (string), sessionId: (string), tenantId: (string), documentId: (string), document: (object)} |
searched | Query has been searched and results provided | {query: (string), language: (string), media: (string), knowledgebases: (list of strings), sessionId: (string), documents: (list of objects)} |
suggested | Autocomplete queries have been suggested | {language: (string), sessionId: (string), tenantId: (string), query: (string), categories: (list of objects), filters: (object), media: (string), knowledgebases: (list of strings)} |
voted | Relevancy feedback has been provided for the search result | {language: (string), sessionId: (string), tenantId: (string), relevant: (boolean), knowledgebase: (string), documentId: (string)} |