Onfleet integration summary

Stitch’s Onfleet integration replicates data using the Onfleet REST API. Refer to the Schema section for a list of objects available for replication.

Onfleet feature snapshot

A high-level look at Stitch's Onfleet (v1) integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release status

Released on July 23, 2019

Supported by

Singer Community

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-onfleet

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Supported

Table-level reset

Unsupported

Configurable Replication Methods

Unsupported

DATA SELECTION
Table selection

Supported

Column selection

Supported

Select all

Supported

TRANSPARENCY
Extraction Logs

Supported

Loading Reports

Supported

Connecting Onfleet

Onfleet setup requirements

To set up Onfleet in Stitch, you need:

  • An Onfleet Basic plan or above. Onfleet limits API access to these plans, which is required to use Stitch’s Onfleet integration. Refer to Onfleet’s pricing page for more info.

  • Administrator privileges in Onfleet. Only administrators can create API keys, which is required to use Stitch’s Onfleet integration.


Step 1: Create an Onfleet API key

  1. Sign into your Onfleet account.
  2. Navigate to the API & Webhooks tab.
  3. Click the + button in the bottom of the API Keys section to create a new API key.
  4. In the Name prompt that displays, enter a name for the API key. For example: Stitch
  5. Click Create Key.

Keep the API key somewhere handy - you’ll need it in the next step.

Step 2: Add Onfleet as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the Onfleet icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch Onfleet” would create a schema called stitch_onfleet in the destination. Note: Schema names cannot be changed after you save the integration.

  5. In the API Key field, paste the Onfleet API key you created in Step 1.
  6. In the Quota Limit field, enter the percentage of the Onfleet API quota that Stitch is allowed to use. For example: Entering 10 would allow Stitch to use 10% of the API quota.

    Onfleet limits API requests to 20 requests per second across all API keys in a given Onfleet account. Refer to Onfleet’s documentation for more info.

Step 3: Define the historical replication start date

The Sync Historical Data setting defines the starting date for your Onfleet integration. This means that data equal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Onfleet’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.

Step 4: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Onfleet integrations support the following replication scheduling methods:

To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Step 5: Set objects to replicate

The last step is to select the tables and columns you want to replicate. Learn about the available tables for this integration.

Note: If a replication job is currently in progress, new selections won’t be used until the next job starts.

For Onfleet integrations, you can select:

  1. Individual tables and columns

  2. All tables and columns

Click the tabs to view instructions for each selection method.

  1. In the integration’s Tables to Replicate tab, locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A blue checkmark means the table is set to replicate.

  3. To track a column, click the checkbox next to the column’s name. A blue checkmark means the column is set to replicate.

  4. Repeat this process for all the tables and columns you want to replicate.
  5. When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.
  1. Click into the integration from the Stitch Dashboard page.
  2. Click the Tables to Replicate tab.

  3. In the list of tables, click the box next to the Table Names column.
  4. In the menu that displays, click Track all Tables and Fields:

    The Track all Tables and Fields menu in the Tables to Replicate tab

  5. Click the Finalize Your Selections button at the bottom of the page to save your data selections.

Initial and historical replication jobs

After you finish setting up Onfleet, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.


Onfleet table reference

administrators

The administrators table contains info about the administrators in your Onfleet account.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

timeLastModified

Useful links

administrators schema on GitHub

Onfleet API method

Join administrators with on
tasks
administrators.id = tasks.creator
administrators.organization = tasks.organization
teams
administrators.id = teams.managers
organizations
administrators.organization = organizations.id
administrators.organization = organizations.delegatees
workers
administrators.organization = workers.organization

email

STRING

id

STRING

isActive

BOOLEAN

metadata

ARRAY

name

STRING

organization

STRING

phone

STRING

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

type

STRING

hubs

The hubs table contains info about the hubs, or depots, for teams in your Onfleet account. A hub is the location from which all deliveries for a team’s workers start.

Replication Method

Full Table

Primary Key

id

Useful links

Onfleet documentation

hubs schema on GitHub

Onfleet API method

Join hubs with on
teams
hubs.id = teams.hub
hubs.teams = teams.id
workers
hubs.teams = workers.teams

address

OBJECT

apartment

STRING

city

STRING

country

STRING

number

STRING

postalCode

STRING

state

STRING

street

STRING

id

STRING

location

ARRAY

name

STRING

teams

ARRAY

organizations

The organizations table contains info about the organizations in your Onfleet account. In Onfleet, an organization is the top-most entity - it contains administrators, teams, works, and tasks, all of which belong to the organization.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

