TABLE OF CONTENTS
- What is TK Processing, and when does it start?
- Get Work Shift
- Geo Data Processing. Get Activity Periods for Work Shift.
- NO GPS Periods
- Stops
- Drives
- State
- Process Clock In/Out
- Automatically allocate WOs
- Audits, Mileage, Recalculate Time Card Payroll Allocation
- Manual Allocation
What is TK Processing, and when does it start?
TK Processing is a script that manages GPS data to build Time Entries. It also works out Cost Types and Work Order allocation, starts audits, tracks mileage, and updates payroll for Time Cards.
The script runs every day. It handles data from the day before.
- Note: You will not see unprocessed Time Cards for today or future days in the Review screen or TK dashboards.
- But you will see future Time Cards that have a TK Request (such as TARs or Time Offs). You will also see Time Cards where an employee sent a comment.
Get Work Shift

TK Processing finds a Work Shift. A Work Shift is:
- A time between Сlock In and Clock Out.
- Or a set period entered with Check In.
Get Clock In and Clock Out
Clock In and Clock Out Time Entries are created right after a user clocks in or out on a Non-GPS or GPS device.
Get Check In or create it
Salary Employees have the “Salary” mobile role. Check In Time Entry can be added in these ways:
- Salary Employees check in via the app → this adds a Check In Time Entry. It also creates a Time Card if one does not exist for that day and the Employee.
- Or TK Processing creates the Time Card automatically, based on the Employee category. It can add a Check In too, using settings from the Employee category.
- Or a TK Administrator creates a Time Card by hand and adds a Check In Time Entry from the action menu in the Time Card.
Geo Data Processing. Get Activity Periods for Work Shift.
Check In Time Entry Process
For the automatically created Check In according to the Employee Category, the TK script fills in hours and Cost Type from the Employee TK Configuration.
Non-GPS device: Activity Periods
A Non-GPS Employee (has Fixed Location role) clocks in or out using a Wall or Non-GPS device (devices that do not collect GPS data).
Clock In and Clock Out Time Entries are created right away after the action.
Since there is no GPS data, the activity period is simple:
- One Work Shift = One Time Entry
- Starts at Clock In
- Ends at the next Clock Out
Time Entry details:
- Event: NA
- Cost Type: Office/Warehouse
- Location: Asset Location
GPS device: Process No GPS Periods, Find Stops and Drives, Determine State
A GPS Employee clocks in or out on a GPS device (a device that collects GPS data).
Clock In, Clock Out, and manual Lunch Time Entries are created immediately after the action.
The TK algorithm analyses the GPS points. It uses settings such as:
- Length of No GPS activity
- Average speed
From this data, it identifies:
- Stops
- Drives
- Periods with no GPS signal
It then creates Time Entries with the correct event for each period.
At this step, it sets the default Drive Cost Type for all Time Entries with a Drive event.
NO GPS Periods

NO GPS Entries
A NO GPS period is any time when no GPS points are recorded.
It also includes cases where:
- There is a GPS point, but
- The gap before and after it is more than 5 minutes (this value can be changed in settings).
In such cases, the system cannot tell where the employee went. So it treats the period as NO GPS.
How TK Processing handles NO GPS Time Entries:
- It creates a Time Entry with:
- Event: No GPS
- Cost Type: (left blank at first)
- It then copies the following details from the nearest Time Entry:
- Cost Type
- Site
- Site WO
- Location
→ It looks first at the next Time Entry.
→ If needed, it uses the previous one.
3. It also sets the GPS State using the nearest entries:
- If both the previous and next Time Entries have the same GPS State, it applies that state.
Stops

