Finesse Toaster

Class finesse.containerservices.FinesseToaster

FinesseToaster is a utility class that displays Cisco FinesseToaster notifications. FinesseToaster is a built-in browser notification that appears at the bottom of the screen, and is typically used to notify the user of important events when the agent desktop browser tab is not active. FinesseToaster uses the HTML5 Notification API to display the notification. For more details on HTML5 Notification API and browser compatibility, see https://developer.mozilla.org/en-US/docs/Web/API/notification#Browser_compatibility.

Note

Internet Explorer does not support the toaster functionality.

Sample Finesse Toaster Notification

Methods

init(config, logger)

Initiates the Cisco Finesse Toaster module for the gadget to be able to display notifications.

Example

finesse.containerservices.FinesseToaster.init("config,logger");

Parameters

Name

Type

Description

Required

config

Object

The configuration data which is either the finesse.container.Config or finesse.gadget.Config.

Yes

logger

Object

The finesse.cslogger.ClientLogger object for the client logging messages.

For example, you can use finesse.cslogger.ClientLogger as a parameter.

No

Returns

{finesse.containerservices.FinesseToaster} The initiated finesse.containerServices.FinesseToaster reference.

showToaster(title, options)

Displays Cisco FinesseToaster notification to the user.

Example

finesse.containerservices.FinesseToaster.showToaster(
    'Incoming Alert', {
        body: 'There is new message'
    }
);

Parameters

Name

Type

Description

Required

title

String

The title of the Cisco FinesseToaster notification.

Yes

options

Object

Options for the Cisco FinesseToaster notification.

  • body—The text in the Cisco FinesseToaster notification

  • icon—The URL of the image for the icon in the Cisco FinesseToaster notification

    Cisco FinesseToaster notification default icons. The constant lists are:

    • TOASTER_DEFAULT_ICONS.INCOMING_CALL_ICON

    • TOASTER_DEFAULT_ICONS.INCOMING_CHAT_ICON

    • TOASTER_DEFAULT_ICONS.INCOMING_TEAM_MESSAGE

  • autoClose—Duration in milliseconds, the Cisco FinesseToaster notification remains opened. The default value is 8000 milliseconds.

    Note

    The autoClose parameter is applicable only for Chrome and Firefox browsers in Windows OS. In macOS, Chrome and Firefox browsers automatically close the toaster notification. In macOS, the autoClose value is ignored and the browser automatically closes the toaster notification.

  • showWhenVisible—Determines how the Cisco Finesse Toaster notification is displayed based on the visibility of the Cisco Finesse desktop.

    • true—Shows the Cisco Finesse Toaster notification irrespective of whether the Cisco Finesse desktop is active or not.

    • false (default)—Shows the Cisco Finesse Toaster notification only when the Cisco Finesse desktop is inactive.

Yes