Chime API

API documentation for Chime for Lync

Try Cloud Version

Chime for Lync® has an API available to determine queue availability and wait times, which may be useful when exposing click-to-chat links out on various portal pages. This guide should outline the API calls available, and their responses.

All API calls are made as GET requests to ChimeServer/API/MethodName

Queue Availability

Method IsQueueAvailable
Parameters queueID (int)
Summary Checks availability of queue, and returns true or false.
Response

{
    "isAvailable": true
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/IsQueueAvailable',
    { queueID: 1 },
    function(data){
        if(data){
            //Do something to show queue is available
        } else {
            //Do something to show queue is unavailable
        }
    }
);

                    

Queue Wait Time

Method GetQueueWaitTime
Parameters queueID (int)
Summary Checks wait time for queue, returns average and longest wait time.
Response

{
    "averageWaitTime": "00:00:00",
    "longestWaitTime": "00:00:00"
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetQueueWaitTime',
    { queueID: 1 },
    function(data){
        //Do something with the response
    }
);

                    

Queue Info

Method GetQueueInfo
Parameters queueID (int)
Summary Returns various information for a queue, such as name, status etc.
Response

{
    "queueID": 1,
    "queueName": "Main Engineering",
    "isAvailable": true,
    "onlineAgentCount": 1,
    "averageWaitTime": "00:00:00",
    "longestWaitTime": "00:00:00"
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetQueueInfo',
    { queueID: 1 },
    function(data){
        //Do something with the response
    }
);

                    

Get Queues

Method GetQueues
Parameters N/A
Summary Returns information on all queues.
Response

    {
        "id": 1,
        "name": "Service Desk English",
        "description": "Service desk queue for English",
        "enabled": true,
        "available": false,
        "webClientID": 1
    },
    {
        "id": 2,
        "name": "Service Desk Italian",
        "description": "Service desk queue for Italian",
        "enabled": true,
        "available": false,
        "webClientID": 2
    }

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetQueues',
    function(data){
        //Do something with the response
    }
);


                    

Queue Agents

Method QueueAgents
Parameters queueID (int)
Summary Returns information on all agents in a queue.
Response

{
        "id": 143,
        "firstName": "JSmith",
        "lastName": "Agent 7",
        "priority": 1,
        "disabledAtStart": false,
        "isManager": true,
        "readOnly": false,
        "uri": "sip:jsmith123@instant-tech.com",
        "role": 0,
        "tags": [            
            {
                "BestMatchID": 4,
                "Text": "Outlook/Exchange",
                "Icon": "fa-envelope",
                "QueueSortingOrder": 0
            }
            ],
        "Guid": "2c8cdde1-9c8b-478f-ae9a-2b94878d870f"
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetQueueInfo',
    { queueID: 1 },
    function(data){
        //Do something with the response
    }
);

                    

Agent Presence

Method AgentPresence
Parameters sip:(SIP address)
Summary Returns information on specific agent.
Response

{
    "firstName": "JSmith",
    "lastName": "Agent 1",
    "displayName": "John Smith",
    "sip": "sip:jsmith123@instant-tech.com",
    "ChimeID": 921,
    "lyncPresence": "Online",
    "availableInChime": true,
    "imageUrl": "/Instant-tech.com/Chime/ExpertPhoto/921"
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/AgentPresence',
    { sip: jsmith123@instant-tech.com },
    function(data){
        //Do something with the response
    }
);

                    

Get Agent Skill Tags

Method GetAgentSkillTags
Parameters sip:(SIP address)
Summary Returns skill tags assigned to specific agent.
Response

    {
        "BestMatchID": 4,
        "Text": "Outlook/Exchange",
        "Icon": "fa-envelope",
        "QueueSortingOrder": 0
    },
    {
        "BestMatchID": 7,
        "Text": "Mobility",
        "Icon": "fa-mobile",
        "QueueSortingOrder": 0
    }

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetAgentSkillTags',
    { sip: jsmith123@instant-tech.com },
    function(data){
        //Do something with the response
    }
);

                    

Get Web Clients

Method GetWebClients
Parameters queueID (int)
Summary Returns information on web clients from given queue.
Response

    {
        "id": 1,
        "name": "Default Web Client",
        "useschatform": true
    },
    {
        "id": 2,
        "name": "Secondary Web client",
        "useschatform": true
    }

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetWebClients',
    { queueID: 1 },
    function(data){
        //Do something with the response
    }
);

                    

Get Session Data

Method GetSessionData
Parameters sessionID (int)
Summary Returns various information for given chat session.
Response

{
    "QueueID": 15,
    "QueueName": "Service Desk English",
    "AgentFullName": "No expert assigned",
    "SeekerName": "PMadden Seeker 6",
    "Question": "I need my password reset."
    "SessionStartTime": "2018-09-11T15:08:05.56",
    "SeekerWaitTime": null,
    "ConnectedTime": null,
    "ChatMessages": [],
    "SessionID": 83868,
    "SessionGuid": "24ed75efad153ee6c43",
    "Resolved": false,
    "SessionRating": null,
    "SeekerComment": null,
    "Tags": [],
    "AgentComments": [],
}

                                
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/GetSessionData',
    { sessionID: 53446 },
    function(data){
        //Do something with the response
    }
);