Paylocity (Apps step)

Updated Nov 23, 2026
DataMagik Automate

Paylocity

Lists, reads and updates Paylocity employees and reads their earnings through the Paylocity Web Link API (v2).

Use it to keep plant systems in step with payroll: a new hire's details for badge and training setup, an employee's department or cost center for labor reporting, or their earnings setup for a cost check.

Beta. This step has not yet been checked against a live Paylocity account, so treat its first runs as a test, and tell us if an operation does not answer as described.

Find it in the workflow editor's palette under Apps. See Apps steps for what every Apps step has in common.

Set it up

  1. Ask Paylocity (your account manager or service@paylocity.com) for Web Link API access for your company. Paylocity sends a client id and client secret, first for its sandbox (apisandbox.paylocity.com) and, once you are ready, for production.
  2. Note your Paylocity company ID, the number shown with your company name in Paylocity.
  3. In DataMagik, open Script Engine › Credentials and add an OAuth 2.0 credential with grant "Client credentials", the client id and secret, the token URL below and scope WebLinkAPI.
  4. Add api.paylocity.com (or apisandbox.paylocity.com) to Allowed Domains in the workflow's Script settings.

Credential: An OAuth 2.0 client credentials credential with the client id and secret Paylocity issued for the Web Link API, token URL https://api.paylocity.com/IdentityServer/connect/token and scope WebLinkAPI.

Signing in with OAuth 2.0

Grant typeClient credentials
Token URLhttps://api.paylocity.com/IdentityServer/connect/token
ScopeWebLinkAPI

Paylocity issues the client id and secret when it turns on Web Link API access for your company; the app signs in as itself, so no one clicks Connect. Sandbox keys only work against the sandbox: for them use token URL https://apisandbox.paylocity.com/IdentityServer/connect/token and set API host to apisandbox.paylocity.com. Paylocity's client secrets expire after a year; it emails a new one before then, and you paste it into the same credential.

Hosts it calls: api.paylocity.com, apisandbox.paylocity.com

Connection

FieldRequiredWhat to put
API hostYesapi.paylocity.com for your real payroll, or apisandbox.paylocity.com for Paylocity's sandbox. For example api.paylocity.com.
Company IDYesYour Paylocity company ID, the number Paylocity shows with your company name. For example 12345.

Operations

OperationWhat it does
Employee › ListLists every employee's id and status, 25 per request, following every page up to the step's page limit.
Employee › GetReads one employee's full record: name, contact, department and position, status and pay rate.
Employee › UpdateChanges fields on one employee's record; fields you leave out keep their values.
Earning › List for employeeLists the earnings set up for one employee (regular pay, shift premium, bonuses…).

Employee › List

Lists every employee's id and status, 25 per request, following every page up to the step's page limit.

Calls GET /employees. Follows the pages, up to Most pages (10 unless you change it).

What comes out: One item per employee: {{ $json.employeeId }}, {{ $json.statusCode }} (A active, T terminated…) and {{ $json.statusTypeCode }}.

Example: List the employees, keep those whose {{ $json.statusCode }} is A, and Get each one to build the plant's headcount by department.

Employee › Get

Reads one employee's full record: name, contact, department and position, status and pay rate.

Calls GET /employees/{employeeId}.

FieldRequiredWhat to put
Employee IDYesThe employee's Paylocity employee id. For example 1042. Choose from list beside the field fetches the choices from your account.

What comes out: One item: the employee, with {{ $json.employeeId }}, {{ $json.firstName }}, {{ $json.lastName }}, {{ $json.status.employeeStatus }}, {{ $json.departmentPosition.costCenter1 }}, {{ $json.departmentPosition.jobTitle }}, {{ $json.homeAddress }}, {{ $json.workAddress }} and {{ $json.primaryPayRate }}.

Example: For each new employee id, read the record and use {{ $json.departmentPosition.costCenter1 }} to put the person on the right line's training plan.

Employee › Update

Changes fields on one employee's record; fields you leave out keep their values.

Calls PATCH /employees/{employeeId}.

FieldRequiredWhat to put
Employee IDYesThe employee's Paylocity employee id. For example 1042. Choose from list beside the field fetches the choices from your account.
Fields to changeYesA JSON object in Paylocity's employee layout with only the fields to change, such as {"departmentPosition": {"costCenter1": "200"}}. For example {"workAddress": {"phone": "555-0100"}}.

What comes out: Paylocity answers an update with no content, so the step puts out one item holding {{ $json.status }} (204 when it worked) and an empty {{ $json.body }}.

Example: When a person transfers lines in the plant roster, update {{ $json.paylocity_id }} with the new line's cost center.

Earning › List for employee

Lists the earnings set up for one employee (regular pay, shift premium, bonuses…).

Calls GET /employees/{employeeId}/earnings.

FieldRequiredWhat to put
Employee IDYesThe employee's Paylocity employee id. For example 1042. Choose from list beside the field fetches the choices from your account.

What comes out: One item per earning: {{ $json.earningCode }}, {{ $json.earningType }}, {{ $json.amount }}, {{ $json.rate }}, {{ $json.frequency }}, {{ $json.startDate }} and {{ $json.endDate }}.

Example: List {{ $json.employeeId }}'s earnings and check that a second-shift worker has the shift premium earning code set up.

Trigger: Paylocity: New Items

Under Triggers in the palette. It looks at Paylocity on a schedule (every 15 minutes unless you change Look every) with one of these operations: Employee › List, and starts the workflow with the items it has not seen on an earlier look, one item each. Saving the workflow sets up the schedule.

  • New means: not seen before, by the item's id (or the field you name in Item field), or newer than the newest one last time, by a date or increasing number.
  • On the first run it only remembers what is there, unless you choose Start with everything.
  • Test runs show what would be new without remembering it. It remembers the last 5000 ids, so filter the list to keep it shorter than that.

Example

A Paylocity: New Items trigger on List employees starts the workflow for each new employee id; Paylocity › Get employee reads their name, department and hire date, and a Database step adds them to the plant's training matrix.

Tips

  • List employees gives only each employee's id and status; use Get employee for names, departments and pay details.
  • Update takes Paylocity's employee record layout, such as {"departmentPosition": {"costCenter1": "200"}}; only the fields you send change.
  • Build against the sandbox (API host apisandbox.paylocity.com with sandbox keys); the step reads and changes real payroll data on test runs too.
  • Paylocity limits how fast you can call it; if a large list answers 429, the step waits and tries again, and Most requests per second spaces the calls out.

Settings every Apps step has

  • More query parameters: any query parameter the fields do not offer, sent as is.
  • More body fields: a JSON object merged into the request body; nested objects merge, other values replace.
  • Most requests per second: spaces the calls out for rate limits. A "too many requests" (429) answer is retried after the wait the API asks for.
  • Most pages: for operations that follow pages, the most pages to fetch (10 unless you change it, up to 100). The run warns when it stops with more to get.
  • Fail on a non-2xx response: on by default. Turn it off to handle errors yourself.

Paylocity's own API documentation: https://developer.paylocity.com/integrations/reference

Was this page helpful?