SmartQueue
Methods
GetSmartQueueRealtimeMetrics
Gets the metrics for the specified smart queue for the last 30 minutes.
Parameters
application_id:
number
The application ID to search by
application_name:
string
The application name to search by. Can be used instead of the application_id parameter
user_id:
intlist
OptionalThe user ID list with a maximum of 5 values separated by the ';' symbol. Use the 'all' value to select all users. Can operate as a filter for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
user_name:
stringlist
OptionalThe user name list separated by the ';' symbol. user_name can be used instead of user_id
sq_queue_id:
intlist
OptionalThe smart queue ID list with a maximum of 5 values separated by the ';' symbol. Can operate as filter for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
sq_queue_name:
stringlist
OptionalThe smart queue name list separated by the ';' symbol. Can be used instead of sq_queue_id
from_date:
timestamp
OptionalThe from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 30 minutes
to_date:
timestamp
OptionalThe to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time
timezone:
string
OptionalDefaults on: UTCThe selected timezone or the 'auto' value (the account location)
interval:
string
OptionalDefaults on: 0-0-0 0:30:0Interval format: YYYY-MM-DD HH:mm:ss. Default is 30 minutes
report_type:
stringlist
The report type. Possible values are calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_time_in_queue,max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, sum_agents_custom_1_time … sum_agents_custom_10_time
group_by:
string
OptionalGroup the result by agent or queue. The agent grouping is allowed for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The queue grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
max_waiting_sec:
number
OptionalMaximum waiting time. Required for the service_level report type
Returns
result:
timezone:
string
The used timezone, e.g., 'Etc/GMT'
GetSmartQueueDayHistory
Gets the metrics for the specified smart queue for the last 2 days.
Parameters
application_id:
number
The application ID to search by
application_name:
string
The application name to search by. Can be used instead of the application_id parameter
user_id:
intlist
OptionalThe user ID list with a maximum of 5 values separated by the ';' symbol. Use the 'all' value to select all users. Can operate as a filter for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
user_name:
stringlist
OptionalThe user name list separated by the ';' symbol. user_name can be used instead of user_id
sq_queue_id:
intlist
The smart queue ID list with a maximum of 5 values separated by the ';' symbol. Can operate as filter for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
sq_queue_name:
stringlist
OptionalThe smart queue name list separated by the ';' symbol. Can be used instead of sq_queue_id
from_date:
timestamp
OptionalThe from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 1 day
to_date:
timestamp
OptionalThe to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time
timezone:
string
OptionalDefaults on: UTCThe selected timezone or the 'auto' value (the account location)
interval:
string
OptionalDefaults on: 0-0-1 0:0:0Interval format: YYYY-MM-DD HH:mm:ss. Default is 1 day
report_type:
stringlist
The report type. Possible values are calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_time_in_queue,max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, sum_agents_custom_1_time … sum_agents_custom_10_time
group_by:
string
OptionalGroup the result by agent or queue. The agent grouping is allowed only for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The queue grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
max_waiting_sec:
number
OptionalMaximum waiting time. Required for the service_level report type
Returns
result:
timezone:
string
The used timezone, e.g., 'Etc/GMT'
RequestSmartQueueHistory
Gets history for the specified smart queue.
Parameters
application_id:
number
The application ID to search by
application_name:
string
The application name to search by. Can be used instead of the application_id parameter
user_id:
intlist
OptionalThe user ID list with a maximum of 5 values separated by the ';' symbol. Use the 'all' value to select all users. Can operate as a filter for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
user_name:
stringlist
OptionalThe user name list separated by the ';' symbol. Can be used instead of user_id
sq_queue_id:
intlist
The smart queue ID list with a maximum of 5 values separated by the ';' symbol. Can operate as filter for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
sq_queue_name:
stringlist
OptionalThe smart queue name list separated by the ';' symbol. Can be used instead of sq_queue_id
from_date:
timestamp
The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 1 day
to_date:
timestamp
The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time
timezone:
string
OptionalDefaults on: UTCThe selected timezone or the 'auto' value (the account location)
interval:
string
OptionalDefaults on: 0-0-1 0:0:0Interval format: YYYY-MM-DD HH:mm:ss. Default is 1 day
report_type:
stringlist
The report type. Possible values are calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_time_in_queue,max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, sum_agents_custom_1_time … sum_agents_custom_10_time
group_by:
string
OptionalGroup the result by agent or queue. The agent grouping is allowed only for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The queue grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types
max_waiting_sec:
number
OptionalMaximum waiting time. Required for the service_level report type
Returns
result:
number
1
history_report_id:
number
History report ID
GetSQState
Gets the current state of the specified smart queue.
Parameters
application_id:
number
The application ID to search by
application_name:
string
OptionalThe application name to search by. Can be used instead of the application_id parameter
sq_queue_id:
intlist
The smart queue ID list separated by the ';' symbol. Use the 'all' value to select all smart queues
sq_queue_name:
stringlist
OptionalThe smart queue name list separated by the ';' symbol. Can be used instead of sq_queue_id
timezone:
string
OptionalDefaults on: UTCThe selected timezone or the 'auto' value (the account location)
Returns
result:
SQ_SetAgentCustomStatusMapping
Adds a status if there is no match for the given internal status and renames it if there is a match. It means that if the passed sq_status_name parameter is not in the mapping table, a new entry is created in there; if it is, the name field in its mapping is replaced with custom_status_name.
Parameters
sq_status_name:
string
Status name
custom_status_name:
string
Custom status name
application_id:
number
Application ID
Returns
result:
number
1
SQ_GetAgentCustomStatusMapping
Returns the mapping list of SQ statuses and custom statuses. SQ statuses are returned whether or not they have mappings to custom statuses.
Parameters
application_id:
number
OptionalApplication ID
Returns
sq_status_name:
string
Status name
custom_status_name:
string
Custom status name
SQ_DeleteAgentCustomStatusMapping
Removes a mapping from the mapping table. If there is no such mapping, does nothing.
Parameters
sq_status_name:
string
OptionalStatus name
application_id:
number
Application ID
Returns
result:
number
1
SQ_AddQueue
Adds a new queue.
Parameters
application_id:
number
ID of the application to bind to
application_name:
string
OptionalName of the application to bind to. Can be used instead of application_id
sq_queue_name:
string
Unique smart queue name within the application, up to 100 characters
call_agent_selection:
[SQAgentSelectionStrategies]
Agent selection strategy for calls
im_agent_selection:
[SQAgentSelectionStrategies]
OptionalAgent selection strategy for messages. Equals to the call_agent_selection value by default
call_task_selection:
Strategy of prioritizing CALL-type requests for service
im_task_selection:
OptionalStrategy of prioritizing IM-type requests for service. Equals to the call_task_selection value by default
description:
string
OptionalComment, up to 200 characters
call_max_waiting_time:
number
OptionalDefaults on: 120Maximum time in minutes that a CALL-type request can remain in the queue without being assigned to an agent
im_max_waiting_time:
number
OptionalDefaults on: 120Maximum time in minutes that an IM-type request can remain in the queue without being assigned to an agent
call_max_queue_size:
number
OptionalDefaults on: 1000Maximum size of the queue with CALL-type requests
im_max_queue_size:
number
OptionalDefaults on: 1000Maximum size of the queue with IM-type requests
Returns
sq_queue_id:
number
ID of the added queue
SQ_SetQueueInfo
Edits an existing queue.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
number
ID of the smart queue to search for
sq_queue_name:
string
OptionalName of the smart queue to search for. Can be used instead of sq_queue_id
new_sq_queue_name:
string
OptionalNew smart queue name within the application, up to 100 characters
call_agent_selection:
[SQAgentSelectionStrategies]
OptionalAgent selection strategy for calls
im_agent_selection:
[SQAgentSelectionStrategies]
OptionalAgent selection strategy for messages. Equals to the call_agent_selection value by default
call_task_selection:
OptionalStrategy of prioritizing CALL-type requests for service
im_task_selection:
OptionalStrategy of prioritizing IM-type requests for service. Equals to the call_task_selection value by default
description:
string
OptionalComment, up to 200 characters
call_max_waiting_time:
number
OptionalDefaults on: 120Maximum time in minutes that a CALL-type request can remain in the queue without being assigned to an agent
im_max_waiting_time:
number
OptionalDefaults on: 120Maximum time in minutes that an IM-type request can remain in the queue without being assigned to an agent
call_max_queue_size:
number
OptionalDefaults on: 1000Maximum size of the queue with CALL-type requests
im_max_queue_size:
number
OptionalDefaults on: 1000Maximum size of the queue with IM-type requests
Returns
result:
number
1
SQ_DelQueue
Deletes a queue.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
intlist
List of smart queue IDs separated by the ';' symbol. Use 'all' to delete all the queues
sq_queue_name:
stringlist
OptionalList of smart queue names separated by the ';' symbol. Can be used instead of sq_queue_id
Returns
result:
number
1
SQ_GetQueues
Gets the queue(s).
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
intlist
OptionalList of smart queue IDs separated by the ';' symbol
sq_queue_name:
stringlist
OptionalList of smart queue names separated by the ';' symbol. Can be used instead of sq_queue_id
sq_queue_name_template:
string
OptionalSubstring of the smart queue name to filter
user_id:
number
OptionalID of the user that is bound to the queue
user_name:
string
OptionalName of the user that is bound to the queue. Can be used instead of user_id
excluded_user_id:
number
OptionalID of the user that is not bound to the queue
excluded_user_name:
string
OptionalName of the user that is not bound to the queue. Can be used instead of excluded_user_id
count:
number
OptionalDefaults on: 20Number of items to show in the output
offset:
number
OptionalDefaults on: 0Number of items to skip in the output
Returns
result:
The found skill(s)
SQ_AddSkill
Adds a new skill to the app.
Parameters
application_id:
number
ID of the application to bind to
application_name:
string
OptionalName of the application to bind to. Can be used instead of application_id
sq_skill_name:
string
Unique skill name within the application
description:
string
OptionalComment, up to 200 characters
Returns
result:
number
1
SQ_DelSkill
Deletes a skill and detaches it from agents.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_skill_id:
intlist
List of skill IDs separated by the ';' symbol. Use 'all' to delete all the skills
sq_skill_name:
stringlist
OptionalList of skill names separated by the ';' symbol. Can be used instead of sq_skill_id
Returns
result:
number
1
SQ_SetSkillInfo
Edits an existing skill.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_skill_id:
number
ID of the skill
sq_skill_name:
string
OptionalName of the skill. Can be used instead of sq_skill_id
new_sq_skill_name:
string
OptionalNew unique skill name within the application
description:
string
OptionalComment, up to 200 characters
Returns
result:
number
1
SQ_BindSkill
Binds skills to agents.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
user_id:
intlist
List of user IDs separated by the ';' symbol. Use 'all' to select all the users
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
sq_skills:
Object
Skills to be bound to agents in the json array format. The array should contain objects with the sq_skill_id/sq_skill_name and sq_skill_level keys where skill levels range from 1 to 5
bind_mode:
OptionalDefaults on: addBinding mode
Returns
result:
number
1
SQ_UnbindSkill
Unbinds skills from agents.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
user_id:
intlist
List of user IDs separated by the ';' symbol. Use 'all' to select all the users
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
sq_skill_id:
intlist
List of skill IDs separated by the ';' symbol. Use 'all' to undbind all the skills
sq_skill_name:
stringlist
OptionalList of skill names separated by the ';' symbol. Can be used instead of sq_skill_id
Returns
result:
number
1
SQ_GetSkills
Gets the skill(s).
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
user_id:
intlist
OptionalList of user IDs separated by the ';' symbol
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
sq_skill_id:
intlist
OptionalList of skill IDs separated by the ';' symbol
sq_skill_name:
stringlist
OptionalList of skill names separated by the ';' symbol. Can be used instead of sq_skill_id
sq_skill_name_template:
string
OptionalSubstring of the skill name to filter, case-insensitive
excluded_user_id:
number
OptionalID of the user that is not bound to the skill
excluded_user_name:
string
OptionalName of the user that is not bound to the skill. Can be used instead of excluded_user_id
count:
number
OptionalDefaults on: 20Number of items to show in the output
offset:
number
OptionalDefaults on: 0Number of items to skip in the output
Returns
result:
The found skill(s).
SQ_BindAgent
Binds agents to a queue.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
number
ID of the smart queue
sq_queue_name:
string
OptionalName of the smart queue
user_id:
intlist
List of user IDs separated by the ';' symbol. Use 'all' to select all the users
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
bind_mode:
OptionalDefaults on: addBinding mode
Returns
result:
number
1
SQ_UnbindAgent
Unbinds agents from queues.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
intlist
List of smart queue IDs separated by the ';' symbol. Use 'all' to select all the queues
sq_queue_name:
stringlist
OptionalList of smart queue names separated by the ';' symbol. Can be used instead of sq_queue_id
user_id:
intlist
List of user IDs separated by the ';' symbol. Use 'all' to select all the users
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
Returns
result:
number
1
SQ_GetAgents
Gets agents.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
sq_queue_id:
intlist
OptionalList of smart queue IDs separated by the ';' symbol. Use 'all' to select all the queues
sq_queue_name:
stringlist
OptionalList of smart queue names separated by the ';' symbol. Can be used instead of sq_queue_id
excluded_sq_queue_id:
number
OptionalID of the smart queue to exclude
excluded_sq_queue_name:
string
OptionalName of the smart queue to exclude. Can be used instead of excluded_sq_queue_id
sq_skills:
Object
OptionalSkills to filter in the json array format. The array should contain objects with the sq_skill_id/sq_skill_name, min_sq_skill_level, and max_sq_skill_level keys where skill levels range from 1 to 5
user_id:
intlist
OptionalList of user IDs separated by the ';' symbol
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
user_name_template:
string
OptionalSubstring of the user name to filter
sq_statuses:
Object
OptionalFilter statuses in the json array format. The array should contain objects with the sq_status_type and sq_status_name keys. Possible values for sq_status_type are 'CALL' and'IM'. Possible values for sq_status_name are 'OFFLINE', 'ONLINE', 'READY', 'IN_SERVICE', 'AFTER_SERVICE', 'DND'
with_sq_skills:
boolean
OptionalDefaults on: falseDisplay agent skills
with_sq_queues:
boolean
OptionalDefaults on: falseDisplay agent queues
with_sq_statuses:
boolean
OptionalDefaults on: falseDisplay agent current statuses
count:
number
OptionalDefaults on: 20Number of items to show in the output
offset:
number
OptionalDefaults on: 0Number of items to skip in the output
Returns
result:
The found agent(s)
SQ_SetAgentInfo
Edits the agent settings.
Parameters
application_id:
number
ID of the application to search by
application_name:
string
OptionalName of the application to search by. Can be used instead of application_id
user_id:
intlist
List of user IDs separated by the ';' symbol. Use 'all' to select all the users
user_name:
stringlist
OptionalList of user names separated by the ';' symbol. Can be used instead of user_id
max_simultaneous_conversations:
number
OptionalDefaults on: 5Maximum number of chats that the user processes simultaneously
handle_calls:
boolean
The agent can handle calls. When set to false, the agent is excluded from the CALL-request distribution
Returns
result:
number
1