Skip to main content

Payroll sync (Gusto): setting it up

Payroll sync brings every payroll processed in Gusto into the books as a journal, by department, and matches Gusto's bank debits on the bank feed. It is an app (Payroll sync, accounting.payroll) that depends on Accounting and is on by default; it does nothing until somebody connects Gusto.

For the operator: the Gusto application​

Gusto connects through this installation's own Gusto developer application (a platform credential, kept in deployment configuration, never in a company's database). Until it is registered, the Gusto card says Not available.

  1. In Gusto's developer portal, create an App Integrations application. Register the redirect URI https://<your domain>/oauth/callback exactly. Ask for read access to companies, payrolls and departments.
  2. Put its client ID and secret in the application secret as GUSTO_CLIENT_ID and GUSTO_CLIENT_SECRET, and set GUSTO_ENVIRONMENT to demo (Gusto's sandbox, api.gusto-demo.com) or production (api.gusto.com).
  3. Switch Gusto on for the installation after the two keys are in the secret: a server told to read a key that is not there does not start.
  4. Before the first production connection, run erp payroll gusto-check with a demo company to see the whole flow against Gusto's sandbox.

For the company: connecting​

Anyone with payroll.manage connects Gusto from Finance → Payroll or Settings → Integrations by signing in to Gusto as a company admin. The grant (a refresh token, which Gusto replaces on every use) is kept in the company's secrets vault, never on screen. One Gusto company per company here; connecting a different one needs a disconnect first.

Settings​

All under All settings → Accounting (and the Payroll screen's card):

SettingWhat it doesDefault
payroll.auto_post — Post payroll automaticallyPosts a run as it arrives when it ties out to Gusto's totals with no adjustment. Everything else waits for review.Off
payroll.daily_sync — Sync every morningThe 06:00 job asks Gusto for new payrolls.On
payroll.lookback_days — Sync looks backHow many days back each sync asks for.45
payroll.first_sync_days — First sync reaches backHow far the first sync after connecting reaches.90
payroll.department_dimension — Tag payroll cost withThe journal dimension (for example department) each department's cost carries.empty

Recommended: leave auto-post off for the first two or three payrolls, compare each journal with Gusto's payroll journal report, then turn it on.

Accounts​

Each part of a payroll posts to an account role, mapped by the starter chart in a new company and added to an existing one by the upgrade (where the codes are free):

RoleStarter account
Wages and salaries (payroll_wages)6100 Wages
Payroll taxes (payroll_tax_expense)6110 Payroll taxes
Employee benefits (payroll_benefits_expense)6120 Employee benefits
Employee reimbursements (payroll_reimbursements)6130 Employee reimbursements
Payroll clearing (payroll_clearing)2510 Payroll clearing
Benefits payable (payroll_benefits_payable)2520 Benefits payable
Payroll deductions payable (payroll_deductions_payable)2530 Payroll deductions payable

Where a code was already taken by a different account, the role is left unmapped and the Payroll screen's Accounts tab says so; map it there, under Finance → Chart of accounts, or with Add the missing standard accounts.

On the Accounts tab a company can also point any part (and one department's wages) at its own account. Posting rules (Finance → Posting rules) can reshape the payroll.run_posted, payroll.debit_matched and payroll.debit_unmatched events like any other.

Permissions​

PermissionWhat it allowsSeeded roles
payroll.readSee runs, their journals and departments, the connectionAdmin, Manager, Accounting
payroll.manageConnect/disconnect Gusto, sync, map accounts and departmentsAdmin, Accounting
payroll.postPost, skip, restore and reverse runsAdmin, Accounting

No permission shows one person's pay: it is never stored.

How it interacts with other apps​

  • Banking: Gusto's debits are offered to the bank-feed matcher (and Find match) on the chosen funding account; matching posts clearing → bank. Without Banking, runs still post and clearing is emptied by hand.
  • Fiscal calendar: a run is journaled on its check date and refused for a closed period; runs dated in a closed period arrive already skipped.
  • Dimensions: the department dimension must exist under Settings → Dimensions and, if it keeps a value list, hold the values you map.

Turning it off​

Switch Payroll sync off on the Apps screen: the screen and routes go away, the morning job skips the company, and the runs and journals stay. Disconnecting Gusto removes the grant from the vault and keeps everything else.