Suggestions

close search

Queue management

Create a queue

URL: https://icc-api.stringee.com/v1/queue

HTTP method: POST

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

POST data (body):

{
    "name": "QUEUE_NAME",
    "record_calls": RECORD_CALLS_OR_NOT,
    "agent_wrap_up_after_calls": ENABLE_WRAP_UP_AFTER_CALLS_OR_NOT,
    "wrap_up_time_limit": WRAP_UP_TIME_LIMIT,
    "schedule": SCHEDULE,
    "wait_agent_answer_timeout": TIMEOUT,
    "wait_greeting": "GREETING_FILE_NAME",
    "hold_greeting": "HOLD_GREETING_FILE_NAME",
    "maximum_queue_size": MAXIMUM_QUEUE_SIZE,
    "maximum_queue_wait_time": MAXIMUM_QUEUE_WAIT_TIME,
    "from_number_callout_to_agent": "STRINGEE_FROM_NUMBER",
    "get_list_agents_url": "LIST_AGENTS_WEBHOOK",
    "cond_routing": COND_ROUTING
}
Field Type Require Default Description
name String Yes The queue name
record_calls Boolean No true Record calls?
agent_wrap_up_after_calls Boolean No true Enabling wrap-up gives the agent time to finish taking notes after a call.
wrap_up_time_limit Int No 10 Wrap-up time limit (seconds)
schedule Int No 1 1=Always route calls; 2=Using business hours
wait_agent_answer_timeout Int No 15 Wait agent answer timeout (seconds); min=3
wait_greeting String No NULL Greeting filename. For upload greeting file, use this API
hold_greeting String No NULL Hold greeting file name (music on hold). For upload greeting file, use this API
maximum_queue_size Int No 5 (COMING SOON) New calls that exceed this limit are directed to voicemail.
maximum_queue_wait_time Int No 60 (COMING SOON) Callers who wait longer than this limit are directed to voicemail (seconds).
from_number_callout_to_agent String No NULL The from phone number when callout to agent's phone number
get_list_agents_url String No NULL If get_list_agents_url = NULL (by default): Stringee ICC will find Agents to answer the call in Groups which have been assigned to the Queue.
If get_list_agents_url is set: Stringee ICC will send HTTP POST request to get_list_agents_url to get the Agents list, the response format is shown below
cond_routing Int No 1 1: Route the call to the agent only if the agent is online on Web/App (or offline but has push notification);
2: Route the call to the agent when the agent is online on Web/App or SIP phone (or offline but has push notification)

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "queueID": "YOUR_QUEUE_ID",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String No Result message
queueID String No The queue ID if create successfully

Sample request

POST /v1/queue HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "name": "QUEUE_NAME",
    "record_calls": false,
    "agent_wrap_up_after_calls": true,
    "wrap_up_time_limit": 20,
    "schedule": 2,   
    "wait_agent_answer_timeout": 15,
    "wait_greeting": "file-1.mp3",
    "maximum_queue_size": 5,
    "maximum_queue_wait_time": 60
}

Sample response

{
    "r": 0,
    "project": 246,
    "queueID":"5CAI08V9BBU6S0EH"
    "message": "Create queue success"
}

get_list_agents_url POST data sample

{
    "queueId": "queue_1",
    "calls": [{
        "callId": "call-vn-1-EHHC6JW1LT-1534145391502",
        "from": "84986776777",
        "to": "842473082666"
    }, {
        "callId": "call-vn-1-EHHC6JW1LT-1534145391504",
        "from": "84919982888",
        "to": "842473082888"
    }],
    "projectId": 25
}

get_list_agents_url response sample

{
    "version": 2,
    "calls": [{
            "callId": "call-vn-1-EHHC6JW1LT-1534145391502",
            "agents": [{
                    "stringee_user_id": "agent_1",
                    "phone_number": "84909992666",
                    "routing_type": 2,
                    "answer_timeout": 15
                },
                {
                    "stringee_user_id": "agent_2",
                    "phone_number": "84909992666",
                    "routing_type": 1,
                    "answer_timeout": 10
                }
            ]
        },

        {
            "callId": "call-vn-1-EHHC6JW1LT-1534145391504",
            "agents": [{
                    "stringee_user_id": "agent_1",
                    "phone_number": "84909992666",
                    "routing_type": 2,
                    "answer_timeout": 15
                }
            ]
        }
    ]
}

Check https://developer.stringee.com/docs/icc-rest-api/contact-center-agent-management for more info.

Queue list

URL: https://icc-api.stringee.com/v1/queue

HTTP method: GET

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

GET parameters:

Field Type Require Description
page Int NO Page
limit Int NO The maximum number of queues to get

Response:

