Rate this page:

ACDRequest

Represents request that was put to ACD queue. Add the following line to your scenario code to use the class:

require(Modules.ACD);

Methods

addEventListener

Copy URL
addEventListener(event: 

ACDEvents

,
handler:

Function

):

void

Adds handler for specific event generated by ACD request

Parameters

  • event:

    ACDEvents

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

  • handler:

    Function

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

Returns

  • type:

    void

cancel

Copy URL
cancel(): 

void

Cancel pending request and remove it from queue

Returns

  • type:

    void

getStatus

Copy URL
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

  • type:

    void

id

Copy URL
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

  • type:

    string

removeEventListener

Copy URL
removeEventListener(event: 

ACDEvents

,
handler:

Function

):

void

Removes handler for specific event generated by ACD request

Parameters

  • event:

    ACDEvents

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

  • handler:

    Function

    Optional

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

Returns

  • type:

    void