Add a Queue

Add and configure a queue.

Request URL

POST {base_url}/{api_path}/queue/create?access_token={access_token}

Request parameters

Parameter Required Type Description
number Yes String Queue number.
name Yes String Queue name.
enb_queue_skill_based_routing No Integer Whether to route queue calls based on agents' skill levels.
Valid value:
  • 0: Disable.
  • 1: Enable.
ring_strategy Yes String The ring strategy of the queue.

Valid value:

  • ring_all: Ring all available agents simultaneously until someone answers.
  • least_recent: Ring the available agent that was least recently called.
  • fewest_calls: Ring the available agent with the fewest completed calls.
  • random: Ring the agents randomly.
  • rrmemory: Round robin with memory.
  • linear: Ring the available agent in specific order based on the type of agents in the queue.
Note: If enb_queue_skill_based_routing is set to 1, queue calls will be routed in descending order of the agents' skill levels, and the ring strategy will only apply to agents with the same skill level.
moh No String The music to be played when callers are waiting in the queue.
Valid value:
  • default: The default music on hold.
  • Name of the existing music on hold playlist on PBX (Path: PBX Settings > Voice Prompt > Music on Hold).
max_wait_time No Integer The maximum time that callers are allowed to wait for an available agent in the queue (Unit: Second).
Valid value: 0 - 9999999.
Note: 0 indicates no restriction on the caller's waiting time in the queue.
fail_dest Yes String The destination type of unanswered queue calls.

Valid value:

  • end_call: Hang Up.
  • extension: Extension.
  • ext_vm: Extension Voicemail.
  • group_vm: Group Voicemail.
  • ivr: IVR.
  • ring_group: Ring Group.
  • queue: Queue.
  • external_num: External Number.
  • play_greeting: Play Prompt and Exit.
fail_dest_prefix No String This parameter defines different settings depending on the destination type of unanswered queue calls (fail_dest).
  • When the destination type is external_num, this parameter defines the dial-out prefix of the external number.
  • When the destination type is play_greeting, this parameter defines the play count of the prompt. The valid value is 1 - 5.
fail_dest_value No String The destination of unanswered queue calls. This parameter defines different settings depending on the destination type of unanswered queue calls (fail_dest).
  • When the destination type is play_greeting, this parameter defines the custom prompt file name. E.g. demo.wav.
  • When the destination type is extension, ext_vm, group_vm, ivr, ring_group, or queue, this parameter should be the unique ID of the destination.

    For example, the destination is the extension 2002, then this parameter should be set to the extension's ID 2.

  • When the destination type is external_num, this parameter defines the external number.
agent_timeout No Integer Ringing timeout for agents (Unit: Second).
Valid value: 1 - 9999999.
Note: If an agent did not answer the call after the ringing timeout, system will ring the next available agent according to the ring strategy.
retry_time No Integer The time interval before ringing the next available agent after the previous available agent's ringing timeout (Unit: Second).

Valid value: 1 - 9999999.

wrap_up_time No Integer Wrap-up time for agents, which can be used to handle post-call tasks after finishing a call (Unit: Second).

Valid value: 1 - 9999999.

Note: Agents will NOT receive queue calls until the wrap-up time is over.
agent_prompt No String The prompt to be played to agents when they answer a queue call.

Valid value: Name of the existing custom prompt file on PBX (Path: PBX Settings > Voice Prompt > Custom Prompt).

enb_ring_in_use No Integer Assign queue calls to agents that are during an active call.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_auto_pause No Integer When the number of consecutive missed queue calls for an agent reach the threshold, the system automatically pauses the agent and sends a notification email.

Valid value:

  • 0: Disable.
  • 1: Enable.
max_pause_miss_call No Integer The threshold for agent's consecutive missed calls.

Valid value: 1 - 5.