{
    "r": 0,
    "message": "Load queue(s) success",
    "project": 2,
    "data": {
        "totalCount": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "queues": [
            {
                "id": "QU_N5QCBUD0FEXRPJRZ",
                "account": 2,
                "project": 2,
                "name": "QUEUE 33",
                "agent_wrap_up_after_calls": 1,
                "wrap_up_time_limit": 10,
                "enable_voicemail": 0,
                "schedule": 1,
                "wait_greeting": "",
                "hold_greeting": "file-1.mp3",
                "wait_agent_answer_timeout": 15,
                "record_calls": 1
            }
        ]
    }
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String Yes Result message
data JSON Yes Queue list

Sample request

GET /v1/queue HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "message": "Load queue(s) success",
    "project": 246,
    "data": {
        "totalQueues": "1",
        "totalPages": 1,
        "currentPage": 1,
        "limit": 50,
        "queues": [
            {
                "id": "QU_F4JW32F90KX39GC3",
                "account": 408,
                "project": 246,
                "name": "Support Queue",
                "agent_wrap_up_after_calls": 0,
                "wrap_up_time_limit": 0,
                "enable_voicemail": 0,
                "schedule": 1,
                "wait_greeting": 0,
                "hold_greeting": 0,
                "wait_agent_answer_timeout": 0,
                "record_calls": 1
            }
        ]
    }
}

Delete a queue

URL: https://icc-api.stringee.com/v1/queue/{QUEUE_ID}

HTTP method: DELETE

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

URI Parameters:

Field Type Require Description
{QUEUE_ID} String Yes The queue ID

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int Yes Your project ID
message String No Result message

Sample request

DELETE /v1/queue/QU_PRWHUKZJ8EMA2U0Y HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "project": 246,
    "message": "Delete queue success"
}

Update queue

URL: https://icc-api.stringee.com/v1/queue/{QUEUE_ID}

HTTP method: PUT

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see Authentication

PUT data (body):

{
    "name": "QUEUE_NAME",
    "record_calls": RECORD_CALLS_OR_NOT,
    "agent_wrap_up_after_calls": ENABLE_WRAP_UP_AFTER_CALLS_OR_NOT,
    "wrap_up_time_limit": WRAP_UP_TIME_LIMIT,
    "schedule": SCHEDULE,
    "wait_agent_answer_timeout": TIMEOUT,
    "wait_greeting": "GREETING_FILE_NAME",
    "hold_greeting": "HOLD_GREETING_FILE_NAME",
    "maximum_queue_size": MAXIMUM_QUEUE_SIZE,
    "maximum_queue_wait_time": MAXIMUM_QUEUE_WAIT_TIME,
    "from_number_callout_to_agent": "STRINGEE_FROM_NUMBER",
    "get_list_agents_url": "LIST_AGENTS_WEBHOOK",
    "cond_routing": COND_ROUTING
}
Field Type Require Description
name String No The queue name
record_calls Boolean No Record calls?
agent_wrap_up_after_calls Boolean No Enabling wrap-up gives the agent time to finish taking notes after a call.
wrap_up_time_limit Int No Wrap-up time limit (seconds)
schedule Int No 1=Always route calls; 2=Using business hours
wait_agent_answer_timeout Int No Wait agent answer timeout (seconds); min=3
wait_greeting String No Greeting filename (use "" to clear). For upload greeting file, use this API
hold_greeting String No Hold greeting file name (use "" to clear). For upload greeting file, use this API
maximum_queue_size Int No (COMING SOON) New calls that exceed this limit are directed to voicemail.
maximum_queue_wait_time Int No (COMING SOON) Callers who wait longer than this limit are directed to voicemail (seconds).
from_number_callout_to_agent String No The from phone number when callout to agent's phone number
get_list_agents_url String No If get_list_agents_url = NULL (by default): Stringee ICC will find Agents to answer the call in Groups which have been assigned to the Queue.
If get_list_agents_url is set: Stringee ICC will send HTTP GET request to get_list_agents_url to get the Agents list, the response format is shown below
cond_routing Int No 1 1: Route the call to the agent only if the agent is online on Web/App (or offline but has push notification);
2: Route the call to the agent when the agent is online on Web/App or SIP phone (or offline but has push notification)

URI Parameters:

Field Type Require Description
{QUEUE_ID} String Yes Queue ID

Response:

{
    "r": RESULT_CODE,
    "project": YOUR_PROJECT_ID,
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
project Int No Your project ID
message String Yes Result message

Sample request

PUT /v1/queue/QU_H7CFNKKKUGYG5N2R HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "record_calls": false,
    "wait_agent_answer_timeout": 33
}

Sample response

{
    "r": 0,
    "message": "Update queue success",
    "project": 2
}