This page was last edited on March 7, 2018, at 19:39.
Comments or questions about this documentation? Contact us for support!
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.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.command('GWE.getIDs');
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.
oMyPlugin.command('GWE.configure', {
httpEndpoint: 'http://localhost:8080/foo/bar',
httpsEndpoint: 'https://localhost:8080/foo/bart'
}).done(function(e){
// GWE configured successfully
}).fail(function(e){
// GWE wasn't configured properly
});
Option | Type | Description |
---|---|---|
httpEndpoint | string | URL/Path to the GWE server over standard HTTP |
httpsEndpoint | string | URL/Path to the GWE server over secure HTTPS |
Status | When | Returns |
---|---|---|
resolved | When configuration options are provided and set | n/a |
rejected | When no configuration options are provided | 'Invalid configuration' |
Return Ids of Web Engagement items
oMyPlugin.command('GWE.getIDs').done(function(e){
// GWE got IDs successfully
}).fail(function(e){
// GWE did not get IDs
});
Status | When | Returns |
---|---|---|
resolved | When IDs are valid or if they are available. | Array of IDs or nothing |
Show an invitation using the Toaster popup element.
oMyPlugin.command('GWE.invite', {
container: {},
content: 'content of view'
}).done(function(e){
// GWE showed invite successfully
}).fail(function(e){
// GWE failed to show invite properly
});
Option | Type | Description |
---|---|---|
container | object | Contaienr object |
content | string | Content within the web engagement view |
Status | When | Returns |
---|---|---|
resolved | When web engagement information properly provided | n/a |