> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ontime.hosai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Departments and locations

> Maintain your organizational structure — and get the geofences right, because mobile punching depends on them.

export const PermissionNote = ({perm}) => <Info>
    Requires the <code>{perm}</code> permission. Ask your administrator if an
    action described here is missing from your screen — see
    [Roles & permissions](/help/concepts/roles-and-permissions).
  </Info>;

Both live under **Settings**, and both are simple flat lists. One of them is far more consequential than it looks.

## Departments

<PermissionNote perm="department:write" />

A flat list of names. Departments are used for:

* Filtering the directory, reports and the roster.
* Grouping on the roster planner.
* The **same team** check in swap compatibility — two employees are "same team" when they share a department.

Create, rename and edit from **Settings → Departments**.

## Locations

<PermissionNote perm="location:write" />

A location is a physical place people work. Each carries:

| Field                             | Purpose                                            |
| --------------------------------- | -------------------------------------------------- |
| **Name**                          | Display.                                           |
| **Type**                          | `office`, `branch` or `field`.                     |
| **Geofence latitude / longitude** | The centre point.                                  |
| **Geofence radius (metres)**      | How far from that point still counts as "at work". |

### The geofence matters more than anything else here

When someone punches from the mobile app, the server compares their reported coordinates against **their own location's** geofence and decides `Inside` or `Outside`. An `Outside` punch becomes **pending** and needs a manager's approval.

<Warning>
  **A wrong geofence turns every ordinary arrival into an exception.** A radius that is too tight floods managers with approvals for people who are standing at their desk. One that is too loose makes the check meaningless. Coordinates for the wrong building do both at once.

  Get someone to stand at the entrance and check what the app reports before you go live.
</Warning>

<Tip>
  Radius is in metres and should account for GPS accuracy, not just the building footprint. A phone indoors is commonly accurate to 20–50 metres; a radius smaller than that produces false exceptions no matter how precise your coordinates are.
</Tip>

### Locations and holidays

Holidays can be tied to specific locations, which is how a regional festival is a holiday at one site and a working day at another. See [Holidays](/help/scheduling/holidays).

### Locations and shift templates

A shift template applies to all locations by default, or to a named subset. Use the subset when a site genuinely runs different hours.

## Where they are used

```mermaid theme={null}
flowchart LR
  L[Location] --> G[Geofence check on punch]
  L --> H[Location-scoped holidays]
  L --> S[Location-scoped shift templates]
  L --> R[Reports & filters]
  D[Department] --> T[Same-team swap check]
  D --> R
```

## Deleting

Neither can be removed while employees are assigned to it. Reassign first.
