Definition
An employment represents a job associated with a connected payroll account. One account can contain data from more than one employment. A user represents the person sharing information. An account represents their connection to an income source. Employments identify the jobs associated with that connection. For example, a user may have worked for two employers that use the same payroll provider. After an account is connected, paystubs may be available from both employers, even when the identity information only describes one job.Matching records
Theemployment field is available on Identities, Paystubs, and Payroll Documents. Records with the same employment ID belong to the same employment.
Employer names can differ between records for the same job. Use the employment ID to match them:
In this example, the identity’s employment status applies to Bob’s Donuts. It should not be applied to the unmatched Suzy’s Cupcakes paystub.
Paystubs and payroll documents can have a
null employment when they cannot be matched to an employment. These records can still contain useful information. A shared null value does not mean that records belong to the same employment.Retrieve all records, then match
Use this approach when you need all available records, including paystubs that are not matched to an employment.- Retrieve identities, paystubs, and payroll documents using the
useroraccountfilter. Follow pagination to retrieve all available records. - Store the
employmentvalue with each record. - Match records with the same non-null employment ID. Keep unmatched records available for separate review or processing.
Retrieve records for an employment
Use this approach when you only need records associated with a specific employment.- List employments for the user or account.
- Use the returned employment
idas theemploymentfilter when listing identities, paystubs, or payroll documents.
Filtering by employment excludes unmatched records. If your application needs the applicant’s full available income history, retrieve all records and match them afterward.
Testing
A payroll account may contain paystubs from multiple jobs. Use the custom test user below to test this mixed-employment scenario in Sandbox and retrieve the paystubs for the job associated with the connected account.- Open a Flow in Console with Sandbox mode enabled, or initialize embedded Link with
sandbox: true. See Sandbox Testing. - In Link, select an Item that supports mixed employments testing, such as ADP.
- Enter username
test_1and the password below. If prompted for a verification code, enter8081.
Password
- Retrieve the account’s identity information to identify the job and read its
employmentID. - Use that ID as the
employmentfilter when listing paystubs. The returned paystubs will have the same employment ID as the identity.
employment: null and are excluded by this filter. To retrieve all of the account’s paystubs, including those from other jobs, query by account instead:
- Matches paystubs with the same non-null employment ID as the identity.
- Retains paystubs with
employment: nullwithout applying the identity’s employment status to them. - Excludes unmatched paystubs only when you intentionally use the
employmentfilter.