Note: This parameter is required when enb_auto_pause is set to 1.
dynamic_agent_list No Array <Dynamic_Agent_List> Information of the dynamic agents.
static_agent_list No Array <Static_Agent_List> Information of the static agents.
manager_list No Array <Manager_List> Information of the queue managers.
enb_email_miss_call No Integer Notify queue managers by email when a queue call is missed.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_email_abandon_call No Integer Notify queue managers by email when a queue call is abandoned.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_email_sla_alarm No Integer Notify queue managers by email when the Service Level Agreement (SLA) is lower than its alarm threshold.
Valid value:
  • 0: Disable.
  • 1: Enable.
callback_enb_request_email No Integer Notify queue managers by email when callers successfully request a queue callback.
Valid value:
  • 0: Disable.
  • 1: Enable.
callback_enb_failed_email No Integer Notify queue managers by emails when callers fail to request a queue callback.
Valid value:
  • 0: Disable.
  • 1: Enable.
max_calls No Integer The maximum number of callers allowed to wait in the queue.

Valid value: 1 - 9999.

alert_info No String The "Alert-info" Header in the INVITE request to trigger the IP phone to play distinctive ringtones when receiving an incoming call from this IVR.
enb_leave_empty No Integer Callers already on hold will be forced out of a queue when no agents are available.

Valid value:

  • 0: Disable.
  • 1: Enable.
    Note: If you set this parameter to 1, you can configure the empty_defined_for_leave_empty parameter to define the scenario(s) in which the queue will be considered to have no agents available.
empty_defined_for_leave_empty No String Define the scenario(s) in which the queue is considered to have no agents available, and on-hold callers are forced out of the queue.
Valid value:
  • 1: Agents are unavailable (Off Line)
  • 2: Agents are paused
  • 3: Agents are busy
Note: If you don't configure this parameter, it will be filled with the default value "1,2".
enb_disallow_to_join_when_empty No Integer Disallow callers to join a queue where no agents are available.
Valid value:
  • 0: Disable.
  • 1: Enable.
    Note: If you set this parameter to 1, you can configure the empty_defined_for_disallow_to_join_when_empty parameter to define the scenario(s) in which the queue will be considered to have no agents available.
empty_defined_for_disallow_to_join_when_empty No String Define the scenario(s) in which the queue is considered to have no agents available, and callers are NOT allowed to join.
Valid value:
  • 1: Agents are unavailable (Off Line)
  • 2: Agents are paused
  • 3: Agents are busy
Note: If you don't configure this parameter, it will be filled with the default value "1,2".
sla_time No Integer The Service Level Agreement (SLA) time (Unit: Second).

Valid value: 1 - 9999.

sla_interval No Integer The evaluation interval (Unit: Minute).

The time interval to compare the queue's SLA performance against the SLA alarm threshold, so the system can send a notification email accordingly.

Valid value: 1 - 9999.

sla_alarm_threshold No Integer The Service Level Agreement (SLA) alarm threshold for the queue.

Valid value: 1 - 999.

join_prompt No String The prompt played to callers when they join the queue.

Valid value: Name of the existing custom prompt file on PBX (Path: PBX Settings > Voice Prompt > Custom Prompt).

enb_announce_agent_id No Integer Announce the agent ID to callers.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_announce_default_prompt No Integer Periodically play the prompt "Thank You for Your Patience" to callers while they are waiting in the queue.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_announce_pos No Integer When callers are waiting in the queue, periodically announce the number of people waiting ahead of them.

Valid value:

  • 0: Disable.
  • 1: Enable.
enb_announce_hold_time No Integer Periodically announce the estimated waiting time to callers while they are waiting in the queue.

Valid value:

  • 0: Disable.
  • 1: Enable.
caller_announce_freq No Integer The time interval to announce the number of people waiting ahead to the callers (Unit: Second).

Valid value: 1 - 999.

sys_announce_prompt No String The queue announcement which is periodically played to callers after they reach the queue.

Valid value: Name of the existing custom prompt file on PBX (Path: PBX Settings > Voice Prompt > Custom Prompt).

sys_announce_freq No Integer The time interval to play the queue announcements (Unit: Second).

Valid value: 1 - 9999.

satisfa_survey_prompt No String The satisfaction survey prompt played to the caller after the agent hangs up the call.

