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: ITaskThe active task in the Flex UI
Returns:
booleantrue 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: ITaskThe active task in the Flex UI
Returns:
booleantrue 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: ITaskThe active task to which the profile connector is associated
profileConnector: IProfileConnectorThe 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: ITaskthe task to erase profileConnectSid for
profileConnector: IProfileConnectorthe profileConnector to erase
Example:
import { ProfileConnectorHelper } from "@twilio/flex-ui";ProfileConnectorHelper.eraseProfileConnectSidForTask(task, profileConnector);