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');



Internal use only. The main App plugin shares configuration settings to widgets using each widget’s configure command. The configure command can only be called once at startup. Calling configure again after startup may result in unpredictable behavior.


Opens the ClickToCall UI.


oMyPlugin.command('ClickToCall.open', {

	userData: {},
	form: {

		autoSubmit: false,
		firstname: 'John',
		lastname: 'Smith',
		phonenumber: 9256349345
	formJSON: {...}


	// ClickToCall opened successfully


	// ClickToCall failed to open


Option Type Description
form string Object containing form data to prefill the ClickToCall form and optionally auto-submit the form.
form.autoSubmit boolean Automatically submit the ClickToCall form.
form.firstname string Value for the first name input entry field.
form.lastname string Value for the last input name entry field.
form.phonenumber number Value for the phone number input entry field.
formJSON object A JSON object containing a custom registration form definition. See Customizable ClickToCall Registration Form
userData object Arbitrary data that is attached with ClickToCall form submit request. Properties defined here are merged with default userData set in the configuration object.


Status When Returns
resolved When ClickToCall is successfully opened n/a
rejected When ClickToCall is already open 'already opened'


Closes the ClickToCall UI.



	// ClickToCall closed successfully


	// ClickToCall is already closed


Status When Returns
resolved When ClickToCall is successfully closed n/a
rejected When ClickToCall is already closed 'already closed'


Minimize or unminimize ClickToCall UI.



	// ClickToCall minimized successfully


	// ClickToCall ignores command


Status When Returns
resolved Always n/a
rejected Never n/a
This page was last edited on May 11, 2018, at 12:35.
Comments or questions about this documentation? Contact us for support!