Valid value:

  • default: The default prompt.
  • Name of the existing custom prompt file on PBX (Path: PBX Settings > Voice Prompt > Custom Prompt).
satisfa_survey_end_prompt No String The prompt played to callers after they press the key to rate agent's service.

Valid value:

  • default: The default prompt.
  • Name of the existing custom prompt file on PBX (Path: PBX Settings > Voice Prompt > Custom Prompt).
Note: This parameter ONLY takes effect when satisfa_survey_prompt is configured.
satisfaction_survey_point_list No Array <Satisfaction_Survey_Point_List> Satisfaction survey points. Different keys correspond to different points.
press_key No String The key to trigger the key press event.

After callers input the key according to the prompt, the call will be routed to the specified destination.

Valid value:
  • Number 0 - 9
  • *
  • #
key_dest No String The destination type of the key.
Valid value:
  • end_call: Hang Up.
  • extension: Extension.
  • ext_vm: Extension Voicemail.
  • group_vm: Group Voicemail.
  • ivr: IVR.
  • ring_group: Ring Group.
  • queue: Queue.
  • external_num: External Number.
  • play_greeting: Play Prompt and Exit.
key_dest_prefix No String This parameter defines different settings depending on the destination type of the key (key_dest).
  • When the destination type is external_num, this parameter defines the dial-out prefix of the external number.
  • When the destination type is play_greeting, this parameter defines the play count of the prompt. The valid value is 1 - 5.
key_dest_value No String The destination of the key. This parameter defines different settings depending on the destination type of the key (key_dest).
  • When the destination type is play_greeting, this parameter defines the custom prompt file name. E.g. demo.wav.
  • When the destination type is extension, ext_vm, group_vm, ivr, ring_group, or queue, this parameter should be the unique ID of the destination.

    For example, the destination is the extension 2002, then this parameter should be set to the extension's ID 2.

  • When the destination type is external_num, this parameter defines the external number.
enb_callback No Integer Whether to enable queue callback.

Valid value:

  • 0: Disable.
  • 1: Enable.
callback_method No String Method for callers to trigger callback requests when the queue is busy.

Valid value:

  • digit: Triggered by caller input.
  • timeout: Auto triggered after the timeout.
callback_press_key No String The key to trigger a callback request.
Note: This parameter is required when callback_method is set to digit.

Valid value:

  • Number 0 - 9
  • *
  • #
callback_trigger_timeout No Integer The timeout duration to trigger the callback request (Unit: Second).
Note: This parameter is required when callback_method is set to timeout.

Valid value: 0 - 1800

callback_outbound_prefix No String The prefix of the outbound route which is used for queue callback.
callback_timeout No String Type of the callback timeout.
Note: Callback timeout refers to the duration that a callback request can be reserved in the queue.

Valid value:

  • queue_max_wait_time: The maximum waiting time of the queue.
  • custom: Custom timeout duration.
callback_timeout_num No Integer Callback timeout duration (Unit: Second).

If there are no available agents in the queue within the timeout duration, the callback request will be cancelled.

Note: This parameter is required when callback_timeout is set to custom.

Valid value: 0 - 1800

Dynamic_Agent_List
Parameter Required Type Description
value Yes String The extension ID of the dynamic agent.
Note: You can query agent's extension ID using Search Specific Extensions.
type No String The type of the dynamic agent.

Valid value:

  • extension
number_value No Integer The skill level of the dynamic agent.
Valid value: 1 - 99
Note:
  • The smaller the number, the higher the skill level, and consequently the higher the priority for ringing.
  • If you do not configure this parameter, it will be filled with the default value 1 (the highest skill level).
  • This parameter takes effect ONLY when enb_queue_skill_based_routing is set to 1.
Static_Agent_List
Parameter Required Type Description
value Yes String The extension ID of the static agent.
Note: You can query agent's extension ID using Search Specific Extensions.
type No String The type of the static agent.

Valid value:

  • extension
