How to get date of last "pay period" end for a particular employee?

80 Views Asked by At

I'm using a separate scheduling program to feed data to Kronos via API. I'm starting to use it to sign off timecards for employees (always for previous pay period), but I need to get the date to which the timecard is signed off as we have different pay cycles. So, after sending the below request, how do I determine the date through which Kronos signed off the timecard?

<Request Action="SignOff">
    <ApproveSignoff>
        <Employee>
            <PersonIdentity PersonNumber="XXXXXX"/>
        </Employee>
    </ApproveSignoff>
</Request>

If it's possible to get the last signed off date of the employee's timecard, that'd be even better.

1

There are 1 best solutions below

0
dya On BEST ANSWER

I've come up with a solution for this. In case any others are following in my footsteps, here's what I've found.

Make a Load call on the Timesheet:

<Request Action="Load">
    <Timesheet>
        <Employee>
            <PersonIdentity PersonNumber="12345"/>
        </Employee>
        <Period>
            <TimeFramePeriod PeriodDateSpan = "01/01/2050 - 01/01/2050" TimeFrameName = "9" />
        </Period>
    </Timesheet>
</Request>

I used 1 Jan 2050 to avoid getting irrelevant timesheet info if possible. Within the response, you'll get a tag. Within that tag, if the employee had ever been signed off, will be a "ManagerSignoffDateTime" property with the date to which that employee's timecard is signed off. If they've never been signed off, that property will be absent. Hope that helps someone.