The web client is accessed by opening a browser window to the url for the webClient.html
file, with parameters for the queue to hit, and optionally the user connecting to the chat.
The URL for the web client might look something like: http://Chime.server/Chime/webclient?id=1
Note* - Chime.server is a reference to your internal IP address where Chime is stationed
To open the web client, first we need to know a couple of values.
Variable | Where To Locate |
---|---|
chatURL |
The Internal Web Client Address found in Queue Settings / Advanced
Ex: http://Chime.server/Chime/webclient?id=1 |
queueId | The Integer at the end of the Internal Web Client Address Ex: http://Chime.server/Chime/webclient?id=1 |
<button id="chat-btn" data-queueid="1">Chat Now!</button>
<!--Using the data-queueid attribute allows the use of the same script for all buttons.
Changing the data-queueid will change which queue the button is referencing. -->
<button id="chat-btn" data-queueid="1">Chat Now!</button>
<button id="chat-btn" data-queueid="2">Chat Now!</button>
<button id="chat-btn" data-queueid="3">Chat Now!</button>
$(document).ready(function() {
// In this example, we leave off the last number in the URL which signifies the queueId.
// It will be concatenated when we call our startChat() function.
var chatURL = "http://Chime.server/Chime/webclient?id=";
var chatWindow = null;
var windowFeatures = "width=600,height=600,locationbar=no,toolbar=no,menubar=no,resizable=yes";
function startChat(queueId){
if (chatWindow === null || chatWindow.closed) {
chatWindow = window.open(
chatURL + queueId,
"LetsChat",
windowFeatures
);
}else {
chatWindow.focus();
}
}
// Call function to start chat
$('#chat-btn').click(function() {
startChat($(this).data('queueid'))
});
});
$(document).ready(function() {
var iframeChatWindow = null;
var startiframeChat = function() {
if(iframeChatWindow === null) {
$('#input-iframe').html('<iframe src="http://Chime.server/Chime/webclient?id=1" id="chat"></iframe>');
}
iframeChatWindow = true;
};
$(#chat-btn).click(function() {
startiframeChat();
});
});
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
Method | GetQueueInfo |
Parameters | queueID (int) |
Response |
|
Sample (using jQuery) |
|
Method | GetQueueWaitTime |
Parameters | queueID (int) |
Response |
|
Sample (using jQuery) |
|
To stage out a click-to-chat link to route conversations through ChimeHub, you will need two pieces of information:
The engine name is the name registered with the ChimeHub service, in the Admin > Advanced settings area within the Chime application. The Queue ID is an integer representing the internal ID of the Queue in your Chime system. This can be seen retrieved from the Advanced tab in the Queue Settings for the queue, where Chime displays the URL needed to open a chat window through ChimeHub.
Note: User must have admin rights to follow instructions below.
For a PDF of the instructions click here » Staging_External_Web_Client_With_Chime_Hub.pdf
A click to chat button might look like this:
The markup might look like this:
Method | isQueueAvailable |
Parameters | engineID (string), queueID (int) |
Response |
|
Sample (using jQuery) |
|