Notification Popover Service
Class finesse.containerservices.NotificationPopoverService
The NotificationPopoverService publishes notifications on the desktop using the newly created topic finext.notification.popover. This API causes the received notifications to appear in the Notification Center.
Methods
init()
finesse.containerservices.NotificationPopoverService.init(finesse.containerservices.ContainerServices)
Initializes the NotificationPopoverService for use in gadgets. The initialization sets the logger and creates the topic for sending the notifications.
showNotification()
finesse.containerservices.NotificationPopoverService.showNotification(messageFrom,message, isDismissable, timeout, icon, type, pristine, showAlways, customLink, onClickCustomLink)
Sends the notification to the Finesse desktop with the details passed to the showNotification() method.
Example
finesse.containerservices.NotificationPopoverService.showNotification("Michael Littlefoot", "Hello, how are you doing ?", true, 500000, {'name': 'circle', size: 14, color: 'red'}, 'error' )
|
Name |
Type |
Description |
Required |
||
|---|---|---|---|---|---|
|
messageFrom |
String |
The name of the customer from whom the message is coming. |
No |
||
|
message |
String |
The message sent by the customer. |
Yes |
||
|
isDismissable |
Boolean |
Whether the notification message popover is dismissable or not by the agent. (Whether to show the close icon). Default value: true |
No |
||
|
timeout |
String |
Determines the time (in milliseconds) after which the popup notification gets closed if not canceled explicitly. Default value: 8000 milliseconds.
|
No |
||
|
icon |
Object |
Object containing name, color, size, and svg of the icon. The icon has to be from the list of icons supported by Finesse. The details of svg to be rendered include:
The default width and height of svg is 24 px. If both name and svg parameters are provided, the name parameter takes precedence. |
Yes |
||
|
type |
String |
Type of the message. If the value of type is error, the floating message notification is always visible irrespective of whether the navbar is pinned or not. Otherwise, floating notification is shown only when navbar is unpinned, which is the default behavior. |
No |
||
|
pristine |
Boolean |
Flag to prefix "Messages From" text in the notification title. Default value: false. Indicates to prefix the "Message From" text in the notification title. |
No |
||
|
showAlways |
Boolean |
Determines whether the popover remains visible at all times, regardless of the navigation being pinned or unpinned. Default value: false. |
No |
||
|
customLink |
String |
Displays a custom text link (for example, "Click to open") within the toaster notification. |
No |
||
|
onClickCustomLink |
Function |
Callback function triggered when the customLink is clicked. |
No |