Class Index | File Index

Classes


Class finesse.digital.ChannelSchema

Finesse digital channel state control (referred to as FNC elsewhere in this document) is a programmable desktop component that was introduced in Finesse 12.0. This API provides the schema that is used in finesse.digital.ChannelService for various channel operations. This schema has been defined as per http://json-schema.org/
Defined in: finesse.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
 
 
Class Detail
finesse.digital.ChannelSchema()

Cisco Common Desktop Stock Icon names with image

The channel configuration schema has options to take Cisco Common Desktop icon (CD-icon) name as value. To get to know the list of CD-UI icon names and its visual design, paste the below JavaScript code in javascript editor part of your browser developer console after Finesse login. This script will clear off the Finesse web-page and will display icon-name and its rendering in a HTML table. To get back to the page, just refresh the browser. Note: You can also set this up in a gadget for reference.
var showIcons = function () {
    $('body').html('');

    $('body').append("<table border='1' background-color:#a0c0a0;'>"
        + "<thead style='display: none;'><th>Icon Name</th>"
        + "<th>Icon</th></thead><tbody  "
        + "style='display: block;  overflow-y: auto; height: 600px'>"
        + "</tbody></table>");

    var icons = window.top.cd.core.cdIcon;

    var addIcon = function (name, iconJson) {

        var width = (iconJson.width) ? iconJson.width : 1000;
        var height = (iconJson.height) ? iconJson.height : 1000;

        var iconBuilt = "<tr><td>" + name 
            + "</td><td><svg width='" + width 
            + "' height='" + height 
            + "' style='height: 30px; width: 30px;'  viewBox='" 
            + iconJson.viewBox + "'>" 
            + iconJson.value + "</svg></td></tr>";
            

        try {
            $('tbody').append(iconBuilt);
        } catch (e) {
            console.error("Error when adding " + name, e);
        }
    }

    for (var icon in icons) {
        if (icons[icon].viewBox) addIcon(icon, icons[icon])
    }
}

showIcons();
Method Detail
getChannelConfigSchema()


Example JSON for ChannelConfig data:
{
    "actionTimeoutInSec": 5, 
    "icons"             :  [
                                {
                                    "type": "collab-icon",
                                    "value": "Chat"         
                                },
                                {
                                    "type": "url",
                                    "value": "../../thirdparty/gadget3/channel-icon.png"
                                }
                            ]
}            
Returns:
Schema for validation of the below JSON definition:
KeyTypeExampleDescription
actionTimeoutInSecInteger5Value in seconds. Represents the max time the FNC will wait after sending the menu selection request to the gadget. Upper limit is 30 seconds. It is recommended that this limit be kept as low as possible, since no other operation can be performed on FNC during this period
iconsArrayJSON array of icons to be composed and displayed in the Header to visually represent a channel. This should ideally never change. A single item is defined below
typeEnumcollab-icon Takes either collab-icon or url as value.
collab-icon would apply a stock icon. Refer to stock icon names over here
url applies a custom icon supplied by gadget. The icon could be located as part of gadget files in Finesse.
valueStringChatThe stock icon name or the url of the custom icon

getChannelStateSchema()


Example JSON for ChannelState data:
{
    "label"          : "Chat & Email", 
    "currentState"   : "ready", 
    "iconColor"      : "available",
    "enable"         : true,  
    "logoutDisabled" : true,  
    "logoutDisabledText" : "Please go unavailable on chat before logout", 
    "iconBadge"      :  "none"  
    "hoverText"      : "Tooltip text"
}
Returns:
Schema for validation of the below JSON definition: /tr>
KeyTypeExampleDescription
labelStringChat & EmailThe name used for the channel on hover
currentStateStringreadyText for the current state of the channel. This text will be appended to the label & will be displayed on the channel icon as a hover message
iconColorEnumavailable Takes one of these values; available - shows up as green; unavailable - shows up as red; busy - shows up as orange. The icon colors will be used by the FNC in composing the final icon for the channel, that indicates the current state of the channel.
enablebooleantruetrue indicates the channel is active. false indicates the channel is not active and none of the menu should be shown.
logoutDisabledbooleantrueDefine as true if the logout menu in the user identity component has to be disabled. For e.g. during Agent READY or BUSY state, it makes sense to disable the logout menu and enable it again when the state changes to NOT READY.
Note: The true setting in any of the Channel across all Channels will cause the Logout menu to be disabled.
logoutDisabledTextStringPlease go unavailable on chat before logout The text which will be shown to the user if the logout is disabled
iconBadgeEnumnoneinfo - Info badge will be displayed; error - Error badge will be displayed; warning - Warning badge will be displayed; none - No badge will be displayed
hoverTextStringTooltip textIf this is specified it will override the tooltip that shows up by default. Use this to indicate errors or disabled message etc. If the underlying issue is resolved then clear the string

getMenuConfigSchema()


Example JSON for MenuConfig data:
{
  "label" : "Chat", 
  "menuItems" :     
          [     
            {
                "id": "ready-menu-item", 
                "label": "Ready",         
                "iconColor": "available" 
            },
            {
                "id": "not-ready-menu-item",
                "label": "Not Ready",
                "iconColor": "unavailable"
            }
         ]
}
Returns:
Schema for validation of the below JSON definition:
KeyTypeExampleDescription
labelStringChatThis will be the top level menu name for the channel menu
menuItemsArrayThese menus will be listed under the top level menu. A single item is defined below
idStringready-menu-itemThis id needs to be unique for a channel. When there is a user action on the channel menu, this id will be returned back via parameter finesse.digital.ChannelService#selectedMenuItemId
labelStringReadyThe text of menu item
iconColorEnumavailableavailable - shows up as green; unavailable - shows up as red;busy - shows up as orange

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jan 02 2020 09:55:47 GMT-0500 (EST)