Interface for managing task-related operations in the contact center Extends EventEmitter to support event-driven task updates

interface ITask {
    autoWrapup?: default;
    data: TaskData;
    webCallMap: Record<string, string>;
    accept(): Promise<TaskResponse>;
    cancelAutoWrapupTimer(): void;
    decline(): Promise<TaskResponse>;
    end(): Promise<TaskResponse>;
    hold(): Promise<TaskResponse>;
    pauseRecording(): Promise<TaskResponse>;
    resume(): Promise<TaskResponse>;
    resumeRecording(resumeRecordingPayload): Promise<TaskResponse>;
    wrapup(wrapupPayload): Promise<TaskResponse>;
}

Hierarchy

  • EventEmitter
    • ITask

Implemented by

Properties

autoWrapup?: default

Auto-wrapup timer for the task This is used to automatically wrap up tasks after a specified duration as defined in AutoWrapup

data: TaskData

Event data received in the Contact Center events. Contains detailed task information including interaction details, media resources, and participant data as defined in TaskData

webCallMap: Record<string, string>

Map associating tasks with their corresponding call identifiers.

Methods

  • cancels the auto-wrapup timer for the task This method stops the auto-wrapup process if it is currently active Note: This is supported only in single session mode. Not supported in multi-session mode.

    Returns void

    void

  • Initiates wrap-up process for the task with specified details

    Parameters

    • wrapupPayload: WrapupPayLoad

      Wrap-up details including reason and auxiliary code

    Returns Promise<TaskResponse>

    Promise

    Example

    task.wrapup({
    wrapUpReason: "Customer issue resolved",
    auxCodeId: "RESOLVED"
    });