TriNet to JSM Assets

TriNet to JSM Assets

TriNet to JSM Assets: Technical Integration Guide

This guide provides step-by-step instructions for configuring OnLink to retrieve People data from the TriNet API and synchronize it with JSM Assets. It covers prerequisites, OAuth 2.0 authentication, API request configuration, pagination, response validation, field mapping, import verification, and optional filtering.

Overview

OnLink retrieves TriNet API responses and maps each record to an object type in JSM Assets. The configuration uses key: to identify records and map: statements to populate Assets attributes. This guide uses the TriNet People API as an example; the same process applies to other resources when you select the appropriate endpoint and update the field mappings.

Follow these steps:

  1. Create or confirm the target JSM Assets schema and object type.

  2. Prepare a TriNet OAuth application and credentials.

  3. Configure an OnLink Assets Data Source and authenticate it with TriNet.

  4. Configure the API method, endpoint, response path, and pagination.

  5. Fetch sample data and map TriNet fields to Assets attributes.

  6. Preview the result, correct any issues, and run the import.

Prerequisites

  • A JSM Assets schema and object type for the data you want to import.

  • OnLink installed and available from Manage your apps.

  • A TriNet OAuth application with a Client ID, Client Secret, Refresh Token, and access to the required API endpoints.

  • Permission in JSM Assets to configure data sources, mappings, and imports.

  • The TriNet API endpoint URL for the object type you plan to import.

Supported TriNet object types

This guide uses the TriNet People API as the example resource. To import another resource, such as time off, select its API endpoint, configure any required parameters, and map the returned JSON fields to the corresponding Assets attributes. Refer to the TriNet API documentation for resource-specific details.

1. Prepare TriNet credentials

Before configuring OnLink, create or obtain a TriNet OAuth 2.0 application with permission to access the endpoint and data you plan to import. Confirm the required scopes and authentication requirements in the TriNet authentication documentation.

Work with your TriNet administrator to create the OAuth application and collect the Client ID, Client Secret, and Refresh Token. Keep these values secure and do not include them in page content, scripts, or screenshots.

2. Configure the OnLink data source

  1. In OnLink, add an Assets Data Source.

  2. For the source documentation, enter the TriNet People API documentation URL.

  3. Select Add, then select Parse to load the API definition.

  4. Open the authentication settings and configure the OAuth values described below.

On the authentication page, select the OAuth configuration and enter the credentials from your TriNet OAuth application. Use the following values:

  1. Enter the Token URL, for example, https://secure.trinet.com/oauth2/token/.

  2. Enter the Client ID.

  3. Enter the Client Secret.

  4. Enter the Refresh Token.

  5. Set the scope to people. For additional scopes, refer to the TriNet permissions documentation.

  6. Save the authentication settings.

3. Configure the API request

Configure a GET request to retrieve records from the selected TriNet endpoint. The example below uses the People API. For another resource, replace the endpoint and update the response data path if the response structure differs.

  1. Set Method to GET to retrieve People records.

  2. Set URL to https://api.trinet.com/core/companies/{company_id}/people, replacing {company_id} with your TriNet company ID.

  3. Set Response data path to data.data. The first data is the response wrapper and the second data is the array of People records.

  4. Leave other settings at their defaults unless the endpoint requires query parameters.

GET https://api.trinet.com/core/companies/{company_id}/people

The People API supports expansion of related objects. To include department and manager details in the response, add includes=department,manager to the request query parameters.

4. Retrieve and inspect sample data

Save the data source configuration and select Get Data to retrieve sample records from TriNet. Use the response to verify the endpoint, response data path, pagination structure, and exact field paths before creating the import mappings.

Sample response structure

