Workforce Engagement Management

 View Only


Discussion Thread View
  • 1.  Historical Adherence Report from API difference

    Posted 11-29-2023 07:02

    Good day Community,

    We are pulling the WFM adherence report from API for each day in a range of days. Example: last 3 days, we pull a report for each day, setting the start and end dates for one day on the API request.

    What we see is random Agents with Adherence and/or Conformance percentage differences.
    Here is a snippit of the data showing a difference.

    {"startDate":"2023-11-25T00:00:00.000Z","endDate":"2023-11-26T00:00:00.000Z","managementUnitId":"39333a85-3c2e-4f84-8218-1ac060cea469","userResults":[{"userId":"695973fd-98a7-4073-9365-23b37af5475b","adherencePercentage":50.64,"conformancePercentage":81.48,"impact":"Negative","exceptionInfo":[],"dayMetrics":[{"dayStartOffsetSeconds":0,"adherenceScheduleSeconds":28800,"conformanceScheduleSeconds":25200,"conformanceActualSeconds":13334,"exceptionCount":15,"exceptionDurationSeconds":14217,"impactSeconds":-11752,"scheduleLengthSeconds":28800,"actualLengthSeconds":79200,"adherencePercentage":50.64,"conformancePercentage":52.91},
    "adherencePercentage":50.64,"conformancePercentage":81.48,

    Day metric:

    "adherencePercentage":50.64,"conformancePercentage":52.91


    Why would we possibly see this?


    #Genesys Cloud CX
    #Workforce Engagement Management

    ------------------------------
    Dewald Smit
    Altron Systems Integration a Division of Altron TMT (Pty) Ltd
    ------------------------------


  • 2.  RE: Historical Adherence Report from API difference

    GENESYS
    Posted 11-30-2023 10:15

    Hi Dewald,

    I see in your data snippet at the very end is a comma, which could mean a second day in the "dayMetrics" array for that user. Is there another day in that array? If yes, then you need to consider the percentages of both days when comparing to the overall percentages.

    If you wondering how there could be multiple days even though you only asked for 24 hours total, this is possible because the time used for the start of a day for the dayMetrics is based on either the Business Unit's timezone or the optional timezone parameter in the request. This means you can end up with 2 days, with both days not covering a full 24 hours. You requested using 00:00:00Z which is the start of day for UTC, if the timezone of the BU (or request parameter if provided) does not also start the day at 00:00:00Z then you can end up with multiple days in the dayMetric array.



    ------------------------------
    Daniel Hoffman
    Genesys - Employees - Senior Software Engineer
    ------------------------------



  • 3.  RE: Historical Adherence Report from API difference

    Posted 11-30-2023 13:17

    Hi Daniel,

    You are 100% correct, i missed that. I was running the Report with Africa/Johannesburg as the Adherence time zone and with Africa/Luanda (This is the management unit in question's time zone), and both gives a split over 2 days.
    If I run the report as UTC it returns only 1 day metric.
    UTC:

    [{"userId":"695973fd-98a7-4073-9365-23b37af5475b","adherencePercentage":50.64,"conformancePercentage":81.48,"impact":"Negative","exceptionInfo":[],"dayMetrics":[{"dayStartOffsetSeconds":0,"adherenceScheduleSeconds":28800,"conformanceScheduleSeconds":25200,"conformanceActualSeconds":20534,"exceptionCount":15,"exceptionDurationSeconds":14217,"impactSeconds":-11752,"scheduleLengthSeconds":28800,"actualLengthSeconds":86400,"adherencePercentage":50.64,"conformancePercentage":81.48}],"actuals":[]}

    Africa/Luanda (Matching the BU Time Zone), 2 days?

    {"startDate":"2023-11-25T00:00:00.000Z","endDate":"2023-11-26T00:00:00.000Z","managementUnitId":"39333a85-3c2e-4f84-8218-1ac060cea469","userResults":[{"userId":"695973fd-98a7-4073-9365-23b37af5475b","adherencePercentage":50.64,"conformancePercentage":81.48,"impact":"Negative","exceptionInfo":[],"dayMetrics":[{"dayStartOffsetSeconds":0,"adherenceScheduleSeconds":28800,"conformanceScheduleSeconds":25200,"conformanceActualSeconds":16934,"exceptionCount":15,"exceptionDurationSeconds":14217,"impactSeconds":-11752,"scheduleLengthSeconds":28800,"actualLengthSeconds":82800,"adherencePercentage":50.64,"conformancePercentage":67.2},{"dayStartOffsetSeconds":82800,"adherenceScheduleSeconds":0,"conformanceScheduleSeconds":0,"conformanceActualSeconds":3600,"exceptionCount":0,"exceptionDurationSeconds":0,"impactSeconds":0,"scheduleLengthSeconds":0,"actualLengthSeconds":3600,"conformancePercentage":-1.0}],"actuals":[]},

    Does this mean we have to shift the Start and End times being queried to the +1 UTC like this?

    startDate":"2023-11-25T01:00:00.000Z"






    ------------------------------
    Dewald Smit
    Altron Systems Integration a Division of Altron TMT (Pty) Ltd
    ------------------------------



  • 4.  RE: Historical Adherence Report from API difference

    GENESYS
    Posted 11-30-2023 21:10

    Yes that is probably what you want to do, assuming you want to use the Africa/Luanda time zone. Adding 1 hour like that to the startDate and endDate will align the request with that time zone and should give you a single day metric only. In general, we recommend setting the startDate and endDate to match up with the time zone of the request (or the business unit if time zone if it is not included in the request), as that will provide you with full day metrics only.



    ------------------------------
    Daniel Hoffman
    Genesys - Employees - Senior Software Engineer
    ------------------------------



  • 5.  RE: Historical Adherence Report from API difference

    Posted 12-01-2023 10:42

    Thanks Daniel, Have managed to match the stats from the UI for a single day.
    Set the Time Zone in the Bulk request to "UTC" and shifted the Start/End times from 00:00:00 to 02:00:00.

    I have one last concern, Would the UI stats I see from a UTC+2 location differ from viewing it in a UTC+3 location? And as such the exported stats would be skewed to UTC+2 for that location and not UTC+3.
    If yes, then we would need to group management units together based on time zone for the bulk requests and set the respective start end times, to have the true time zone stats?



    ------------------------------
    Dewald Smit
    Altron Systems Integration a Division of Altron TMT (Pty) Ltd
    ------------------------------



  • 6.  RE: Historical Adherence Report from API difference
    Best Answer

    GENESYS
    Posted 12-04-2023 09:19

    Yes, it seems you would need to group management units with the same timezone in the same request, if you care about the dayMetrics. If you only care about the the adherencePercentage and conformancePercentage from the dayMetrics then there is another option but it might not be quite what you want. You can set the timezone to any value and then limit the start/end range on each item to a single day, adjusted to the timezone you want for the management unit on the item. Then you ignore the dayMetrics but look at the top level adherencePercentage and conformancePercentage for each user. Since it is only a day and you have adjusted the startDate and endDate to the timezone for that management unit, the user's top level percentages are for that single day in the proper time zone. Of course this means you are limited to single day items in the request, so maybe not what you want.

    Adding a timezone override parameter to the bulk request items to let you override the top level timezone is an interesting idea for a new feature. I understand why this isn't there in the first place, but I think it could be possible and I like the idea. I am going to bring this idea up but no guarantees it will happen.



    ------------------------------
    Daniel Hoffman
    Genesys - Employees - Senior Software Engineer
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources