Difference between revisions of "WID/Current/SDK/ChannelSelector-combined"
(Published) |
(Published) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|Standalone=No | |Standalone=No | ||
|DisplayName=ChannelSelector | |DisplayName=ChannelSelector | ||
− | |||
|TocName=ChannelSelector | |TocName=ChannelSelector | ||
+ | |Context=Learn how to provide your customers with a configurable list of channels as an entry point for contacting customer service. | ||
|ComingSoon=No | |ComingSoon=No | ||
− | | | + | |Platform=GenesysEngage-cloud |
+ | |Role=Developer | ||
|Section={{Section | |Section={{Section | ||
|sectionHeading=Overview | |sectionHeading=Overview | ||
− | |||
|alignment=Vertical | |alignment=Vertical | ||
− | + | |structuredtext=The ChannelSelector Widget displays a configurable list of channels, as an entry point for customers to contact customer service. In addition to showing multiple channels, ChannelSelector can be configured to display the estimated wait time (EWT) for each channel. You can also use an EWT value to configure channels to hide, or to show, that they disabled. Channels are not limited to Genesys Widgets; you can add your own custom channels to launch applications or open new windows as necessary. | |
− | |structuredtext=The ChannelSelector Widget displays a configurable list of channels, as an entry point for customers to contact customer service. In addition to showing multiple channels, ChannelSelector can be configured to display the | ||
− | [[File: | + | [[File:Live assistance channels pec.png|455x455px|alt=The ChannelSelector widget in light theme.]] |
− | Note the screenshots in the following section, and visit the {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=config|display text=configuration}} | + | Note the screenshots in the following section, and visit the {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=config|display text=configuration}} section for more information. |
===Usage=== | ===Usage=== | ||
Use the following methods to launch ChannelSelector manually: | Use the following methods to launch ChannelSelector manually: | ||
Line 22: | Line 21: | ||
*Create your own custom button or link to open ChannelSelector (using the "ChannelSelector.open" command) | *Create your own custom button or link to open ChannelSelector (using the "ChannelSelector.open" command) | ||
− | {{NoteFormat|By default ChannelSelector has no channels configured. The UI will appear empty if not configured. See the {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=config|display text=configuration}} for examples and information on how to set up your own custom channels. |}} | + | {{NoteFormat|By default ChannelSelector has no channels configured. The UI will appear empty if not configured. See the {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=config|display text=configuration}} section for examples and information on how to set up your own custom channels. |}} |
===Customization=== | ===Customization=== | ||
− | You can customize and {{Link- | + | You can customize and {{Link-AnywhereElse|product=WID|version=Current|manual=Developer|topic=GWCInternat|display text=localize}} all of the static text shown in the ChannelSelector Widget by adding entries into your {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=config|display text=configuration}} and {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=localize|display text=localization}} options. |
ChannelSelector supports Themes. You can create and register your own themes for Genesys Widgets. | ChannelSelector supports Themes. You can create and register your own themes for Genesys Widgets. | ||
Line 41: | Line 40: | ||
{{!}}{{!}}channelselector | {{!}}{{!}}channelselector | ||
{{!}}- | {{!}}- | ||
− | {{!}}{{!}}CXBus—{{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=commands|display text=API | + | {{!}}{{!}}CXBus—{{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=commands|display text=API commands}} & {{Link-SomewhereInThisVersion|manual=SDK|topic=ChannelSelector-combined|anchor=events|display text=API events}} |
{{!}}{{!}}ChannelSelector | {{!}}{{!}}ChannelSelector | ||
{{!}}- | {{!}}- | ||
Line 53: | Line 52: | ||
Switching between Desktop and Mobile modes is done automatically by default. You may configure Genesys Widgets to switch between Desktop and Mobile modes manually if necessary. | Switching between Desktop and Mobile modes is done automatically by default. You may configure Genesys Widgets to switch between Desktop and Mobile modes manually if necessary. | ||
===Screenshots=== | ===Screenshots=== | ||
− | ''' | + | '''Dark theme'''<br /> |
− | < | + | [[File:GEC_CS_MaxUnAvl_dark_MobileLandscape.png|173x173px|alt=The ChannelSelector widget in dark theme in mobile landscape view displaying estimated wait time]] |
− | + | [[File:GEC_CS_MaxUnAvl_dark.png|150x150px|alt=The ChannelSelector widget in dark theme in desktop view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Avl_dark_MobileLandscape.png|176x176px|alt=The ChannelSelector widget in dark theme in mobile landscape view displaying available status]] | |
− | + | [[File:GEC_CS_Avl_dark.png|150x150px|alt=The ChannelSelector widget in dark theme in desktop view displaying available status]] | |
− | + | [[File:GEC_CS_MaxUnAvl_dark_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in dark theme in mobile portrait view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Min_dark.png|150x150px|alt=The ChannelSelector widget in dark theme in desktop view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Avl_dark_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in dark theme in mobile portrait view displaying available status]] | |
− | + | [[File:GEC_CS_Min_dark_MobileLandscape.png|181x181px|alt=The ChannelSelector widget in dark theme in mobile landscape view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Min_dark_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in dark theme in mobile portrait view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Max_dark_MobileLandscape.png|186x186px|alt=The ChannelSelector widget in dark theme in mobile landscape view displaying estimated wait time]] | |
− | + | [[File:GEC_CS_Max_dark_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in dark theme in mobile portrait view displaying estimated wait time]] | |
− | |||
− | |||
− | |||
− | ''' | + | '''Light theme''' |
− | < | + | <br /> |
− | + | [[File:GEC CS Avl light MobilePortrait.png|170x170px|alt=The ChannelSelector widget in light theme in mobile portrait view displaying available status]] | |
− | + | [[File:GEC_CS_Avl_light_MobileLandscape.png|188x188px|alt=The ChannelSelector widget in light theme in mobile landscape view displaying available status]] | |
− | + | [[File:GEC_CS_Avl_light.png|155x155px|alt=The ChannelSelector widget in light theme in desktop view displaying available status]] | |
− | + | [[File:GEC_CS_Max_light_MobileLandscape.png|181x181px|alt=The ChannelSelector widget in light theme in mobile landscape view displaying estimated wait time for all channels]] | |
− | + | [[File:GEC_CS_MaxUnAvl_light_MobileLandscape.png|189x189px|alt=The ChannelSelector widget in light theme in mobile landscape view displaying estimated wait time for two channels]] | |
− | + | [[File:GEC_CS_Min_light.png|166x166px|alt=The ChannelSelector widget in light theme in desktop view displaying estimated wait time for all channels]] | |
− | + | [[File:GEC_CS_Min_light_MobileLandscape.png|183x183px|alt=The ChannelSelector widget in light theme in mobile landscape view displaying estimated wait time for all channels]] | |
− | + | [[File:GEC_CS_MaxUnAvl_light.png|161x161px|alt=The ChannelSelector widget in light theme in desktop view displaying estimated wait time for 2 channels]] | |
− | + | [[File:GEC_CS_Max_light_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in light theme in mobile portrait view displaying estimated wait time for all channels]] | |
− | + | [[File:GEC_CS_MaxUnAvl_light_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in light theme in mobile portrait view displaying estimated wait time for 2 channels]] | |
− | + | [[File:GEC_CS_Min_light_MobilePortrait.png|150x150px|alt=The ChannelSelector widget in light theme in mobile portrait view displaying estimated wait time for all channels]] | |
− | |||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
|sectionHeading=Configuration | |sectionHeading=Configuration | ||
− | |||
|anchor=config | |anchor=config | ||
|alignment=Vertical | |alignment=Vertical | ||
− | + | |structuredtext=ChannelSelector shares the '''_genesys.widgets.channelselector''' configuration namespace. ChannelSelector has UI options to enable and disable channels, hide channels, add new channels, and display estimated wait time (EWT) details. All the channels are displayed based on the array of objects order defined in the channel's configuration. To hide a particular channel, simply remove the corresponding array object. | |
− | |structuredtext=ChannelSelector shares the '''_genesys.widgets.channelselector''' configuration namespace. ChannelSelector has UI options to enable and disable channels, hide channels, add new channels, and display | ||
{{NoteFormat|EWT can only be configured for WebChat, Callback, ClickToCall, and CallUs channels. It may not be applicable for other channels. If configured for the Send Message channel, it will always be shown as available regardless of any EWT value.|}} | {{NoteFormat|EWT can only be configured for WebChat, Callback, ClickToCall, and CallUs channels. It may not be applicable for other channels. If configured for the Send Message channel, it will always be shown as available regardless of any EWT value.|}} | ||
Line 109: | Line 100: | ||
i18n: 'CallusTitle', | i18n: 'CallusTitle', | ||
icon: 'call-outgoing', | icon: 'call-outgoing', | ||
− | html: ' | + | html: '<img src='http://placehold.it/100x100'>', |
ewt: { | ewt: { | ||
display: true, | display: true, | ||
Line 125: | Line 116: | ||
i18n: 'ChatTitle', | i18n: 'ChatTitle', | ||
icon: 'chat', | icon: 'chat', | ||
− | html: | + | html: '', |
ewt: { | ewt: { | ||
display: true, | display: true, | ||
Line 134: | Line 125: | ||
} | } | ||
}, | }, | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{ | { | ||
Line 150: | Line 132: | ||
i18n: 'CallbackTitle', | i18n: 'CallbackTitle', | ||
icon: 'call-incoming', | icon: 'call-incoming', | ||
− | html: | + | html: '', |
ewt: { | ewt: { | ||
display: true, | display: true, | ||
Line 160: | Line 142: | ||
}, | }, | ||
− | + | }; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
===Options=== | ===Options=== | ||
Line 197: | Line 170: | ||
{{!}}{{!}}none | {{!}}{{!}}none | ||
{{!}}{{!}}Always | {{!}}{{!}}Always | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].displayName | {{!}}{{!}}channels[].displayName | ||
Line 226: | Line 193: | ||
{{!}}{{!}}Overrides and replaces the icon section of a channel with the html (image tag) defined here. | {{!}}{{!}}Overrides and replaces the icon section of a channel with the html (image tag) defined here. | ||
{{!}}{{!}}none | {{!}}{{!}}none | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.display | {{!}}{{!}}channels[].ewt.display | ||
{{!}}{{!}}boolean | {{!}}{{!}}boolean | ||
− | {{!}}{{!}}To display | + | {{!}}{{!}}To display EWT details. |
{{!}}{{!}}true | {{!}}{{!}}true | ||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
Line 247: | Line 208: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.availabilityThresholdMin | {{!}}{{!}}channels[].ewt.availabilityThresholdMin | ||
− | {{!}}{{!}}number | + | {{!}}{{!}}number (seconds) |
− | {{!}}{{!}}If EWT is greater than 0 and less than this minimum threshold value ( | + | {{!}}{{!}}If EWT is greater than 0 minutes and less than this minimum threshold value (in minutes), then the EWT is shown with a yellow warning icon. {{NoteFormat|Comparison is made after converting the threshold value in seconds to minutes.|}} |
{{!}}{{!}}300 | {{!}}{{!}}300 | ||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.availabilityThresholdMax | {{!}}{{!}}channels[].ewt.availabilityThresholdMax | ||
− | {{!}}{{!}}number | + | {{!}}{{!}}number (seconds) |
− | {{!}}{{!}}If EWT is greater than | + | {{!}}{{!}}If EWT is greater than this minimum threshold value (in minutes) and less than the maximum threshold value (in minutes), then the EWT is shown with a red alert icon.{{NoteFormat|Comparison is made after converting the threshold value in seconds to minutes.|}} |
{{!}}{{!}}480 | {{!}}{{!}}480 | ||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
Line 260: | Line 221: | ||
{{!}}{{!}}channels[].ewt.hideChannelWhenThresholdMax | {{!}}{{!}}channels[].ewt.hideChannelWhenThresholdMax | ||
{{!}}{{!}}boolean | {{!}}{{!}}boolean | ||
− | {{!}}{{!}}Hides this channel when | + | {{!}}{{!}}Hides this channel when EWT is greater than the maximum threshold value. |
{{!}}{{!}}true | {{!}}{{!}}true | ||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}} | {{!}}} | ||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
|sectionHeading=Localization | |sectionHeading=Localization | ||
− | |||
|anchor=localize | |anchor=localize | ||
|alignment=Vertical | |alignment=Vertical | ||
− | + | |structuredtext={{NoteFormat|For information on how to set up localization, refer to {{Link-AnywhereElse|product=WID|version=Current|manual=Developer|topic=GWCInternat|display text=Localize widgets and services}}.|1}} | |
− | |structuredtext={{NoteFormat|For information on how to set up localization, refer to | ||
===Usage=== | ===Usage=== | ||
Use the '''channelselector''' namespace when you define localization strings for the ChannelSelector plugin in your i18n JSON file. | Use the '''channelselector''' namespace when you define localization strings for the ChannelSelector plugin in your i18n JSON file. | ||
Line 285: | Line 243: | ||
"WaitTimeTitle": "Wait Time", | "WaitTimeTitle": "Wait Time", | ||
"AvailableTitle": "Available", | "AvailableTitle": "Available", | ||
+ | "AriaAvailableTitle": "Available", | ||
"UnavailableTitle": "Unavailable", | "UnavailableTitle": "Unavailable", | ||
− | |||
"CallbackTitle": "Receive a Call", | "CallbackTitle": "Receive a Call", | ||
− | " | + | "AriaClose": "Live Assistance Close", |
+ | "AriaWarning": "Warning", | ||
+ | "AriaAlert": "Alert", | ||
"minute": "min", | "minute": "min", | ||
− | "minutes": "mins" | + | "minutes": "mins", |
+ | "AriaWindowLabel": "Live Assistance Window" | ||
} | } | ||
} | } | ||
}</source> | }</source> | ||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading=API | + | |sectionHeading=API commands |
− | |||
|anchor=commands | |anchor=commands | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
|structuredtext=Once you've registered your plugin on the bus, you can call commands on other registered plugins. Here's how to use the global bus object to register a new plugin on the bus. | |structuredtext=Once you've registered your plugin on the bus, you can call commands on other registered plugins. Here's how to use the global bus object to register a new plugin on the bus. | ||
− | {{NoteFormat|The global bus object is a debugging tool. When implementing Widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see {{Link- | + | {{NoteFormat|The global bus object is a debugging tool. When implementing Widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see {{Link-AnywhereElse|product=WID|version=Current|manual=SDK|topic=GWCBusExtensions|display text=Genesys Widgets Extensions}} for more information about extending Genesys Widgets.|1}} |
<source lang="javascript">var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | <source lang="javascript">var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | ||
Line 332: | Line 290: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector is successfully closed |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector is already closed |
{{!}}{{!}}Already closed | {{!}}{{!}}Already closed | ||
{{!}}} | {{!}}} | ||
Line 364: | Line 322: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is successfully opened |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is already open |
{{!}}{{!}}'Already open' | {{!}}{{!}}'Already open' | ||
{{!}}} | {{!}}} | ||
Line 377: | Line 335: | ||
====Example==== | ====Example==== | ||
<source lang="javascript"> | <source lang="javascript"> | ||
− | oMyPlugin.command('ChannelSelector. | + | oMyPlugin.command('ChannelSelector.configure', { |
channels: [ | channels: [ | ||
Line 461: | Line 419: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.availabilityThresholdMin | {{!}}{{!}}channels[].ewt.availabilityThresholdMin | ||
− | {{!}}{{!}}number | + | {{!}}{{!}}number (seconds) |
− | {{!}}{{!}}If EWT is greater than 0 and less than | + | {{!}}{{!}}If EWT is greater than 0 minutes and less than this minimum threshold value (in minutes), then the EWT is shown with a yellow warning icon. |
+ | Note: Comparison is made after converting the threshold | ||
+ | value in seconds to minutes. | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.availabilityThresholdMax | {{!}}{{!}}channels[].ewt.availabilityThresholdMax | ||
− | {{!}}{{!}}number | + | {{!}}{{!}}number (seconds) |
− | {{!}}{{!}}If EWT is greater than | + | {{!}}{{!}}If EWT is greater than this minimum threshold value (in minutes) and less than the maximum threshold value (in minutes), then the EWT is shown with a red alert icon. |
+ | Note: Comparison is made after converting the threshold | ||
+ | value in seconds to minutes. | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}channels[].ewt.hideChannelWhenThresholdMax | {{!}}{{!}}channels[].ewt.hideChannelWhenThresholdMax | ||
Line 483: | Line 445: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}Configuration options are provided and set |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}No configuration options are provided |
{{!}}{{!}}'Invalid configuration' | {{!}}{{!}}'Invalid configuration' | ||
{{!}}} | {{!}}} | ||
Line 493: | Line 455: | ||
===displayStats=== | ===displayStats=== | ||
− | Displays | + | Displays estimated wait time (EWT) and availability details for each channel. |
====Example==== | ====Example==== | ||
<source lang="javascript"> | <source lang="javascript"> | ||
Line 515: | Line 477: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}EWT is displayed successfully |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}StatsService fails to retrieve EWT data |
{{!}}{{!}}'Unable to display EWT Stats in ChannelSelector' | {{!}}{{!}}'Unable to display EWT Stats in ChannelSelector' | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}enableEwt config is disabled or when required channel plugins are not ready |
{{!}}{{!}}'Either EWT config is disabled or plugins not yet ready' | {{!}}{{!}}'Either EWT config is disabled or plugins not yet ready' | ||
{{!}}} | {{!}}} | ||
Line 551: | Line 513: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is successfully opened |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is not opened |
{{!}}{{!}}'ChannelSelector not opened to disable stats details' | {{!}}{{!}}'ChannelSelector not opened to disable stats details' | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}EWT is disabled for all channels |
{{!}}{{!}}'Stats already disabled' | {{!}}{{!}}'Stats already disabled' | ||
{{!}}} | {{!}}} | ||
Line 587: | Line 549: | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}resolved | {{!}}{{!}}resolved | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is successfully opened |
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}EWT details are already displayed |
{{!}}{{!}}'Stats already enabled' | {{!}}{{!}}'Stats already enabled' | ||
{{!}}- | {{!}}- | ||
{{!}}{{!}}rejected | {{!}}{{!}}rejected | ||
− | {{!}}{{!}} | + | {{!}}{{!}}ChannelSelector Widget is not opened |
{{!}}{{!}}'ChannelSelector not opened to enable stats details' | {{!}}{{!}}'ChannelSelector not opened to enable stats details' | ||
{{!}}} | {{!}}} | ||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading=API | + | |sectionHeading=API events |
− | |||
|anchor=events | |anchor=events | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
|structuredtext=Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus. | |structuredtext=Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus. | ||
− | {{NoteFormat|The global bus object is a debugging tool. When implementing Widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see {{Link- | + | {{NoteFormat|The global bus object is a debugging tool. When implementing Widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see {{Link-AnywhereElse|product=WID|version=Current|manual=SDK|topic=GWCBusExtensions|display text=Genesys Widgets Extensions}} for more information about extending Genesys Widgets.|1}} |
<source lang="javascript">var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | <source lang="javascript">var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | ||
Line 631: | Line 590: | ||
{{!}}{{!}}n/a | {{!}}{{!}}n/a | ||
{{!}}} | {{!}}} | ||
− | |||
|Status=No | |Status=No | ||
}} | }} | ||
}} | }} |
Latest revision as of 13:06, October 12, 2021
Contents
Learn how to provide your customers with a configurable list of channels as an entry point for contacting customer service.
Overview
The ChannelSelector Widget displays a configurable list of channels, as an entry point for customers to contact customer service. In addition to showing multiple channels, ChannelSelector can be configured to display the estimated wait time (EWT) for each channel. You can also use an EWT value to configure channels to hide, or to show, that they disabled. Channels are not limited to Genesys Widgets; you can add your own custom channels to launch applications or open new windows as necessary.
Note the screenshots in the following section, and visit the configuration section for more information.
Usage
Use the following methods to launch ChannelSelector manually:
- Call the ChannelSelector.open command
- Create your own custom button or link to open ChannelSelector (using the "ChannelSelector.open" command)
Customization
You can customize and localize all of the static text shown in the ChannelSelector Widget by adding entries into your configuration and localization options.
ChannelSelector supports Themes. You can create and register your own themes for Genesys Widgets.
Namespace
The Channel Selector plugin has the following namespaces tied to each of the following types:
Type | Namespace |
---|---|
Configuration | channelselector |
i18n—Localization | channelselector |
CXBus—API commands & API events | ChannelSelector |
CSS | .cx-channel-selector |
Mobile support
ChannelSelector supports both desktop and mobile devices. Like all Genesys Widgets, there are two main modes: Desktop and Mobile. Desktop is employed for monitors, laptops, and tablets. Mobile is employed for smartphones. When a smartphone is detected, ChannelSelector switches to special full-screen templates that are optimized for both portrait and landscape orientations.
Switching between Desktop and Mobile modes is done automatically by default. You may configure Genesys Widgets to switch between Desktop and Mobile modes manually if necessary.
Screenshots
Configuration
ChannelSelector shares the _genesys.widgets.channelselector configuration namespace. ChannelSelector has UI options to enable and disable channels, hide channels, add new channels, and display estimated wait time (EWT) details. All the channels are displayed based on the array of objects order defined in the channel's configuration. To hide a particular channel, simply remove the corresponding array object.
Example
window._genesys.widgets.channelselector = {
ewtRefreshInterval: 10,
channels: [{
enable: true,
clickCommand: 'CallUs.open',
displayName: 'Call Us',
i18n: 'CallusTitle',
icon: 'call-outgoing',
html: '<img src='http://placehold.it/100x100'>',
ewt: {
display: true,
queue: 'callus_ewt_test_eservices',
availabilityThresholdMin: 300,
availabilityThresholdMax: 480,
hideChannelWhenThresholdMax: false
}
},
{
enable: true,
clickCommand: 'WebChat.open',
displayName: 'Web Chat',
i18n: 'ChatTitle',
icon: 'chat',
html: '',
ewt: {
display: true,
queue: 'chat_ewt_test_eservices',
availabilityThresholdMin: 300,
availabilityThresholdMax: 480,
hideChannelWhenThresholdMax: false
}
},
{
enable: true,
clickCommand: 'Callback.open',
displayName: 'Receive a Call',
i18n: 'CallbackTitle',
icon: 'call-incoming',
html: '',
ewt: {
display: true,
queue: 'callback_ewt_test_eservices',
availabilityThresholdMin: 300,
availabilityThresholdMax: 480,
hideChannelWhenThresholdMax: false
}
},
};
Options
Name | Type | Description | Default | Required |
---|---|---|---|---|
ewtRefreshInterval | number | EWT is updated for every time interval (seconds) defined here. | 10 | n/a |
channels[].enable | boolean | Enable/disable a channel. | true | n/a |
channels[].clickCommand | string | The CXBus command name for opening a particular Widget when this channel is clicked. | none | Always |
channels[].displayName | string | A channel name to display on ChannelSelector Widget. | none | Always |
channels[].i18n | string | To support localization of the channel display name, this takes a key parameter of the channelselector section in the language pack file. Overrides above displayName. | none | n/a |
channels[].icon | string | Select from one of the Genesys Widgets icons by specifying icon css class name. | none | Always |
channels[].html | string | Overrides and replaces the icon section of a channel with the html (image tag) defined here. | none | n/a |
channels[].ewt.display | boolean | To display EWT details. | true | n/a |
channels[].ewt.queue | string | EWT service channel virtual queue. | none | Always |
channels[].ewt.availabilityThresholdMin | number (seconds) | If EWT is greater than 0 minutes and less than this minimum threshold value (in minutes), then the EWT is shown with a yellow warning icon. Important Comparison is made after converting the threshold value in seconds to minutes. |
300 | n/a |
channels[].ewt.availabilityThresholdMax | number (seconds) | If EWT is greater than this minimum threshold value (in minutes) and less than the maximum threshold value (in minutes), then the EWT is shown with a red alert icon. Important Comparison is made after converting the threshold value in seconds to minutes. |
480 | n/a |
channels[].ewt.hideChannelWhenThresholdMax | boolean | Hides this channel when EWT is greater than the maximum threshold value. | true | n/a |
Localization
Usage
Use the channelselector namespace when you define localization strings for the ChannelSelector plugin in your i18n JSON file.
The following example shows how to define new strings for the en (English) language. You can use any language codes you wish; there is no standard format. When selecting the active language in your configuration, you must match one of the language codes defined in your i18n JSON file. You must only define a language code once in your i18n JSON file. Inside each language object you must define new strings for each Widget.
Example i18n JSON
{
"en": {
"channelselector": {
"Title": "Live Assistance",
"SubTitle": "How would you like to get in touch?",
"WaitTimeTitle": "Wait Time",
"AvailableTitle": "Available",
"AriaAvailableTitle": "Available",
"UnavailableTitle": "Unavailable",
"CallbackTitle": "Receive a Call",
"AriaClose": "Live Assistance Close",
"AriaWarning": "Warning",
"AriaAlert": "Alert",
"minute": "min",
"minutes": "mins",
"AriaWindowLabel": "Live Assistance Window"
}
}
}
API commands
Once you've registered your plugin on the bus, you can call commands on other registered plugins. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.command('ChannelSelector.open');
close
Closes the ChannelSelector UI.
Example
oMyPlugin.command('ChannelSelector.close').done(function(e){
// ChannelSelector closed successfully
}).fail(function(e){
// ChannelSelector failed to close
});
Resolutions
Status | When | Returns |
---|---|---|
resolved | ChannelSelector is successfully closed | n/a |
rejected | ChannelSelector is already closed | Already closed |
open
Opens the ChannelSelector UI.
Example
oMyPlugin.command('ChannelSelector.open').done(function(e){
// ChannelSelector opened successfully
}).fail(function(e){
// ChannelSelector failed to open
});
Resolutions
Status | When | Returns |
---|---|---|
resolved | ChannelSelector Widget is successfully opened | n/a |
rejected | ChannelSelector Widget is already open | 'Already open' |
configure
Modifies the ChannelSelector configuration.
Example
oMyPlugin.command('ChannelSelector.configure', {
channels: [
{
enabled: true,
clickCommand: 'CallUs.open',
readyEvent: 'CallUs.ready',
displayName: 'Call Us',
i18n: 'CallusTitle',
icon: 'call-outgoing',
html: '',
ewt:{
display: true,
queue:'chat_ewt_test_eservices',
availabilityThresholdMin:60,
availabilityThresholdMax:600
}
}
]
}).done(function(e){
// ChannelSelector configured successfully
}).fail(function(e){
// ChannelSelector failed to configure
});
Options
Option | Type | Description |
---|---|---|
ewtRefreshInterval | number | EWT is updated for every time interval (seconds) is defined. |
channels | array | Array containing each channel configuration object. The order of channels is displayed based on the order defined here. |
channels[].enable | boolean | Enable/disable chat channel. |
channels[].clickCommand | string | The CXBus command name for opening a particular Widget when this channel is clicked. |
channels[].readyEvent | string | Subscribes to this ready event published by a plugin and enables the channel when that plugin is ready. |
channels[].displayName | string | A channel name to display in the ChannelSelector Widget. |
channels[].i18n | string | To support localization of channel display name, this takes a key parameter of the channelselector section in the language pack file. Overrides above displayName. |
channels[].icon | string | Select from one of the Genesys Widgets icons by specifying icon css class name. |
channels[].html | string | Overrides and replaces the icon section of a channel with the html (image tag) defined here. |
channels[].ewt.display | boolean | To display EWT details. |
channels[].ewt.queue | string | EWT service channel virtual queue name. |
channels[].ewt.availabilityThresholdMin | number (seconds) | If EWT is greater than 0 minutes and less than this minimum threshold value (in minutes), then the EWT is shown with a yellow warning icon.
Note: Comparison is made after converting the threshold value in seconds to minutes. |
channels[].ewt.availabilityThresholdMax | number (seconds) | If EWT is greater than this minimum threshold value (in minutes) and less than the maximum threshold value (in minutes), then the EWT is shown with a red alert icon.
Note: Comparison is made after converting the threshold value in seconds to minutes. |
channels[].ewt.hideChannelWhenThresholdMax | boolean | Hides this channel when EWT is greater than the maximum threshold value. |
Resolutions
Status | When | Returns |
---|---|---|
resolved | Configuration options are provided and set | n/a |
rejected | No configuration options are provided | 'Invalid configuration' |
displayStats
Displays estimated wait time (EWT) and availability details for each channel.
Example
oMyPlugin.command('ChannelSelector.displayStats').done(function(e){
// ChannelSelector displayed stats successfully
}).fail(function(e){
// ChannelSelector failed to display stats
});
Resolutions
Status | When | Returns |
---|---|---|
resolved | EWT is displayed successfully | n/a |
rejected | StatsService fails to retrieve EWT data | 'Unable to display EWT Stats in ChannelSelector' |
rejected | enableEwt config is disabled or when required channel plugins are not ready | 'Either EWT config is disabled or plugins not yet ready' |
disableStats
Clears the UI of any EWT. Disables EWT fetching for the defined time interval.
Example
oMyPlugin.command('ChannelSelector.disableStats').done(function(e){
// ChannelSelector disabled stats successfully
}).fail(function(e){
// ChannelSelector failed to disable stats
});
Resolutions
Status | When | Returns |
---|---|---|
resolved | ChannelSelector Widget is successfully opened | n/a |
rejected | ChannelSelector Widget is not opened | 'ChannelSelector not opened to disable stats details' |
rejected | EWT is disabled for all channels | 'Stats already disabled' |
enableStats
Displays EWT and availability details in the UI. Enables fetching EWT for the defined time interval.
Example
oMyPlugin.command('ChannelSelector.enableStats').done(function(e){
// ChannelSelector enabled stats successfully
}).fail(function(e){
// ChannelSelector failed to enable stats
});
Resolutions
Status | When | Returns |
---|---|---|
resolved | ChannelSelector Widget is successfully opened | n/a |
rejected | EWT details are already displayed | 'Stats already enabled' |
rejected | ChannelSelector Widget is not opened | 'ChannelSelector not opened to enable stats details' |
API events
Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.subscribe('ChannelSelector.ready', function(e){});
Name | Description | Data |
---|---|---|
ready | ChannelSelector plugin is initialized and ready to accept commands | n/a |
opened | ChannelSelector Widget has appeared on screen | n/a |
closed | ChannelSelector Widget has been removed from the screen | n/a |