In Skype 4 Business (Lync Server as some still call it) there is the option of operating response groups formally or informally. Response groups in general are queues that can represent more or less complex telephone exchanges.
- Formal groups are groups in which you have to register manually before calls can be accepted.
- Informal groups are groups to which you are automatically logged in as soon as you are logged in to any client. The "Logged in" checkbox for these groups cannot be deactivated.
If you run Skype4Business groups "formally", then it would often be good to know which users are logged on or off. You can simply query this in the database using an SQL statement, as I did here on the net have found. However, it is not really practical for the helpdesk to always do this via the SQL Management Studio if necessary. I wanted to make this available on a web platform and simply created a small example with php. I don't want to display all reaction groups on the dashboard, as they belong to different departments and not everyone is allowed to see them for data protection reasons. However, I have added a unique identifier to the description so that I don't always have to adjust the script manually.
I then took the SQL statement from the link above and added the Discription column, which I can now filter on:
First I need a db.inc.php in which the database connection is defined. This file will be included later in the main file
I then load db.inc.php into Index.php and use the previously tested SQL select to retrieve all the information. This information is then output. To embellish this, I have added an image to the status so that you can immediately see who is now active in a reaction group.
<!--?php date_default_timezone_set('Europe/Vienna'); ####################### Load Database Class ################## require_once('db.inc.php'); $status = $db->select("select T1.Name, T1.Description, T3.DisplayName, T4.[State] from [rgsconfig].dbo.AgentGroups as T1 join rgsconfig.dbo.AgentGroupsToAgentsMap as T2 on T1.ID = T2.AgentGroupId join rgsconfig.dbo.Agents as T3 on T2.AgentId = T3.ID left join rgsdyn.dbo.AgentGroupSignInStates as T4 on (T2.AgentGroupId = T4.GroupId and T2.AgentId = T4.AgentId) where T4.[State] in (0,1) and T1.Description like 'Test' group by T1.Name,T1.ID,T1.Description,T3.DisplayName,T3.ID,T4.[State];"); for($i=0;$i<count($status);$i++){ $exit = $status[$i]["Name"]; $old = $status[$i -1]["Name"]; ##### Status 1 = Online, Status 2 = Offline ##### if($status[$i]["State"] == "1"){ $state = ""; } elseif ($status[$i]["State"] == "0"){ $state = "
"; } if($exit != $old){ print "".utf8_encode($status[$i]["Name"]).":
"; } print " ".$state." ".utf8_encode($status[$i]["DisplayName"])."
"; } ?-->
The result looks like this:
Of course, the whole thing can also be visually customized at any time. However, it is enough for me, as it is "only" integrated in the helpdesk dashboard.