Rate this page:

Task Channel Definitions example use cases

Adding a Tab to custom channel

MyCallChannel.addedComponents = [
        target: "TaskCanvasTabs",
        component: <MyTab
            icon={<img src="https://someimage.png" />}
            iconActive={<img src="someimage.png" />}

Replacing a component (e.g. TaskInfoPanel or MessagingCanvas)

const MyComponent = <div key="X">My Call Task Info Panel</div>;
MyCallChannel.replacedComponents = [
    { component: MyComponent, target: "TaskInfoPanel" }

Replacing a component conditionally

MyCallChannel.replacedComponents = [
    { component: MyComponent, target: "MessagingCanvas", options:
        { if: (props) => props.task.status === "wrapping" }

Change strings based on task types (e.g., for end task button in the header):

myOwnChatChannel.templates.TaskCanvasHeader.endButton = {
    Assigned: "End Task",
    Reserved: undefined,
    Wrapping: "Wrap up",
    Completed: "Template1",
    Canceled: "Template2",
    Pending: "Template3"

Removing a component conditionally (e.g., remove action button from TaskListItem if task is in state "wrapping")

Flex.DefaultTaskChannels.Call.removedComponents = [{
    target: "TaskCanvasHeader",
    key: "actions",
    options: {
        if: (props) => props.task.status === "wrapping"
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.


        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more