@twilio/flex-sdk
    Preparing search index...

    Ends a task.

    The unique identifier (SID) of the task to be ended.

    A promise that resolves to a Reservation and a Task object, representing the ended task.

    import { createClient } from "@twilio/flex-sdk";
    import { EndTask } from "@twilio/flex-sdk/actions/Task";

    async function endTask() {
    const client = await createClient("SDK_TOKEN");
    const endTask = new EndTask("WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    const { task, reservation } = await client.execute(endTask);
    return { task, reservation };
    }

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • taskSid: string

      Returns EndTask

    Methods