SmartQueueTask
A SmartQueue task is for a certain agent, which can be a call or a chat.
Add the following line to your scenario code to use the class:
require(Modules.SmartQueue);
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified SmartQueueEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.
Parameters
event:
Event class (i.e., SmartQueueEvents.OperatorReached)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
end
end(description: string
): void
Ends the current task.
Parameters
description:
string
Returns
type:
void
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified SmartQueueEvents event.
Parameters
event:
Event class (i.e., SmartQueueEvents.OperatorReached)
callback:
Function
OptionalOptional. Handler function. If not specified, all handler functions are removed
Returns
type:
void
Props
id
id: string
A SmartQueue task's ID.
settings
settings:
SmartQueue task's settings, such as required skills, priority, queue and more.
status
status:
Current status of the task, whether it is distributing, connecting, connected, ended or failed.