ProfileConnectorHelper
Helper class for Profile Connector.
isSupportedTask(task) => boolean#
Check if a task is supported for profile connector - call, sms, whatsapp, or email are supported
Parameters:
task: ITask
The active task in the Flex UI
Returns:
boolean
true if the task is supported for profile connector
Example:
import { ProfileConnectorHelper } from "@twilio/flex-ui";const boolAnswer = ProfileConnectorHelper.isSupportedTask(task);
isTaskValidForLinking(task) => boolean#
Check if a task has a valid Status for linking to a profile connector - assigned or wrapping are supported
Parameters:
task: ITask
The active task in the Flex UI
Returns:
boolean
true if the task has a valid Status for linking to a profile connector
Example:
import { ProfileConnectorHelper } from "@twilio/flex-ui";const boolAnswer = ProfileConnectorHelper.isTaskValidForLinking(task);
setProfileConnectorForTask(task, profileConnector) => unknown#
Set profile connector for a task in ProfileConnectorContext, and interaction context
Parameters:
task: ITask
The active task to which the profile connector is associated
profileConnector: IProfileConnector
The profileConnector to set
Example:
import { ProfileConnectorHelper } from "@twilio/flex-ui";ProfileConnectorHelper.setProfileConnectorForTask(task, profileConnector);
eraseProfileConnectSidForTask(task, profileConnector) => unknown#
Erase profileConnectSid for a task
Parameters:
task: ITask
the task to erase profileConnectSid for
profileConnector: IProfileConnector
the profileConnector to erase
Example:
import { ProfileConnectorHelper } from "@twilio/flex-ui";ProfileConnectorHelper.eraseProfileConnectSidForTask(task, profileConnector);