{ "data": { "data": [ { "banks": { "object": "/meta/ref/list", "ref_object": "/core/banks", "url": "https://api.zenefits.com/core/people/2/banks" }, "city": "San Francisco", "company": { "object": "/meta/ref/detail", "ref_object": "/core/companies", "url": "https://api.zenefits.com/core/companies/1" }, "country": "USA", "date_of_birth": null, "department": { "object": "/meta/ref/detail", "ref_object": "/core/departments", "url": "https://api.zenefits.com/core/departments/9" }, "employments": { "object": "/meta/ref/list", "ref_object": "/core/employments", "url": "https://api.zenefits.com/core/people/2/employments" }, "first_name": "John", "preferred_name": "Jono", "id": "105024", "employee_number": "1", "last_name": "Doe", "location": { "object": "/meta/ref/detail", "ref_object": "/core/locations", "url": "https://api.zenefits.com/core/locations/2" }, "manager": { "object": "/meta/ref/detail", "ref_object": "/core/people", "url": null }, "object": "/core/people", "postal_code": "94111", "state": "CA", "status": "active", "street1": "101 1st St.", "street2": "Apartment 400", "subordinates": { "object": "/meta/ref/list", "ref_object": "/core/people", "url": "https://api.zenefits.com/core/people/2/subordinates" }, "title": "CEO", "work_email": "johndoe@example.com", "personal_email": "johndoe@gmail.com", "work_phone": null, "personal_phone": "(650) 555-1234", "gender": "M", "personal_pronoun": "he", "photo_url": "https://secure.zenefits.com/file/0om8dpTQfGxCpMum2zAn", "photo_thumbnail_url": "https://secure.zenefits.com/file/0om8dpTQfGxCpMum2zAn", "federal_filing_status": "married", "social_security_number": "123456789", "is_admin": True, "is_full_admin": True }, { "banks": { "object": "/meta/ref/list", "ref_object": "/core/banks", "url": "https://api.zenefits.com/core/people/3/banks" }, "city": "San Francisco", "company": { "object": "/meta/ref/detail", "ref_object": "/core/companies", "url": "https://api.zenefits.com/core/companies/1" }, "country": "USA", "date_of_birth": null, "department": { "object": "/meta/ref/detail", "ref_object": "/core/departments", "url": "https://api.zenefits.com/core/departments/8" }, "employments": { "object": "/meta/ref/list", "ref_object": "/core/employments", "url": "https://api.zenefits.com/core/people/3/employments" }, "first_name": "Jane", "preferred_name": "Jane", "id": "105026", "employee_number": "2", "last_name": "Doe", "location": { "object": "/meta/ref/detail", "ref_object": "/core/locations", "url": "https://api.zenefits.com/core/locations/2" }, "manager": { "object": "/meta/ref/detail", "ref_object": "/core/people", "url": "https://api.zenefits.com/core/people/2" }, "object": "/core/people", "postal_code": "94111", "state": "CA", "status": "active", "street1": "101 1st St.", "street2": "Apartment 400", "subordinates": { "object": "/meta/ref/list", "ref_object": "/core/people", "url": "https://api.zenefits.com/core/people/3/subordinates" }, "title": "Cofounder and CTO", "work_email": "janedoe@example.com", "personal_email": "janedoe@gmail.com", "work_phone": null, "personal_phone": "(650) 555-4321", "gender": "", "personal_pronoun": null, "photo_url": "https://secure.zenefits.com/file/0om8dpTQfGxCpMum2zAn", "photo_thumbnail_url": "https://secure.zenefits.com/file/0om8dpTQfGxCpMum2zAn", "federal_filing_status": "married", "social_security_number": "123456798", "is_admin": True, "is_full_admin": False } ], "next_url": "https://api.zenefits.com/core/people?starting_after=2", "object": "/meta/list", "url": "https://api.zenefits.com/core/people" }, "error": "null", "object": "/meta/response", "status": 200

Configure pagination

TriNet API responses can be paginated. Configure OnLink to follow the next_url value so the import retrieves all available records.

  1. Inspect the sample response and confirm that the pagination link is returned in data.next_url.

  2. In the pagination settings, configure the next-page URL or continuation field to use data.next_url.

  3. Save the pagination settings and select Get Data to confirm that records from subsequent pages are included.

For endpoint-specific behavior, refer to the TriNet pagination documentation.

5. Create the Assets import and configure field mappings

After the connection is established, create the Assets import by following the JSM Assets Data Synchronization guide.

Use the fetched sample response to identify the exact TriNet JSON field paths, then map those fields to the corresponding JSM Assets attributes. Define a stable, unique value with the key: mapping so OnLink can match existing objects and update them instead of creating duplicates.

Mapping

Purpose

Mapping

Purpose

key:employee_number=Employee Number

Uses the TriNet People employee_number field as the unique key for matching and updating JSM Assets objects.

map:preferred_name=Name

Maps the TriNet member preferred_name field to Name, containing the member's preferred name.

map:status=Status

Maps the TriNet member status field to Status, indicating the member's current status.

map:title=Job Title

Maps the TriNet member title field to Job Title, containing the member's job title.

map:work_email=Email

Maps the TriNet member work_email field to Email, containing the member's work email address.

map:manager=Manager

Maps the TriNet member manager field to Manager, identifying the member's manager.

map:department=Department

Maps the TriNet member department field to Department, identifying the member's department.

Mapping guidance

  • Define one stable, unique key: mapping, such as key:employee_number=Employee Number, so OnLink can match records during subsequent synchronizations.

  • Add a map: statement for each TriNet field that you want to store in the target Assets object type.

  • Compare the TriNet sample JSON with the Assets object type attributes before running an import.

  • If a value is nested in the JSON response, inspect the sample output carefully and use the field path supported by the OnLink mapping configuration.

6. Validate and run the import

  1. Select Get Data to preview the records returned by TriNet.

  2. Confirm that the response contains the expected records and fields.

  3. Verify that each mapping points to the correct JSON field and Assets attribute.

  4. Confirm that the key field is present and unique in every record so existing objects can be updated reliably.

  5. Run the import only after the preview and mappings are correct.

Optional filtering

Use query parameters to limit the records returned by the selected TriNet endpoint. Confirm that the endpoint supports the parameter before adding it to the OnLink request.

For example, to retrieve only active workers, add status=active as a query parameter. Select Get Data again and confirm that every returned record meets the intended filter.

Before saving the data source, review the endpoint, OAuth configuration, response data path, pagination settings, field mappings, and query parameters. Save the configuration only after the preview returns the expected records and the key and mapped attributes are correct.