Notifications
Predefined Flex UI notifications
OutboundCallCanceledGeneric#
Warning notification shown when outbound call fails. It renders with an action to redial the outbound call. It uses Strings.OutboundCallFailedNotificationTitle.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledGeneric);
OutboundCallCanceledBusy#
Warning notification shown when outbound call fails due to other party being busy. It renders with an action to redial the outbound call. It uses Strings.OutboundCallFailedNotificationTitleBus.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledBusy);
OutboundCallCanceledNoAnswer#
Warning notification shown when outbound call fails due to other party not answering. It renders with an action to redial the outbound call. It uses Strings.OutboundCallFailedNotificationTitleNoAnswer
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledNoAnswer);
OutboundCallCanceledInvalidNumber#
Warning notification shown when outbound call fails due to invalid number being called. It uses Strings.OutboundCallFailedNotificationTitleInvalidNumber.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledInvalidNumber);
OutboundCallCanceledDisabledCountry#
Warning notification shown when outbound call fails due to calls to that country not being enabled. It uses Strings.OutboundCallFailedNotificationTitleDisabledCountry.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledDisabledCountry);
OutboundCallCanceledFromNumberUnverified#
Warning notification shown when outbound call fails due to the 'from' number not being verfied for the account. It uses Strings.OutboundCallFailedNotificationTitleFromNumberUnverified.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.OutboundCallCanceledFromNumberUnverified);
noInputDevice#
Error Notification shown when there are no audio input devices It renders Strings.InputDeviceErrorNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.NoInputDevice);
BrowserVoiceDisabled#
Error notification shown when an agent receives a phone call but Twilio Voice SDK has been disabled. It renders Strings.BrowserVoiceDisabledNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.browserVoiceDisabled);
MicTaken#
Error notification shown when the microphone is not available in a call. It renders Strings.MicNotAvailableNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.MicTaken);
AudioPlayerDeniedErrorNotificationId#
Error Notification shown when an audio cannot be played because of missing permissions. It renders Strings.AudioPlayerDeniedError.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AudioPlayerDeniedErrorNotificationId);
AudioPlayerInvalidMediaErrorNotificationId#
Error notification shown when an audio cannot be played because of an invalid media is provided. It renders Strings.AudioPlayerInvalidMediaError.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AudioPlayerInvalidMediaErrorNotificationId);
AudioPlayerGenericErrorNotificationId#
Error notification shown when an audio cannot played for non specified reasons. It renders Strings.AudioPlayerGenericError.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AudioPlayerGenericErrorNotificationId);
MessageSizeExceeded#
Error notification shown when trying to submit a chat message that exceeds its characters limit. It renders Strings.MessageSizeExceeded.
Properties:
payload: object
Payload object.
currentCharCount: number
- Number of characters currently in MessageInput.maxCharCount: number
- Max number of characters allowed in the MessageInput for this specific channel.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.messageSizeExceeded, { currentCharCount: bodyTextLength, maxCharCount: charLimit});
ChatOrchestrationAddToConversationFailed#
Error notification shown when worker fails to join a new conversation (chat orchestration) It renders Strings.ChatOrchestrationAddToConversationFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.ChatOrchestrationAddToConversationFailed);
ChatOrchestrationDeactivateConversationFailed#
Error notification shown when an error occurs while deactivating a conversation (chat orchestration) It renders Strings.ChatOrchestrationDeactivateConversationFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.ChatOrchestrationDeactivateConversationFailed);
ChatOrchestrationLeaveConversationFailed#
Error notification shown when an error occurs while leaving a conversation (chat orchestration) It renders Strings.ChatOrchestrationLeaveConversationFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.ChatOrchestrationLeaveConversationFailed);
FlexUiVersionDeprecated#
Warning notification shown when the current version of Flex is deprecated. It renders Strings.UiVersionDeprecated.
Properties:
payload: object
Payload object.
message: string
- Actual error message.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AudioPlayerGenericErrorNotificationId, { message: "error message"});
FlexSessionExpired#
Warning notification shown when a worker's token expires. It renders Strings.SessionExpired.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.FlexSessionExpired);
RequestBrowserNotificationPermissions#
Warning Notification for asking for browser notification rights. It renders Strings.RequestBrowserNotificationPermissions.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.RequestBrowserNotificationPermissions);
NoNetworkConnection#
Warning Notification shown when there is no network connection. It renders Strings.ReconnectingConnection.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.NoNetworkConnection);
DegradedModeActive#
Warning Notification shown when flex is degraded. It renders Strings.DegradedWarning.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.DegradedModeActive);
ShortcutUsedTooRecentlyNotificationTitle#
Warning notification shown when a shortcut is fired too quickly in succession. It renders Strings.ShortcutUsedTooRecentlyNotificationTitle.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.ShortcutUsedTooRecentlyNotificationTitle);
TooManyParticipantsForShortcutNotificationTitle#
Warning notification shown when a user tries to use the hold shortcut if there are more than two participants in a call. It renders Strings.TooManyParticipantsForShortcutNotificationTitle.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.TooManyParticipantsForShortcutNotificationTitle);
SelectATaskNotificationTitle#
Warning notification shown when End Selected Task shortcut is used with no task selected. It renders Strings.SelectATaskNotificationTitle.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.SelectATaskNotificationTitle);
AddingCommentFailed#
Error notification shown when adding a comment in the conversation screen fails. It renders Strings.AddingCommentFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AddingCommentFailed);
AddingAssessmentFailed#
Error notification shown when adding an assessment in the conversation screen fails. It renders Strings.AddingAssessmentFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.AddingAssessmentFailed);
GlobalSLSaveSuccess#
Notification shown when SL global metrics have been saved successfully. It renders Strings.GlobalSLSuccessNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.GlobalSLSaveSuccess);
SLAPreferencesCustomLevelsSuccess#
Notification shown when custom service levels for a queue have been saved successfully. It renders Strings.SLAPreferencesCustomLevelsSuccessNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.SLAPreferencesCustomLevelsSuccess);
SLAPreferencesCustomLevelsError#
Notification shown when SL global metrics have failed to be saved successfully It renders Strings.SLAPreferencesCustomLevelsError.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.SLAPreferencesCustomLevelsError);
MonitoringFailed#
Error notification shown when an error occurs while starting monitoring a task. It renders Strings.MonitoringFailedNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.MonitoringFailed);
ExternalWarmTransferFailed#
Notification shown when External Warm Transfer fails. It renders Strings.ExternalWarmTransferFailed.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.ExternalWarmTransferFailed);
FailedToFetchParticipants#
Notification shown when failing to fetch interaction participants. It renders Strings.FailedToFetchParticipants.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.FailedToFetchParticipants);
PendingReservationsOnLogout#
Error Notification shown when agents try to logout while having a pending reservation. It renders Strings.PendingReservationsOnLogoutNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.PendingReservationsOnLogout);
PendingReservationsOnActivityStateChange#
Error notification shown when agents try to change activity state while having a pending reservation. It renders Strings.PendingReservationsOnActivityStateChangeNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.activityCannotBeChangedWhenPendingTasks);
WorkerActivityUpdateFailed#
Error notification shown when agents fails to change activity state due to a service error. It renders Strings.WorkerActivityUpdateFailedNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.WorkerActivityUpdateFailed);
TransferFailed#
Error notification shown when a call transfer fails. It renders Strings.TransferFailedNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.TransferFailed, { reason: "failed reason"});
taskCannotBeTransferred#
Error notification shown when a task cannot be transferred. It renders Strings.TaskCannotBeTransferredNotification.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.TaskCannotBeTransferred);
IncomingTask#
Notification for incoming task, with most properties dependent on task channel in question.
Properties:
payload: object
Payload object.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.IncomingTask, { task: taskObject });
CannotChangeOtherWorkerActivity#
Error notification shown when supervisor tries to change activity state of an agent with a pending reservation. It renders Strings.CannotChangeOtherWorkerActivity.
Example:
import { Notifications, NotificationIds } from "@twilio/flex-ui";Notifications.showNotification(NotificationIds.CannotChangeOtherWorkerActivity);
NewChatMessage#
Notification shown when new chat message is received It renders title as Strings.NewChatMessageNotificationTitle and body as Strings.NewChatMessageNotificationBody.
Properties:
payload: object
payload object
lastMessage: ChatChannelState.MessageState
- last message object
Example:
import { Notifications, NotificationIds, StateHelper, ChatChannelHelper } from "@twilio/flex-ui";const channelState = StateHelper.getChatChannelStateForTask(task);const chatChannelHelper = new ChatChannelHelper(channelState);
Notifications.showNotification(NotificationIds.NewChatMessage, { lastMessage: chatChannelHelper.lastMessage});