SIGN UP

ACDRequest

Represents request that was put to ACD queue

Methods

addEventListener

addEventListener(acdevent: Function, handler: Function): void

Adds handler for specific event generated by ACD request

Parameters

  • acdevent:

    Function

    Event class (i.e., ACDEvents.Offline)

  • handler:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • Return:

    void

cancel

cancel(): void

Cancel pending request and remove it from queue

Returns

  • Return:

    void

getStatus

getStatus(): void

Request status of the current request. The call of this method will trigger the ACDEvents.Waiting event; it's possible to retrieve an estimated wait time in minutes via the ewt property of the event.

Returns

  • Return:

    void

id

id(): String

Returns request id. It can be used as the acd_request_id parameter in the GetACDHistory method to search in ACD history.

Returns

  • Return:

    String

removeEventListener

removeEventListener(acdevent: Function, handler: Function): void

Removes handler for specific event generated by ACD request

Parameters

  • acdevent:

    Function

    Event class (i.e., ACDEvents.Offline)

  • handler:

    Function
    Optional

    Handler function. If not specified, all event listeners are removed

Returns

  • Return:

    void