1. How the algorithm finds Stops
It calculates average speed (displacement between GPS points within 5 minutes).
From the result, it decides:
- Stop: speed < 1km/h (0.6mi/h)
- Slow Drive: 1km/h ≤ speed < 10 mi/h (0.6 mi/h ≤ speed < 6.2 mi/h)
2. Processing Stops inside Site/Location boundaries
After finding Stops, the system checks if they fall inside Site or Location polygons.
Site and Location Boundaries
A Site or Location can have a boundary as a circle or polygon.
- Set on the Site card or Location card.
- Default radius:
- Site: 300 metres
- Location: 100 metres
- A radius of 0 means the Site/Location is ignored.
Main and Related Sites
A Main Site is one that has:
- A scheduled “Site” Work Order (also called GPS WO), or
- A Work Order for an unscheduled visit.
A Related Site is listed on the Main Site card.
It can also be scheduled or set as an unscheduled visit — then it becomes a Main Site too.
Cost Type for time in these Sites: On Site.
Site WO field in the Stop Time Entry – according to the Sites boundaries and the priority, see next.
On Site Stops
The script looks for Work Orders linked to Sites in this priority order:
- Site with a scheduled “Site” Work Order
- Related Site to a scheduled WO
- Site with a “Site” WO for unscheduled visit
- Related Site to an unscheduled visit WO
- Site in a Carrier Group Sites
If a Stop is inside multiple Site boundaries, the script picks the highest priority.
If two Sites have the same priority (e.g. both have scheduled Site WOs), it chooses the closest one.
In the Stop Time Entry, it sets:
- Cost Type = On Site
- Site WO = the Work Order found
- Has WOs = true (so the WO can be shared with nearby Drive/No GPS entries)
Unscheduled visit to the Site
The script checks if the Stop is inside the radius of an unscheduled Site.
It looks for a Build Plan (BP) under that Site with a Work Order for an unscheduled visit.
If found, it fills:
- Cost Type = On Site
- Site Work Order = the unscheduled visit WO
- Unscheduled Visit = checked
Note: The WO must be active to be used.
How it picks the WO when there are multiple:
- Finds all Build Plans under the Site with unscheduled visit WOs
- Collects all WOs from those BPs
- Looks for a unique match between:
- Employee’s Direct Cost Financial Account
- WO Type’s Financial Account
- Assigns the Stop to that WO
Stops at Office/Warehouse
1. Inside a Site with “Warehouse” WO
- Stop is inside a Site polygon with a scheduled “Warehouse” Work Order
- Sets: Site, Site WO, Has WOs = true
- Cost Type = Office/Warehouse
2. Inside a Warehouse Location
After checking Sites, it looks for nearby Locations.
- If a Location is within 100 metres (default), it adds the Location to the Time Entry.
- If the Location type is “Warehouse”, it sets Cost Type = Office/Warehouse.
Stops at Known Locations
These are Stops inside any other known Location (e.g. Employee Home, Material Supplier, Remote Hotel).
- Stops and Slow Drives inside the same Site/Location are merged into one Stop on the map and timeline.
- Cost Type = Drive
→ Until “Unauthorised Time” audits are set up and run.
Unknown Stops
Stops outside all Site and Location polygons.
The system:
- Groups GPS points within a 100-metre radius
- Calculates a geometric centre (one point)
You can use map tools to view objects near an Unknown Stop.
- Cost Type = Drive
→ Until “Unauthorised Time” audits are started.
Drives

All periods that are not Stops are treated as Drives by the system.
Short Drives lasting 1 minute are added to the nearby Stops.
Intermediate Drive Cost Type
The system sets the Cost Type to Intermediate Drive for any Drive Time Entry that falls between two On Site Time Entries.
State
This step runs only if GPS States are turned on in your system.
The script uses GPS coordinates from Stops and Drives, plus US state borders, to find the state for each activity. It then fills the GPS State field in the Time Entry.
- Stops: State is set from the Stop’s GPS point.
- Drives: State is set using the GPS points along the route.
When an employee crosses state lines, the Drive time is split into separate Time Entries — one per state.
Rule: Only 5 minutes or more in a state creates a new Drive Time Entry.
For example. You work in South Carolina (SC), then drive into North Carolina (NC): → You spend < 5 minutes in NC → drive back to SC System treats all driving as in **SC** (one Drive Time Entry). → You spend > 5 minutes in NC System splits the drive: - Drive in **SC** - Drive in **NC** (new Time Entry)
The script will copy a GPS state from the previous Time Entry to the Manual Lunch TE, if that TE has a stateProcess Clock In/Out
Clock In and Clock Out Time Entries can include GPS coordinates.
The script fills the Site and Location fields in these entries the same way as for Stop Time Entries:
- It first looks for a Site that contains the Clock In/Out GPS point.
- If no Site is found, it looks for a Location within range.
These Site/Location details are then used to calculate mileage.
For an adjusted Clock Out:
The script records the GPS coordinates of where the employee was at the adjusted time.
.

