Shift Location
Some of the Production team at the Nova Industries Pune branch check in with the Frappe HR mobile app instead of the gate device. HR has noticed check-ins sent from home before the shift starts, and from the bus on the way to work. Each one counts as arrival, so late arrivals are hidden and working hours are inflated.
A Shift Location fixes this with geofencing. It records a site, here the Pune Plant Gate, with its coordinates and a check-in radius, for example 200 metres. When the location is added to an employee's Shift Assignment, Frappe HR compares each check-in's coordinates with the site and rejects any check-in from farther away than the radius.
Without geofencing, a Shift Location simply records which site an assignment belongs to, which helps when one company runs the same shift at several sites. For how locations fit with shift types, assignments and the Roster, see Shift Management.
Before you begin
- Tick Allow Geolocation Tracking in HR Settings, on the Shift and Attendance tab. Without it, the radius, coordinates and map are hidden and no check is made.
- With this setting on, every Employee Checkin must include latitude and longitude, including logs from biometric devices and manual entries. Make sure your devices or sync script send coordinates before you turn it on.
- The Shift Type exists, and you have the HR Manager or HR User role.

Create a Shift Location
- Open the Shift & Attendance workspace and select Shift Location under Shift Setup. Select Add Shift Location.

- Enter the Location Name, for example Pune Plant Gate. The name is also the record ID.
- Set the Checkin Radius in metres, for example 200.
- Enter the Latitude and Longitude of the site, here 18.7546 and 73.862. If you are standing at the site, select Fetch Geolocation instead: the browser asks for your location and fills both fields.

- Select Save. The map moves to the coordinates and marks the site, so you can check that the pin is on the right building.

Use the location in shift assignments
The radius applies only to employees whose assignment has the location. On the saved Shift Location, Shift Tools, Shift Assignment Tool opens the Shift Assignment Tool with the location already filled. Select the Shift Type, the dates and the employees, then select Assign Shift.

You can also set Shift Location on a single Shift Assignment, or on a Shift Schedule Assignment so that every assignment it creates carries the location.
What happens at check-in
When an employee checks in, Frappe HR finds the shift for the time of the check-in. If the employee has an active, submitted Shift Assignment for that shift with a Shift Location, it measures the distance between the check-in coordinates and the location. A check-in from farther away than the Checkin Radius is rejected with the message "You must be within 200 meters of your shift location to check in", and no log is saved.
No distance check is made when the radius is 0, when the assignment has no location, or when the employee works only on the Default Shift from the Employee record, because a Default Shift has no location. Accepted check-ins then count for Auto Attendance, which turns them into Attendance as usual.
Troubleshooting
Checkin Radius, Latitude and Longitude are missing on the form
Allow Geolocation Tracking is off in HR Settings. Turn it on and reload the form.
Latitude and longitude values are required for checking in
Geolocation tracking is on, so check-ins without coordinates are refused. This includes biometric device logs. Send coordinates from the device sync, or turn the setting off if you do not use geofencing.
An employee at the site cannot check in
The phone's location may be inaccurate indoors, or the site coordinates are off. Open the Shift Location, check the pin on the map, and increase the radius if the site is large.
Check-ins from far away are still accepted
The employee's assignment for that date has no Shift Location, the radius is 0, or the employee works on a Default Shift without an assignment. Add the location to a Shift Assignment for the dates.
Frequently asked questions
Can one employee work at two sites?
Create a Shift Location for each site and use separate Shift Assignments for the dates at each one. Only the assignment for the shift of the check-in is checked.
What about employees who work away from the site?
Leave the location off their assignments for those dates, or have them record the days with an Attendance Request instead of checking in.