number_value No Integer The skill level of the static agent.
Valid value: 1 - 99
Note:
  • The smaller the number, the higher the skill level, and consequently the higher the priority for ringing.
  • If you do not configure this parameter, it will be filled with the default value 1 (the highest skill level).
  • This parameter takes effect ONLY when enb_queue_skill_based_routing is set to 1.
Manager_List
Parameter Required Type Description
value Yes String The extension ID of the queue manager.
Note: You can query the manager's extension ID using Search Specific Extensions.
type No String The type of the queue manager.

Valid value:

  • extension
Satisfaction_Survey_Point_List
Parameter Required Type Description
K Yes String Satisfaction survey rating keys.

Valid value:

  • Number 0 - 9
  • *
P Yes Integer Satisfaction survey points.

Valid value: -99 - 99

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
id Integer The unique ID of the queue.

Examples

Request example

POST /openapi/v1.0/queue/create?access_token=sRuPSzYcPflKgdwSVpA1lhxlVLw0q0z1 HTTP/1.1 
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "number": "6410",
    "name": "Tech Support",
    "enb_queue_skill_based_routing": 1,
    "ring_strategy": "random",
    "moh": "default",
    "max_wait_time": 1200,
    "fail_dest": "play_greeting",
    "fail_dest_prefix": "3",
    "fail_dest_value": "IVR.wav",
    "agent_timeout": 15,
    "retry_time":5,
    "wrap_up_time": 30,
    "agent_prompt": "",
    "enb_ring_in_use": 0,
    "enb_auto_pause": 1,
    "max_pause_miss_call": 3,
    "dynamic_agent_list": [
         {
            "value":"72",
            "type":"extension",
            "number_value": 1
        }
    ],
    "static_agent_list": [
        {
            "value":"73",
            "type":"extension",,
            "number_value": 1
        },
        {
            "value":"76",
            "type":"extension",
            "number_value": 2
        }
    ],
    "manager_list": [
        {
            "value":"78",
            "type":"extension"
        }
    ],
    "enb_email_miss_call": 1,
    "enb_email_abandon_call": 1,
    "enb_email_sla_alarm": 1,
    "callback_enb_request_email": 1,
    "callback_enb_failed_email": 1,
    "max_calls": 1,
    "alert_info": "",
    "enb_leave_empty": 1,
    "empty_defined_for_leave_empty": [
        "1",
        "2",
        "3"
    ],
    "enb_disallow_to_join_when_empty": 1,
    "empty_defined_for_disallow_to_join_when_empty": [ 
        "1",
        "2"
    ],
    "sla_time": 30,
    "sla_interval": 30,
    "sla_alarm_threshold": 80,
    "join_prompt": "", 
    "enb_announce_agent_id": 0, 
    "enb_announce_default_prompt": 1, 
    "enb_announce_pos": 1, 
    "enb_announce_hold_time": 1, 
    "caller_announce_freq": 30, 
    "sys_announce_prompt": "", 
    "sys_announce_freq": 30, 
    "satisfa_survey_prompt": "default", 
    "satisfa_survey_end_prompt": "default", 
    "satisfaction_survey_point_list": [
        {
            "k": "0",
            "p": -5
        },
        {
            "k": "1",
            "p": -2
        },
        {
            "k": "2",
            "p": 0
        },
        {
            "k": "3",
            "p": 2
        },
        {
            "k": "4",
            "p": 5
        },
        {
            "k": "5",
            "p": 1
        },
        {
            "k": "6",
            "p": 1
        },
        {
            "k": "7",
            "p": 1
        },
        {
            "k": "8",
            "p": 1
        },
        {
            "k": "9",
            "p": 1
        },
        {
            "k": "*",
            "p": 10
        }
    ],
    "press_key": "#", 
    "key_dest": "end_call", 
    "key_dest_value": "",
    "key_dest_prefix": "",
    "enb_callback": 1,
    "callback_method": "digit", 
    "callback_press_key": "1", 
    "callback_trigger_timeout": 30, 
    "callback_outbound_prefix": "6",
    "callback_timeout": "custom",
    "callback_timeout_num": 120 
}
Request example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": 6
}