Rate this page:

SmartQueueEvents

Add the following line to your scenario code to use the events:

require(Modules.SmartQueue);

Constants

ClientDisconnected

Copy URL

The client disconnected.

When you process the ClientDisconnected event, call the e.cancel() method inside the event manually to cancel the task.

Parameters

  • cancel:

    Cancels the pending request and removes it from the queue

  • A SmartQueue task

EnqueueSuccess

Copy URL

The task has been enqueued successfully.

Parameters

Error

Copy URL

An error occurred.

Parameters

OperatorReached

Copy URL

An agent responded to the task, e.g. answered the call. This event indicates that SmartQueue processed the task successfully.

Parameters

TaskCanceled

Copy URL

The task is cancelled.

Parameters

TaskDistributed

Copy URL

SmartQueue distributed the task to an agent. This event can occur multiple times if an agent does not respond during the timeout.

Parameters

  • operatorId:

    number

    The ID of the task's responsible agent

  • operatorName:

    string

    The name of the task's responsible agent

  • A SmartQueue task

Waiting

Copy URL

The task is waiting for distribution to an agent. This event occurs every 10 or 15 seconds and contains information about task's position in a queue and approximate response time.

Parameters

  • The task's waiting code

  • ewt:

    number

    Estimated time of agent's response in milliseconds

  • message:

    string

    The task's waiting status

  • position:

    number

    The task's position in the queue

  • A SmartQueue task