timeLastModified

Useful links

Onfleet documentation

organizations schema on GitHub

Onfleet API method

Join organizations with on
administrators
organizations.id = administrators.organization
organizations.delegatees = administrators.organization
tasks
organizations.id = tasks.organization
organizations.delegatees = tasks.organization
workers
organizations.id = workers.organization
organizations.delegatees = workers.organization

country

STRING

delegatees

ARRAY

email

STRING

id

STRING

image

STRING

name

STRING

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

timezone

STRING

tasks

The tasks table contains info about the tasks in your Onfleet account. Tasks are units of work that administrators create and assign to workers for completion.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

timeLastModified

Useful links

Onfleet documentation

tasks schema on GitHub

Onfleet API method

Join tasks with on
administrators
tasks.creator = administrators.id
tasks.organization = administrators.organization
teams
tasks.creator = teams.managers
tasks.id = teams.tasks
tasks.worker = teams.workers
organizations
tasks.organization = organizations.id
tasks.organization = organizations.delegatees
workers
tasks.organization = workers.organization
tasks.id = workers.activeTask
tasks.id = workers.tasks
tasks.worker = workers.id

completeAfter

NUMBER

completeBefore

NUMBER

completionDetails

OBJECT

events

ARRAY

failureReason

STRING

firstLocation

ARRAY

lastLocation

ARRAY

time

DATE-TIME

unavailableAttachments

ARRAY

creator

STRING

delayTime

NUMBER

dependencies

ARRAY

destination

OBJECT

address

OBJECT

apartment

STRING

city

STRING

country

STRING

number

STRING

postalCode

STRING

state

STRING

street

STRING

id

STRING

location

ARRAY

metadata

ARRAY

notes

STRING

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

estimatedCompletionTime

NUMBER

executor

STRING

feedback

ARRAY

id

STRING

identity

OBJECT

checksum

STRING

failedScanCount

NUMBER

merchant

STRING

metadata

ARRAY

notes

STRING

organization

STRING

overrides

OBJECT

pickupTask

BOOLEAN

quantity

NUMBER

recipients

ARRAY

id

STRING

metadata

ARRAY

name

STRING

notes

STRING

organization

STRING

phone

STRING

skipSMSNotifications

BOOLEAN

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

serviceTime

NUMBER

shortId

STRING

sourceTaskId

STRING

state

NUMBER

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

trackingURL

STRING

trackingViewed

BOOLEAN

worker

STRING

teams

The teams table contains info about the teams in your Onfleet account.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

timeLastModified

Useful links

Onfleet documentation

teams schema on GitHub

Onfleet API method

Join teams with on
administrators
teams.managers = administrators.id
tasks
teams.managers = tasks.creator
teams.tasks = tasks.id
teams.workers = tasks.worker
hubs
teams.hub = hubs.id
teams.id = hubs.teams
workers
teams.tasks = workers.activeTask
teams.tasks = workers.tasks
teams.id = workers.teams
teams.workers = workers.id

hub

STRING

id

STRING

managers

ARRAY

name

STRING

tasks

ARRAY

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

workers

ARRAY

workers

The workers table contains info about the workers (or drivers) in your Onfleet account. Workers are organization members who complete tasks.

Replication Method

Key-based Incremental

Primary Key

id

Replication Key

timeLastModified

Useful links

Onfleet documentation

workers schema on GitHub

Onfleet API method

Join workers with on
administrators
workers.organization = administrators.organization
organizations
workers.organization = organizations.id
workers.organization = organizations.delegatees
tasks
workers.organization = tasks.organization
workers.activeTask = tasks.id
workers.tasks = tasks.id
workers.id = tasks.worker
teams
workers.activeTask = teams.tasks
workers.tasks = teams.tasks
workers.teams = teams.id
workers.id = teams.workers
hubs
workers.teams = hubs.teams

accountStatus

STRING

activeTask

STRING

capacity

NUMBER

delayTime

NUMBER

displayName

STRING

id

STRING

imageUrl

STRING

location

STRING

metadata

ARRAY

name

STRING

onDuty

BOOLEAN

organization

STRING

phone

STRING

tasks

ARRAY

teams

ARRAY

timeCreated

DATE-TIME

timeLastModified

DATE-TIME

timeLastSeen

DATE-TIME

userData

OBJECT

appVersion

STRING

batteryLevel

NUMBER

deviceDescription

STRING

platform

STRING

vehicle

OBJECT

color

STRING

description

STRING

id

STRING

licensePlate

STRING

timeLastModified

DATE-TIME

type

STRING


Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.