What you’ll use
Models - timesheet entry, time off, time off balanceBefore you start
- The connector has synced, and the customer’s time module is in scope. It is licensed separately from payroll on many platforms.
Steps
1
Read timesheet entries
Result: Time entries for the period you asked for.
2
Read leave requests, filtered by status
status for anything that acts on leave. Without it, declined and canceled requests arrive alongside approved ones, and treating the whole set as booked leave overstates absence.This endpoint has no date filters. Scope by employee, then filter the start_time and end_time you get back yourself.Result: Leave requests with their approval state.3
Read remaining balances
balance, used and policy_type. Read policy_type rather than assuming one balance per person.Result: Remaining leave per policy, as of the last sync.Frequently Asked Questions
Time off or timesheets return nothing
Time off or timesheets return nothing
Time and attendance is a separately licensed module on many platforms, with its own permission grant, and an empty result is the usual failure here rather than an error. See Origin-system errors.
Balances don't match what the employee sees
Balances don't match what the employee sees
Balances are a point-in-time snapshot from the last sync, and accrual runs on the source system’s own schedule. A balance stale by one sync interval is expected - see How syncing works.
Leave totals are too high
Leave totals are too high
An unfiltered
status is the usual cause. Declined and canceled requests are returned right alongside approved ones.Hours don't reconcile with the pay run
Hours don't reconcile with the pay run
Expected rather than a bug. Entries can exist for a period whose run has not been processed, and approval workflows mean not every entry reaches pay. See Payroll.
units differs between records
units differs between records
Correct, and worth handling. The source system decides whether leave is counted in hours or days, and some platforms vary it by policy. Read
units on each record rather than assuming one.One shift spans several timesheet records
One shift spans several timesheet records
Some platforms record time as separate punch events rather than one interval, so a break splits a shift into more than one entry. Check
raw_data for the original shape before adding them up - see Inspect raw data.Related
- Time & attendance - the three models and how they connect
- Create a time off request - the write in the other direction
- Payroll - why hours and pay do not reconcile