> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # SmartQueueEvents ## Values **`Waiting`** `'SmartQueue.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. --- **`OperatorReached`** `'SmartQueue.OperatorReached'` An agent responded to the task, e.g. answered the call. This event indicates that SmartQueue processed the task successfully. --- **`EnqueueSuccess`** `'SmartQueue.EnqueueSuccess'` The task has been enqueued successfully. --- **`TaskDistributed`** `'SmartQueue.DistributeTask'` SmartQueue distributed the task to an agent. This event can occur multiple times if an agent does not respond during the timeout. --- **`ClientDisconnected`** `'SmartQueue.ClientDisconnected'` The client disconnected. When you process the **ClientDisconnected** event, call the `e.cancel()` method inside the event manually to cancel the task. --- **`TaskCanceled`** `'SmartQueue.TaskCanceled'` The task is cancelled. --- **`Error`** `'SmartQueue.Error'` An error occurred. --- > Add the following line to your scenario code to use the events: ``` require(Modules.SmartQueue); ```