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 provided HTML in an Overlay View. When successful, it returns back the HTML and a custom close event for you to subscribe to. This alerts you when your overlay instance has been closed. You can also make your overlay immutable so that new overlay instances don't close yours. Only your widget can close its overlay when immutable is set to true.


oMyPlugin.command('Overlay.open', {
	html: '<div>Template</div>',
	immutable: false,
	group: false
	// Overlay opens successfully
	// Overlay failed to open


Option Type Description
html string HTML String template for overlay window.
immutable boolean When set to true, overlay cannot be closed by other plugins.
group string When set to true, overlay cannot be closed by other plugins.


Status When Returns
resolved When overlay is successfully opened {html: <template>, events: <Object>, group: <String>}
rejected When no html template is passed 'No HTML content was provided. Overlay has ignored your command.'
rejected When overlay is already opened 'Overlay view is currently reserved.'


Closes the Overlay UI. Publishes the appropriate custom close event for current overlay being closed.


	// Overlay closed successfully
	// Overlay failed to close


Status When Returns
resolved When Overlay is successfully closed. n/a
rejected When Overlay is already closed. 'Overlay view is already closed'
rejected When Overlay view is immutable. 'Overlay view is currently reserved'

Comment on this article:

blog comments powered by Disqus
This page was last modified on 10 August 2017, at 06:40.