> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Deputy as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/deputy > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://us.posthog.com` or `https://app.posthog.com` (app host for links). ## On this page - [Prerequisites](#prerequisites) - [Adding a data source](#adding-a-data-source) - [Sync modes](#sync-modes) - [Configuration](#configuration) - [Supported tables](#supported-tables) - [Troubleshooting](#troubleshooting) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d) Let AI connect your sources for you Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog. `npx @posthog/wizard warehouse` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Deputy connector syncs your workforce management data – employees, rosters, timesheets, leave, and more – into PostHog, so you can analyze HR and scheduling activity alongside your product data. ## Prerequisites You need a Deputy account with administrator access and a permanent API token. Your token reads the data that its user can see, so use an administrator account to access all tables. ## Adding a data source 1. In PostHog, go to the [Sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section. 2. Click **\+ New source** and click **Link** next to this source. 3. Enter your credentials (see [Configuration](#configuration) below) and click **Next**. 4. Select the tables you want to sync, choose a sync method and frequency, then click **Import**. Once the syncs are complete, you can start querying this data in PostHog. When linking Deputy, you'll need: - **Deputy URL** – the address you use to sign in to Deputy, for example `https://yourbusiness.au.deputy.com`. - **Permanent token** – an access token created in your Deputy install. ### Creating a permanent token 1. Sign in to Deputy as an administrator. 2. Go to `https://yourbusiness.au.deputy.com/exec/devapp/oauth_clients` (replace `yourbusiness.au` with your own Deputy subdomain). 3. Click **Add OAuth Application**. 4. Give your application a name (e.g. "PostHog"). 5. Click **Get an Access Token**. 6. Copy the token – Deputy only shows it once. ## Sync modes Each table can be synced in one of several modes, depending on what the source supports: - **Webhook** (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes. - **Incremental** – only new or updated rows are synced on each run, using a cursor field (such as an `updated_at` timestamp). Cheaper than a full refresh, but deletes aren't captured. - **Append only** – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs. - **Full refresh** – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected. See [sync methods](https://posthog.com/docs/data-pipelines/sources.md#sync-methods) for a full explanation of how each mode works and how to choose between them. All Deputy tables support incremental sync on the `Modified` field, which merges updated rows by their `Id`. This ensures changes to existing records are captured on each sync. ## Configuration | Option | Type | Required | | --- | --- | --- | | `Deputy URL` | text | Yes | | `Permanent token` | password | Yes | ## Supported tables | Table | Description | Sync method | Incremental field | Primary key | | --- | --- | --- | --- | --- | | `companies` | Locations (called companies in the API) of the Deputy business. Employees, areas, rosters and timesheets link to a location. | Incremental, Full refresh | Modified | — | | `contacts` | Contact details (phone numbers, email addresses, instant messaging accounts) that employees, locations and areas link to. | Incremental, Full refresh | Modified | — | | `employee_agreements` | Employment agreements. An agreement links an employee to a pay center and sets the employment type, start date, pay terms and payroll ID. | Incremental, Full refresh | Modified | — | | `employee_availability` | Availability and unavailability that employees record, for one date or as a recurring schedule. | Incremental, Full refresh | Modified | — | | `employee_roles` | Access levels that set what an employee can see and do in Deputy. | Incremental, Full refresh | Modified | — | | `employees` | People who can be rostered, time tracked or managed in Deputy. Each employee links to a user. | Incremental, Full refresh | Modified | — | | `events` | Events added to schedules to track what happens in the business on a day. Events can block time-off requests. | Incremental, Full refresh | Modified | — | | `journals` | Journal entries recorded against employees. | Incremental, Full refresh | Modified | — | | `leave` | Leave requests of employees, with their dates, hours and approval status. | Incremental, Full refresh | Modified | — | | `memos` | Memos that managers send to employees. | Incremental, Full refresh | Modified | — | | `operational_units` | Areas (called operational units in the API) inside a location. Shifts and timesheets link to an area. | Incremental, Full refresh | Modified | — | | `rosters` | Scheduled shifts (rosters). A shift can be published and filled, published and open, or a private draft. | Incremental, Full refresh | Modified | — | | `tasks` | Tasks assigned to areas or employees, with their due dates and completion. | Incremental, Full refresh | Modified | — | | `timesheet_pay_returns` | Pay lines that approved timesheets generate, with the hours and cost per pay rule. | Incremental, Full refresh | Modified | — | | `timesheets` | Records of the time employees actually worked. A timesheet goes through time approval and pay approval. | Incremental, Full refresh | Modified | — | | Table | Description | | --- | --- | | companies | Locations (called companies in the API) of the Deputy business. Employees, areas, rosters, and timesheets link to a location. | | contacts | Contact details (phone numbers, email addresses) that employees, locations, and areas link to. | | employees | People who can be rostered, time tracked, or managed in Deputy. | | employee\_agreements | Employment agreements. An agreement links an employee to a pay center and sets employment type, start date, pay terms, and payroll ID. | | employee\_availability | Availability and unavailability that employees record, for one date or as a recurring schedule. | | employee\_roles | Access levels that set what an employee can see and do in Deputy. | | events | Events added to schedules to track what happens in the business on a day. | | journals | Journal entries recorded against employees. | | leave | Leave requests of employees, with their dates, hours, and approval status. | | memos | Memos that managers send to employees. | | operational\_units | Areas (called operational units in the API) inside a location. Shifts and timesheets link to an area. | | rosters | Scheduled shifts. A shift can be published and filled, published and open, or a private draft. | | tasks | Tasks assigned to areas or employees, with their due dates and completion. | | timesheets | Records of the time employees actually worked. A timesheet goes through time approval and pay approval. | | timesheet\_pay\_returns | Pay lines that approved timesheets generate, with the hours and cost per pay rule. | ## Troubleshooting If your sync is failing or data looks wrong, see the [Data warehouse troubleshooting guide](https://posthog.com/docs/data-warehouse/troubleshooting.md). If that doesn't help, [contact support](https://us.posthog.com/#panel=support%3Asupport%3Adata_warehouse%3A%3Atrue) – we're happy to help.