Justworks to JSM Assets

Justworks to JSM Assets

Justworks to JSM Assets Integration Guide

This guide explains how to configure OnLink to retrieve Justworks data and import it into JSM Assets. It covers OAuth authentication, API requests, pagination, sample-data validation, field mapping, and optional filtering.

Overview

OnLink imports Justworks API responses into JSM Assets object types by using mapping statements such as key:, map:, and config:. The procedure below uses Justworks Workers as an example. Apply the same pattern to other resources, such as time off, by selecting the appropriate endpoint and mapping its response fields to the target Assets attributes.

The high-level process is:

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

  2. Prepare a Justworks OAuth application and credentials.

  3. Configure an OnLink Assets Data Source and authenticate with Justworks.

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

  5. Fetch sample data and map Justworks 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 Justworks 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 Justworks API endpoint URL for the object type you plan to import.

Supported Justworks object types

This guide uses Justworks Workers as the example resource. To import another resource, such as time off, select its API endpoint and map the returned JSON fields to the corresponding Assets attributes.

1. Prepare Justworks credentials

Before configuring OnLink, create or obtain a Justworks OAuth application with permission to access the endpoint and data you plan to import. Review the Justworks OAuth API documentation for authentication requirements.

Work with your Justworks administrator to create the OAuth application and collect the Client ID, Client Secret, and Refresh Token. Follow the Justworks OAuth application setup instructions.

2. Configure the OnLink data source

  1. In OnLink, add an Assets Data Source.

  2. For the source documentation, enter the Justworks Members API documentation.

  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 Justworks OAuth application:

  1. Enter the Client ID.

  2. Enter the Client Secret.

  3. Enter the Refresh Token.

  4. Set the scope to member.basic:read, or use the scope required by the endpoint.

  5. Save the authentication settings.

3. Configure the API method

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

  1. Set Method to GET.

  2. Set URL to the Justworks API endpoint. In the sample below, use your Justworks hostname and replace the example hostname with your own.

  3. Set Response data path to items.

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

GET https://public-api.justworks.com/v1/members

4. Fetch sample data

Save the connection and run it to retrieve sample records from Justworks. Use the sample JSON to verify the endpoint and identify the exact field paths required for mapping.

Sample response

{ "items": [ { "id": "member_01j6ffn569w683aptpakmzjya1", "name": { "full_preferred_name": "John Michael Smith" }, "active": true, "job_title": "Senior Software Engineer", "employment_location_type": "office", "department": { "name": "Engineering" }, "manager": { "full_preferred_name": "Jane Smith" } } ], "next_cursor": "member_01kptz5ykqgcvhphs40k3x1vdj" }

Pagination notes

Justworks API responses use cursor-based pagination. Configure the data source to read the cursor from next_cursor and request the next page until the API no longer returns a cursor. Verify the pagination settings against the endpoint documentation before starting the full import.

5. Configure the Assets import and mapping

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

Use the fetched API sample to identify the exact Justworks JSON field paths and map them to the corresponding JSM Assets attributes. Use a stable, unique value for the key: mapping so OnLink can match and update existing Assets objects instead of creating duplicates.

Mapping

Purpose

Mapping

Purpose

key:id=Employee ID

Uses the Justworks member id field as the unique key for matching and updating JSM Assets objects.

map:name.full_preferred_name=Name

Maps the Justworks member name.full_preferred_name field to Name, containing the member's full preferred name.

map:active=Status

Maps the Justworks member active field to Status, indicating whether the member is active.

map:job_title=Job Title

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

map:employment_location_type=Location

Maps the Justworks member employment_location_type field to Location, identifying the member's employment location type.

map:manager.full_preferred_name=Manager

Maps the Justworks member manager.full_preferred_name field to Manager, containing the manager's full preferred name.

map:department.name=Department

Maps the Justworks member department.name field to Department, containing the department name.

Mapping guidance

  • Start with one unique key: mapping so OnLink can identify whether to create or update an Assets object.

  • Add map: entries for each Justworks field you want to store in Assets.

  • Compare the Justworks 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. Use Get Data to preview the records returned by Justworks.

  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. Check that the key value is present and unique for every record.

  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 Justworks endpoint. Confirm supported parameters in the documentation for that endpoint before adding them to the OnLink request.

For example, to retrieve only active workers, add the query parameter status=active to the request. Run Get Data after adding the parameter and confirm that the returned records match the intended filter.

Review the request configuration, including the endpoint, authentication, response data path, pagination, and any query parameters. Save the data source when the preview returns the expected records.