SmartQueueEvents
Add the following line to your scenario code to use the events:
require(Modules.SmartQueue);
Constants
ClientDisconnected
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
task:
A SmartQueue task
EnqueueSuccess
The task has been enqueued successfully.
Parameters
task:
A SmartQueue task
Error
An error occurred.
Parameters
description:
string
The SmartQueue task's error description
task:
A SmartQueue task
type:
The SmartQueue error code
OperatorReached
An agent responded to the task, e.g. answered the call. This event indicates that SmartQueue processed the task successfully.
Parameters
agentCall:
The agent's Call object
task:
A SmartQueue task
TaskCanceled
The task is cancelled.
Parameters
description:
string
The SmartQueue task's error description
status:
The SmartQueue termination status
task:
A SmartQueue task
TaskDistributed
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
task:
A SmartQueue task
Waiting
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
code:
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
task:
A SmartQueue task