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.

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

oMyPlugin.command('ChatDeflection.enable');

configure

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.

Example

oMyPlugin.command('ChatDeflection.configure', {

	enable: true,
	agentTranscript: 'readable'

}).done(function(e){

	// ChatDeflection configured successfully

}).fail(function(e){

	// ChatDeflection failed to confugure
});


Options

Option Type Description
enable boolean Enables/disables chat deflection functionality. Can be changed programmatically using enable/disable commands of the widget.
agentTranscript string Defines how the Knowledge Center responses will be stored in chat transcript.


Resolutions

Status When Returns
resolved When configuration options are provided and set n/a
rejected When no configuration options are provided 'Invalid configuration'

enable

Enable chat deflection

Example

oMyPlugin.command('ChatDeflection.enable').done(function(e){

	// ChatDeflection enabled successfully

}).fail(function(e){

	// ChatDeflection failed to be enabled
});


Resolutions

Status When Returns
resolved Chat deflection has been enabled n/a

disable

Disable chat deflection

Example

oMyPlugin.command('ChatDeflection.disable').done(function(e){

	// ChatDeflection disabled successfully

}).fail(function(e){

	// ChatDeflection failed to be disabled
});


Resolutions

Status When Returns
resolved Chat deflection has been disabled n/a
This page was last edited on December 22, 2017, at 18:42.
Comments or questions about this documentation? Contact us for support!