Puzzel Callback on Web - Checking Availability

Puzzel is a flexible customer contact- and switchboard solution based on cloud technology. Agents can log on from any location, all that is required is a phone line (PSTN, SIP or Mobile) and an Internet connection.

This document provides information about checking the Puzzel-solution’s availability regarding queue, agent, and time modules (opening hours), and should be used in addition to Puzzel’s Callback on Web - API Reference document, which enables customers of Puzzel to enrich their web pages with a “Call Me” feature.

There are two main types of availability you can check for deciding if a web callback should be offered or not:

  • Checking the solutions opening hours (time modules)
  • Checking the solutions queue and agent status

Checking Opening Hours Availability

It is relevant to not offer callback on a web page outside of opening hours or when there aren’t any agents available.

The “opening hours” for the web callback feature can be defined on the customer’s website, but they can also be fetched from the solutions time modules, where the opening hours already are defined (in the administration portal). These opening hours can be made available through a JavaScript shown through an example below.

A customer must have a jQuery library installed on their website to be able to check time modules and queue availability.

A Puzzel technician must activate the time module web access feature before the opening hours information is made available, using the given “Web Access Time ID”. This is activated per time module, so that you only need to have it activated on the relevant time module(s). When activated, the relevant opening hours information listed later in this document should be seen on as public.

An example code for checking time module availability (opening hours) is made available on this address.

https://demo.puzzel.com/chat/examples/GetTimeExit.html

Here you can enter your solutions Customer Key and Visual Queue ID to see what kind of information you can fetch regarding time module availability. You can also view the source code of the page for executing this lookup. This test page is originally made for checking availability for chat-requests, but can just as well be used for checking availability for web callback requests.

Example of JavaScript for Checking Opening Hours Availability

The code below is an example of a JavaScript that checks the solutions time module (containing the solutions opening hours) availability. This code uses parts of our chat related features and must be added on the customers web site alongside the callback form itself. The web site must have a jQuery library installed in able to check the availability.

var readyToClickCallback=false;
function resultFromTime (r){
   if(r && r.OK){
	if(r.Exit == ‘Open’){
	// We are on time exit Open, so the callcenter is open
               readyToClickCallback=true;
$("callbackClosed").hide();
	} else {
	// Callback Closed
// Here you can hide your callback elements and show a closed message on your webpage, example below.
	   $("callbackOpen").hide();
	   $("callbackClosed").show();	 	
	}		
   }   
}
$(function(){
         $.ajax({
   url:"https://chat.puzzel.com/Time/GetTimeExit?callback=?",
   type: "GET",
   crossDomain: true,
   contentType: "application/json; charset=utf-8",
   data: {customerKey:"12345",
	  timeId: “54321_Time”
    	 },
   dataType: "jsonp",
   jsonpCallback: "resultFromTime",
   error: function (httpReq,status,exception) { }
           });
  });

Example of information on a time module polled from the Open Web Access

  • “Ok”:true,
  • “ErrorMessage”:null,
  • “ErrorName”:null,
  • “Exit”:Open,
  • “ExitDescription”:Open,
  • “MatchedEntry”: weekday,
  • “ClosedMessage”:null,

Checking Queue and Agent Availability

In addition to the solutions opening hours, a queue can be made unavailable for web-callbacks, even during opening hours, if certain pre-defined variables are met. These variables can be defined through a JavaScript on the customers website to see if the queue is open before the "Call Me" button is displayed. One option is to close a queue as long as there are no agents logged on to it. A caller can then not initiate a callback from the page since the queue is closed.

A customer must have a jQuery library installed on their website to be able to check queue availability.

Both the customerKey and the visualQueueId are unique to each customer. customerKey is the Customer number users use to log into Puzzel and visualQueueId is given out to a customer once the queue web access service is activated by a Puzzel technician.

A Puzzel technician must activate the queue web access feature before this information of variables is made available, using the given “Webaccess Visual Queue ID”. This is activated per queue, so that you only need to have it activated on the relevant queue(s). When activated, the queue information listed later in this document should be seen on as public.

An example code for checking queue and agent availability is made available on this address.

https://demo.puzzel.com/chat/examples/GetQueueStatus.html 

Here you can enter your solutions Customer Key and Visual Queue ID to see what kind of information you can fetch regarding queue and agent availability. You can also view the source code of the page for executing this lookup. This test page is originally made for checking availability for chat requests but can just as well be used for checking availability for web callback requests.

Example of JavaScript for Checking Queue and Agent Availability

The code below is an example of a JavaScript that checks the solutions queue (and agent) availability. This code uses parts of our chat related features and must be added on the customers web site alongside the callback form itself. The web site must have a jQuery library installed in able to check the availability.

var readyToClickCallback=false;
function myJsonMethod(r){
   if(r && r.Queue){
	if(r.Queue.AgentsLoggedIn >0){
	// agents logged in, callback is offered, hide closed message
          readyToClickCallback=true;
$("callbackClosed").hide();
	} else {
	// callback closed
// here you can hide your callback elements and show a closed message on your webpage, example below.
	   $("callbackOpen").hide();
	   $("callbackClosed").show();	 	
	}		
   }   
}

$(function(){
         $.ajax({
   url:"https://chat.puzzel.com/Queue/GetQueueStatus?callback=?",
   type: "GET",
   crossDomain: true,
   contentType: "application/json; charset=utf-8",
   data: {customerKey:"CustomerNumber",
	  visualQueueId: 54321
    	 },
   dataType: "jsonp",
   jsonpCallback: "myJsonMethod",
   error: function (httpReq,status,exception) { }
           });
  });

Example of Information on a Queue Polled from the Open Web Access

  • "WaitTimeMax":0,
  • "WaitTimeAverage":0,
  • "QueueSize":0,
  • "AgentsLoggedIn":0,
  • "AgentsUnavailable":0,
  • "Sla":-1,
  • "QueueSizeCiq":0,
  • "UnblockedLoggedIn":-1,
  • "UnblockedUnavailable":0,
  • "QueueSizePreferred":0,
  • "CallsOfferedToday":0,
  • "CallsAnsweredToday":0,
  • "CiqsOfferedToday":0,
  • "CiqsAnsweredToday":0,
  • "CallsAnsweredWithinSla":0,
  • "AlarmFlag":0,
  • "Id":10292,
  • "Description":"Chat salg",
  • "OpenForWebAccess":true​

Published

Last updated

0
-2