Hello Alvin,
From my point of view, the solution is now perfect. I have expanded it a little so that only the logged in agents are displayed.
Thank you for your help.
function AddLeadingZero(timeCheck) {
if (timeCheck < 10)
{
timeCheck = ("0" + timeCheck).slice(-2);
}
return timeCheck;
}
var unix_timestamp = (Date.now() - (Data.Continuous_Login_Time.Value*1000));
var a = new Date(unix_timestamp);
var months = ['Jan','Feb','Mrz','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = AddLeadingZero(a.getDate());
var hour = AddLeadingZero(a.getHours());
var min = AddLeadingZero(a.getMinutes());
var sec = AddLeadingZero(a.getSeconds());
var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
if (Data.Current_Status.Value.Status=='LoggedOut')
Result="-";
else Result=time;
------------------------------
Holger Scheer
NTT Germany AG & Co. KG
------------------------------
Original Message:
Sent: 12-09-2021 21:55
From: Alvin Pinho
Subject: Show login time in Pulse
hi Ian,
Thanks for testing the solution. We have made additional improvements to the code to account for the leading zero. Please try the below code, and let us know if its working as expected:
====================
function AddLeadingZero(timeCheck) {
if (timeCheck < 10)
{
timeCheck = ("0" + timeCheck).slice(-2);
}
return timeCheck;
}
var unix_timestamp = (Date.now() - (Data.Continuous_Login_Time.Value*1000));
var a = new Date(unix_timestamp);
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = AddLeadingZero(a.getDate());
var hour = AddLeadingZero(a.getHours());
var min = AddLeadingZero(a.getMinutes());
var sec = AddLeadingZero(a.getSeconds());
var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
Result = time;
=====================
------------------------------
Alvin Pinho
Genesys - Employees
Original Message:
Sent: 12-08-2021 04:56
From: Ian Middleton
Subject: Show login time in Pulse
Alvin,
Thank you,
However, its not quite right.
The output doesn't show the leading "0" for the hours, minutes and seconds. Instead of DD MM YYYY HH:MM:SS if the value is below 10 then you get DD MM YYYY H:M:S. I have it working and its showing 8 Dec 2021 9:50:4 in stead of 8 Dec 2021 09:50:04
------------------------------
Ian Middleton
British Telecommunications PLC
Original Message:
Sent: 12-03-2021 01:10
From: Alvin Pinho
Subject: Show login time in Pulse
Just an update on my previous post. I performed additional testing and noticed that the Agent Login timestamp updates if the agent's status updates (e.g: from Ready to Not Ready, etc) which does not meet your requirement. So the below code uses the Current time using the Date.now() function, and subtracts the Continuous login time to give you the approx +1 or -1 minute Agent Login Time. So the result may change a few seconds based on the seconds of current time and seconds of continuous login time, and the update frequency of Pulse. You can remove "+ sec" from the code if you do not wish to see seconds changing frequently in Pulse:
===============
var unix_timestamp = (Date.now() - (Data.Continuous_Login_Time.Value*1000));
var a = new Date(unix_timestamp);
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = a.getDate();
var hour = a.getHours();
var min = a.getMinutes();
var sec = a.getSeconds();
var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
Result = time;
====================
------------------------------
Alvin Pinho
Genesys - Employees
Original Message:
Sent: 11-26-2021 06:24
From: Holger Scheer
Subject: Show login time in Pulse
I already thought something like that. Do you have an example for the current time?
------------------------------
Holger Scheer
NTT Germany AG & Co. KG
Original Message:
Sent: 11-24-2021 00:33
From: Andrew Soroka
Subject: Show login time in Pulse
Alternately you can use current time minus total login time to work out the time they logged in.
------------------------------
Andrew Soroka
Genesys - Employees
Original Message:
Sent: 11-17-2021 02:55
From: Guven Pekcetin
Subject: Show login time in Pulse
Hi Holger,
There is no statistic to capture login moment timestamp of agents in Stat Server.
In theory, if you deploy a Stat Server database, you can get this data in Login Table of it.
Then you can write a formula which capture this data from there and show in the Pulse. (There is formula you may use as a sample in a Genesys bulletin for CCPulse+ & Stat Server DB in Oracle DB. The article number Article Number 000078931 in knowledge base. Not sure if it helps for Pulse, but you can have a look.)
Regards
------------------------------
Guven Pekcetin
Customer Interaction Solutions AG
Original Message:
Sent: 11-16-2021 13:33
From: Holger Scheer
Subject: Show login time in Pulse
Hi Guven,
Thanks for your answer but I only need the login time and nothing more. No cumulation. For example, if the agent logs in at 08:00:00, the Pulse should also display 08:00:00.
Regards
------------------------------
Holger Scheer
NTT Germany AG & Co. KG
Original Message:
Sent: 11-15-2021 04:25
From: Guven Pekcetin
Subject: Show login time in Pulse
What you need to do is adding above stat type to stat server if you already don`t have it, then restart stat server to make it start collecting data for the new statistic.
Then add this statistic to a widget template and add a widget based on this widget template to a Pulse dashboard.
Regards
------------------------------
Guven Pekcetin
Customer Interaction Solutions AG
Original Message:
Sent: 11-15-2021 03:20
From: Guven Pekcetin
Subject: Show login time in Pulse
Hi Holger,
I assume that what you look for is a "Continuous login time" which counts time when the agent is logged in and resets to 00:00 when he/she logs out.
Then the following stat type may help:
[Continuous_Login_Time]
Category=CurrentContinuousTime
MainMask=*,~NotMonitored,~LoggedOut
Objects=Agent, Place
Subject=AgentStatus
Regards
Guven Pekcetin
------------------------------
Guven Pekcetin
Customer Interaction Solutions AG
Original Message:
Sent: 11-12-2021 01:35
From: Holger Scheer
Subject: Show login time in Pulse
Hello all,
short question: Is it possible to display the login time in Pulse?
Only the time when the agent has logged in. Not the totals of the times.
Regards
Holger
#Reporting/Analytics
------------------------------
Holger Scheer
NTT Germany AG & Co. KG
------------------------------