Namespace

Notifications

Notifications

Members

# static 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);

# static 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);

# static 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);

# static 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);

# static 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);

# static 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);

# static 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);

# static ChatOrchestrationAddToChatChannelFailed

Error notification shown when worker fails to join a new chat channel (chat orchestration) It renders Strings.ChatOrchestrationAddToChatChannelFailed
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.ChatOrchestrationAddToChatChannelFailed);

# static ChatOrchestrationDeactivateChatChannelFailed

Error notification shown when an error occurs while deactivating a chat channel (chat orchestration) It renders Strings.ChatOrchestrationDeactivateChatChannelFailed
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.ChatOrchestrationDeactivateChatChannelFailed);

# static ChatOrchestrationLeaveChatChannelFailed

Error notification shown when an error occurs while leaving a chat channel (chat orchestration) It renders Strings.ChatOrchestrationLeaveChatChannelFailed
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.ChatOrchestrationLeaveChatChannelFailed);

# static 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);

# static FlexUiVersionDeprecated

Warning notification shown when the current version of Flex is deprecated. It renders Strings.UiVersionDeprecated
Properties:
Name Type Description
payload Object
message string Actual error message
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.AudioPlayerGenericErrorNotificationId, {
 message: "error message"
});

# static IncomingTask

Notification for incoming task, with most properties dependent on task channel in question
Properties:
Name Type Description
payload Object
task ITask task object
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.IncomingTask, { task: taskObject });

# static MessageSizeExceeded

Error notification shown when trying to submit a chat message that exceeds its characters limit. It renders Strings.MessageSizeExceeded
Properties:
Name Type Description
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
});

# static 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);

# static 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);

# static NewChatMessage

Notification shown when new chat message is received It renders title as Strings.NewChatMessageNotificationTitle and body as Strings.NewChatMessageNotificationBody
Properties:
Name Type Description
payload Object
lastMessage ChatMessageHelper 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
});

# static 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);

# static 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);

# static OutboundCallCanceledBusy

Warning notification shown when outbound call fails due to other party being busy. It renders with an action to redial the outbound call and it uses Strings.OutboundCallFailedNotificationTitleBusy
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.OutboundCallCanceledBusy);

# static OutboundCallCanceledGeneric

Warning notification shown when outbound call fails. It renders with an action to redial the outbound call and it uses Strings.OutboundCallFailedNotificationTitle
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.OutboundCallCanceledGeneric);

# static OutboundCallCanceledInvalidNumber

Warning notification shown when outbound call fails due to invalid number being called. It renders with an action to redial the outbound call and it uses Strings.OutboundCallFailedNotificationTitleInvalidNumber
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.OutboundCallCanceledInvalidNumber);

# static OutboundCallCanceledNoAnswer

Warning notification shown when outbound call fails due to other party not answering. It renders with an action to redial the outbound call and it uses Strings.OutboundCallFailedNotificationTitleNoAnswer
Example
import { Notifications, NotificationIds } from "@twilio/flex-ui";
Notifications.showNotification(NotificationIds.OutboundCallCanceledNoAnswer);

# static 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);

# static 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);

# static 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);

# static 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);

# static 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"});