Jump to: navigation, search

API Commands

Once you've registered your own plugin on the bus, you can call commands on other registered plugins. Below we'll quickly register a new plugin on the bus using the global bus object.

The global bus object is a debug tool. When implementing Widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see Widgets Extensions for more information about extending Genesys Widgets.

var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');


Opens the Engage Widget and renders the text based on the options provided. If no options are provided, it will not open.


oMyPlugin.command('Engage.invite', {
	'title':'Engagement Title',
	'body':'Engagement invite body content',
	'decline':'No, thanks',
	'command': 'WebChat.open',
	'options':{'proactive'; true, 'userData': {'category': 'shoes'}}
	'title':'Engagement Title',
	'body':'Engagement invite body content',
	'decline':'No, thanks'
	// Act upon the received response code 
	case 'accepted':oMyPlugin.command('WebChat.open'); 
	case 'declined': break;
	case 'closed': break;
	case 'timeout': break;


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.


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
This page was last modified on December 21, 2018, at 05:15.


Comment on this article:

blog comments powered by Disqus