Genesys Engage on-premises

 View Only
Discussion Thread View
Expand all | Collapse all

Show login time in Pulse

  • 1.  Show login time in Pulse

    Posted 11-12-2021 01:36
    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
    ------------------------------


  • 2.  RE: Show login time in Pulse

    Posted 11-15-2021 03:21
    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
    ------------------------------



  • 3.  RE: Show login time in Pulse

    Posted 11-15-2021 04:25
    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
    ------------------------------



  • 4.  RE: Show login time in Pulse

    Posted 11-16-2021 13:34
    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
    ------------------------------



  • 5.  RE: Show login time in Pulse

    Posted 11-17-2021 02:55
    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
    ------------------------------



  • 6.  RE: Show login time in Pulse

    GENESYS
    Posted 11-24-2021 00:34
    Alternately you can use current time minus total login time to work out the time they logged in.

    ------------------------------
    Andrew Soroka
    Genesys - Employees
    ------------------------------



  • 7.  RE: Show login time in Pulse

    Posted 11-26-2021 05:25
    I already thought something like that. Do you have an example for the current time?

    ------------------------------
    Holger Scheer
    NTT Germany AG & Co. KG
    ------------------------------



  • 8.  RE: Show login time in Pulse

    Posted 11-26-2021 06:24
    I already thought something like that. Do you have an example for the current time?

    ------------------------------
    Holger Scheer
    NTT Germany AG & Co. KG
    ------------------------------



  • 9.  RE: Show login time in Pulse

    GENESYS
    Posted 12-02-2021 19:28
    Hi Holger,

    The below code has worked for me. It displays the Agent Login timestamp in the format: DD MM YYYY HH:MM:SS

    Use an existing Agent Login template, and add a new Statistic. Display format = String, and add the below formula into the Formula Field


    var res = (Data.Current_Status.Value);
    var unix_timestamp = res["StartTime"];
    var a = new Date(unix_timestamp * 1000);
    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;

    =======

    Let me know if the above works.

    ------------------------------
    Alvin Pinho
    Genesys - Employees
    ------------------------------



  • 10.  RE: Show login time in Pulse

    GENESYS
    Posted 12-03-2021 01:10
    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
    ------------------------------



  • 11.  RE: Show login time in Pulse

    Posted 12-08-2021 04:56
    Edited by Ian Middleton 12-08-2021 05:27
    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
    ------------------------------



  • 12.  RE: Show login time in Pulse

    GENESYS
    Posted 12-09-2021 21:55
    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
    ------------------------------



  • 13.  RE: Show login time in Pulse

    Posted 12-10-2021 04:00
    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
    ------------------------------



  • 14.  RE: Show login time in Pulse

    Posted 12-10-2021 04:27
      |   view attached
    Alvin,

    Thank you,

    That works but I personally prefer 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' to 'Jan','Feb','Mrz','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'

    ------------------------------
    Ian Middleton
    British Telecommunications PLC
    ------------------------------