Chat with us if you have any questions!

Chime API

API documentation for Chime

Chime 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 Process Health

Method Health/Status/Queue/{id}
Parameters N/A
Summary This should return a 200 if the queue process is running, or a 500 if it is not
Response Status: 200 OK
Status: 500 Internal Server Error

{
    Queue {id} is not running
}
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/Health/Status/Queue/2',
    function(data){
        if(data){
            //Do something to show the queue process is running
        } else {
            //Do something to show the queue process is not running
        }
    }
);

Health Monitor Status

Method Health/Status/HealthMonitor
Parameters N/A
Summary This is the full Chime health-check that shows systyem and Queue Health
Response

{
    "Ok": false,
    "System": {
        "Service": {
            "Status": true,
            "Details": null
        },
        "ServiceAccount": {
            "Status": true,
            "Details": null
        },
        "Smtp": {
            "Status": true,
            "Details": null
        },
        "SQL": {
            "Status": true,
            "Details": null
        },
        "ActiveDirectory": {
            "Status": true,
            "Details": null
        },
        "ChimeHub": {
            "Status": true,
            "Details": null
        },
        "WebClient": {
            "Status": false,
            "Details": "No webclient is configured."
        },
        "OK": false
    },
    "Queues": [
        {
            "Process": {
                "Status": true,
                "Details": null
            },
            "Routing": {
                "Status": true,
                "Details": null
            },
            "IMConnection": {
                "Status": true,
                "Details": null
            },
            "Alerting": {
                "Status": true,
                "Details": null
            },
            "Scheduler": {
                "Status": true,
                "Details": null
            },
            "Smtp": {
                "Status": true,
                "Details": null
            },
            "SignalR": {
                "Status": true,
                "Details": null
            },
            "QueueId": 1,
            "Name": "IT Service Desk",
            "Ok": true
        }
    ]
}
Sample (using jQuery)

$.get('http://Chime.server/Chime/Api/Health/Status/HealthMonitor',
    function(data){
        if(data){
            //Parse through the response and indicate the health of your Chime instance
        } else {
            //Chime might be down, or Health monitor unresponsive
        }
    }
);

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
    }
);

Post Guest Session's Comment and Rating

Method AddSeekerCommentRating
Request Method POST
Summary Post comment and rating to a guest's session data.
Endpoint /Chime/Session/AddSeekerCommentRating
Request Body

{
    "SessionGuid": 1, 
    "Rating": 5, // should be type number ranging from 1 to 5
    "Comment": "Excellent service!"
}
Sample (using jQuery)

$.post(
    "/Chime/Session/AddSeekerCommentRating",
    {
        SessionGuid: "c5700c14-6870-4621-b002-5b393344b54b", 
        Rating: 1, 
        Comment:"Excellent! Thanks for the help"
    }
);

Get All Outages (Global)

Method GetAllOutages
Parameters N/A
Summary Returns all currently active Outages on the Chime server (will not show any outages that have expired or manually ended)
Response

[
    {
        "QueueID":1,
        "OutageID":2,
        "CreatorID":4,
        "CreatorName":"Patrick Madden",
        "QueueName":"Load Testing Queue",
        "CreatedTime":"2022-02-3T16:58:52.83",
        "Title":"Email Servers Down",
        "Body":"Email servers will be up by 1:00 EST",
        "isScheduled":true,
        "isActive":true,
        "isPlanned":true,
        "isUpcoming":false,
        "OutageStart":"2022-02-3T16:56:00",
        "OutageStop":"2022-02-3T20:56:00"
    },
    {
        "QueueID":2,
        "OutageID":3,
        "CreatorID":4,
        "CreatorName":"Patrick Madden",
        "QueueName":"Instant Support Queue",
        "CreatedTime":"2022-03-08T14:02:57.27",
        "Title":"Email Down until 12:30 EST",
        "Body":"We are restarting the email servers",
        "isScheduled":true,
        "isActive":true,
        "isPlanned":false,
        "isUpcoming":false,
        "OutageStart":"2022-03-08T14:02:57.257",
        "OutageStop":null
    }
]
Sample (using jQuery)

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

Get Queue Outages

Method GetQueueOutages
Parameters queueID (int)
Summary Returns information on all Outages for a given Queue (Will show all active and completed Outages)
Response

[
    {
        "QueueID":1,
        "OutageID":2,
        "CreatorID":4,
        "CreatorName":"Patrick Madden",
        "QueueName":"Load Testing Queue",
        "CreatedTime":"2022-02-3T16:58:52.83",
        "Title":"Email Servers Down",
        "Body":"Email servers will be up by 1:00 EST",
        "isScheduled":true,
        "isActive":true,
        "isPlanned":true,
        "isUpcoming":false,
        "OutageStart":"2022-02-3T16:56:00",
        "OutageStop":"2022-02-3T20:56:00"
    },
    {
        "QueueID":1,
        "OutageID":1,
        "CreatorID":4,
        "CreatorName":"Patrick Madden",
        "QueueName":"Load Testing Queue",
        "CreatedTime":"2020-10-20T17:26:47.487",
        "Title":"Servers down for maintinance",
        "Body":"They will be down from 2 - 4",
        "isScheduled":false,
        "isActive":false,
        "isPlanned":true,
        "isUpcoming":false,
        "OutageStart":"2020-10-20T17:26:47.487",
        "OutageStop":null
    }
]
Sample (using jQuery)

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