Automatically allocate WOs
Now that the TK script has identified Site and Warehouse stops, it tries to automatically assign time in the following cases.
Replace WO for Carrier Group Site
If a Stop is linked to a Work Order from the main Buid Plan of the Carrier Group Site (either scheduled or unscheduled visit), the system replaces it with the correct WO:
- It looks in the same Build Plan
- But under the actual Site where the Stop happened
This ensures time is charged to the right Site within the Carrier Group.
Distribute a Site WO to other Time Entries (Drives, NO GPS)
The TK script finds all On Site Time Entries linked to a specific Site WO (set during Stop processing).
It then spreads this Site WO to:
- Previous and next Time Entries
- Up to the first Time Entry with a different WO
- All within the same Work Shift
WO for Unscheduled Visit
If a Stop cannot use a scheduled WO and is inside a Site set for unscheduled visits, the system assigns all hours to the unscheduled visit WO — if the Site has a Build Plan with one.
If multiple unscheduled visit WOs exist per Site:
- It compares the Employee’s Direct Cost Financial Account (FA) with the FA of each WO Type.
- If there is one exact match, it assigns the Stop to that WO.
- If no unique match, no assignment is made.
Warehouse hours and “Warehouse” WO
The system looks for one scheduled “Warehouse” type WO.
If found, it assigns all Office/Warehouse hours to it and:
- Fills Site WO — if the Time Entry is linked to a Site (warehouse as a Site object)
- Fills the WO allocation table — if the Time Entry is linked to a Warehouse Location
Note: A Warehouse WO is a Non-GPS WO with Work Type = “Warehouse” (set in the WO Type card).
Distribute Warehouse WOs
A scheduled “Warehouse” (Non-GPS) WO is shared with:
- All Office/Warehouse Time Entries
- All Time Entries without a GPS WO
If more than one scheduled Warehouse WO exists:
→ Hours are split proportionally between them.
Default WO
The system uses the Default WO from the Employee TK Configuration and checks the setting “Overwrite GPS WO”.
Case 1: Assign Default WO to unallocated Check In hours
- Applies to auto-created Check In Time Entries
- Fills the GPS WO field in the Check In Time Entry
Case 2: “Overwrite GPS WO” = No
The Default WO is assigned to all unallocated hours (from Time Entries or TC Adjustments) only if:
- The Employee does not have the “Requires WO Allocation” role AND
- The Time Card has no On Site Time Entries
Case 3: “Overwrite GPS WO” = Yes
Takes approved time from Time Entries already linked to a Site WO (filled during TK Processing)
Replaces it with the Default WO
Note: Default WO hours are added directly to the Time Card Payroll Allocation table.
Audits, Mileage, Recalculate Time Card Payroll Allocation
Once TK Processing has created Time Entries, set Cost Types, and assigned Work Orders, the next step is to run audits. These check for issues like:
- Stops in unknown places
- Too much time in a warehouse
- Missing WO allocations
Based on audit rules:
- Approved Time Entries may be reset to 0 hours
- Cost Type can change to Unauthorized Stop
- Time Cards may be set to pending manual allocation
Mileage Calculation
The system calculates mileage using GPS coordinates from:
- Clock In/Out
- Stops at Sites and Locations
Recalculate Time Card Payroll Allocation
Finally, the system updates the Payroll Allocation table. It pulls data from:
- All Time Entries
- Reasons (e.g. non-work hours like lunch)
The Cost Type may change based on the assigned Work Order. See Cost Type Priority for details.

Manual Allocation
Read about manual allocation here:
Manual Work Order Allocation Rules
Mobile App. Manually allocate time between WOs
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article