Create or Update timeshhet based on the timesheets external Id

I our system, it’s possible for an Employee to have 2 timesheets for the same period. If for example the employee works for 2 different companies on different assignments in the same period. At the moment, when we send the 2 timesheets to the KeyPay api, one timesheet is overwritten by the other.

Is there anyway to update/overwrite based on whether its the same external ID or not?

In KeyPay, businesses (or companies) are separate entities. The employees within each business are also separate entities. So, even if John Smith works for both CompanyA and CompanyB, there would be two separate employee entities for him for each company. Submitting timesheets for either employee entity would be under each business, and won’t have anything to do with each other. As such, timesheets in both businesses will not be considered overlapping, even if their times do overlap.

I’m not sure how you’ve set things up so that when you send 2 timesheets, one timesheet overwrites the other, as normally if the timesheets are overlapping, you would get an error code response for the 2nd timesheet, and it won’t be created. But to answer your question, there is no way to modify a submitted timesheet so that it will ignore the overlap check.

Our clients are job agencies, so the candidate works for the job agency but may have worked on 2 different assignments in the same week and therefor have 2 separate timesheets. So the job agency has the KeyPay account and our system interacts with the keypay api on behalf of the job agency (the single entity) and not the individual businesses the candidate has worked for.

We’ve modified our code to support this so you can close this anyway. Thanks.

No worries. I’m glad you worked something out! Let me know if you have any other questions or problems