Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Adherence Bulk API

    Posted 06-05-2025 18:09

    callMeSam | 2024-07-08 22:31:19 UTC | #1

    Hi All, I am using the bulk adherence API: postworkforcemanagementadherencehistoricalbulk

    I am being returned the dayMetrics, but I am unsure of which day corresponds with which date within range.

    I am iterating on the day and user, however sometimes the days do not align with the number of days the request is ran for.

    for example this run has 9 days in the dayMetrics while the run is for July 1-July 8: "startDate": "2024-07-01T00:00:00.000Z", "endDate": "2024-07-08T18:19:45.000Z", "managementUnitId": "e84e931a-e3c7-4993-aec0-7b1c596fe0cf", "userResults": [ { "userId": "a0c3d793-a27e-4345-a2c3-a8d620fe5000", "adherencePercentage": 96.51, "conformancePercentage": 101.31, "impact": "Positive", "exceptionInfo": [], "dayMetrics": [ { "dayStartOffsetSeconds": 0, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 0, "actualLengthSeconds": 14400 }, { "dayStartOffsetSeconds": 14400, "adherenceScheduleSeconds": 32400, "conformanceScheduleSeconds": 25200, "conformanceActualSeconds": 25196, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 32400, "actualLengthSeconds": 86400, "adherencePercentage": 100, "conformancePercentage": 99.98 }, { "dayStartOffsetSeconds": 100800, "adherenceScheduleSeconds": 32400, "conformanceScheduleSeconds": 25200, "conformanceActualSeconds": 24570, "exceptionCount": 1, "exceptionDurationSeconds": 575, "impactSeconds": -575, "scheduleLengthSeconds": 32400, "actualLengthSeconds": 86400, "adherencePercentage": 98.23, "conformancePercentage": 97.5 }, { "dayStartOffsetSeconds": 187200, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 32400, "actualLengthSeconds": 86400 }, { "dayStartOffsetSeconds": 273600, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 32400, "actualLengthSeconds": 86400 }, { "dayStartOffsetSeconds": 360000, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 32400, "actualLengthSeconds": 86400 }, { "dayStartOffsetSeconds": 446400, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 0, "actualLengthSeconds": 86400 }, { "dayStartOffsetSeconds": 532800, "adherenceScheduleSeconds": 0, "conformanceScheduleSeconds": 0, "conformanceActualSeconds": 0, "exceptionCount": 0, "exceptionDurationSeconds": 0, "impactSeconds": 0, "scheduleLengthSeconds": 0, "actualLengthSeconds": 86400 }, { "dayStartOffsetSeconds": 619200, "adherenceScheduleSeconds": 8385, "conformanceScheduleSeconds": 6300, "conformanceActualSeconds": 7677, "exceptionCount": 4, "exceptionDurationSeconds": 1977, "impactSeconds": 1269, "scheduleLengthSeconds": 8385, "actualLengthSeconds": 51585, "adherencePercentage": 76.42, "conformancePercentage": 121.86 } ], "actuals": []


    brian.trezise | 2024-07-09 16:18:47 UTC | #2

    That's a great question.

    If you take a look at the returned data, you'll notice that each item in dayMetrics contains a dayStartOffsetSeconds. If you add those seconds to the startDate, you will have the start date of the day to which the data corresponds.

    Thanks for reaching out!


    system | 2024-08-09 16:19:40 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 27143