Linking Deputy as a source

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.

Learn more
PostHog Wizard hedgehog

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 of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see 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 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

OptionTypeRequired
Deputy URLtextYes
Permanent tokenpasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
companies

Locations (called companies in the API) of the Deputy business. Employees, areas, rosters and timesheets link to a location.

Incremental, Full refreshModified—
contacts

Contact details (phone numbers, email addresses, instant messaging accounts) that employees, locations and areas link to.

Incremental, Full refreshModified—
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 refreshModified—
employee_availability

Availability and unavailability that employees record, for one date or as a recurring schedule.

Incremental, Full refreshModified—
employee_roles

Access levels that set what an employee can see and do in Deputy.

Incremental, Full refreshModified—
employees

People who can be rostered, time tracked or managed in Deputy. Each employee links to a user.

Incremental, Full refreshModified—
employment_contracts

Employment contracts (called pay rates, employment terms or awards in the Deputy UI). Each one holds the pay and leave rules for the employees whose employee agreement links to it.

Incremental, Full refreshModified—
events

Events added to schedules to track what happens in the business on a day. Events can block time-off requests.

Incremental, Full refreshModified—
journals

Journal entries recorded against employees.

Incremental, Full refreshModified—
leave

Leave requests of employees, with their dates, hours and approval status.

Incremental, Full refreshModified—
leave_accruals

Leave balance transactions per employee. Each row adds or removes hours or days from the balance of one leave rule.

Incremental, Full refreshModified—
memos

Memos that managers send to employees.

Incremental, Full refreshModified—
operational_units

Areas (called operational units in the API) inside a location. Shifts and timesheets link to an area.

Incremental, Full refreshModified—
rosters

Scheduled shifts (rosters). A shift can be published and filled, published and open, or a private draft.

Incremental, Full refreshModified—
tasks

Tasks assigned to areas or employees, with their due dates and completion.

Incremental, Full refreshModified—
teams

Teams that group employees, each with an optional team leader.

Incremental, Full refreshModified—
timesheet_pay_returns

Pay lines that approved timesheets generate, with the hours and cost per pay rule.

Incremental, Full refreshModified—
timesheets

Records of the time employees actually worked. A timesheet goes through time approval and pay approval.

Incremental, Full refreshModified—
training_modules

Types of training that can be assigned to employees.

Incremental, Full refreshModified—
training_records

Training assigned to employees. Each row links one employee to one training module.

Incremental, Full refreshModified—

TableDescription
companiesLocations (called companies in the API) of the Deputy business. Employees, areas, rosters, and timesheets link to a location.
contactsContact details (phone numbers, email addresses) that employees, locations, and areas link to.
employeesPeople who can be rostered, time tracked, or managed in Deputy.
employee_agreementsEmployment agreements. An agreement links an employee to a pay center and sets employment type, start date, pay terms, and payroll ID.
employee_availabilityAvailability and unavailability that employees record, for one date or as a recurring schedule.
employee_rolesAccess levels that set what an employee can see and do in Deputy.
employment_contractsEmployment contracts (called pay rates, employment terms, or awards in the Deputy UI). Each one holds the pay and leave rules for the employees whose employee agreement links to it.
eventsEvents added to schedules to track what happens in the business on a day.
journalsJournal entries recorded against employees.
leaveLeave requests of employees, with their dates, hours, and approval status.
leave_accrualsLeave balance transactions per employee. Each row adds or removes hours or days from the balance of one leave rule.
memosMemos that managers send to employees.
operational_unitsAreas (called operational units in the API) inside a location. Shifts and timesheets link to an area.
rostersScheduled shifts. A shift can be published and filled, published and open, or a private draft.
tasksTasks assigned to areas or employees, with their due dates and completion.
teamsTeams that group employees, each with an optional team leader.
timesheetsRecords of the time employees actually worked. A timesheet goes through time approval and pay approval.
timesheet_pay_returnsPay lines that approved timesheets generate, with the hours and cost per pay rule.
training_modulesTypes of training that can be assigned to employees.
training_recordsTraining assigned to employees. Each row links one employee to one training module.

Troubleshooting

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?