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.0) integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release Status Released Supported By

Singer Community

Stitch Plan

Free

Singer GitHub Repository

Onfleet Repository

DATA SELECTION
Table Selection

Supported

Column Selection

Supported

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Unsupported

Table-level Reset

Unsupported

Configurable Replication Methods

Unsupported

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 sync

The Sync Historical Data setting will define the starting date for your Onfleet integration. This means that:

  • For tables using Incremental Replication, data equal to or newer than this date will be replicated to your data warehouse.
  • For tables using Full Table Replication, all data - including records that are older, 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 tables and columns to replicate

To complete the setup, you’ll need to select the tables and columns you want to replicate to your data warehouse.

Check out the Schema section to learn more about the available tables in Onfleet and how they replicate.

  1. In the list of tables that displays - or in the Tables to Replicate tab, if you skipped this step during setup - locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A green checkmark means the table is set to replicate.

  3. To track a column, click the checkbox next to the column’s name. A green 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.

Note: If you change these settings while a replication job is still in progress, they will not be used until the next job starts.

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 schemas

Replication Method :

Key-based Incremental

Replication Key :

timeLastModified

Primary Key :

id

API endpoint :

List administrators

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

id
STRING

The administrator ID.

Reference:

timeLastModified
DATE-TIME

The time the administrator was last modified.

email
STRING

The administrator’s email address.

isActive
BOOLEAN

Indicates if the administrator is active.

metadata
ARRAY

Metadata about the administrator.

value
ANYTHING

administrators (table), metadata (attribute)

name
STRING

The complete name of the administrator.

organization
STRING

The ID of the organization the administrator is associated with.

Reference:

phone
STRING

The administrator’s phone number.

timeCreated
DATE-TIME

The time the administrator was created.

type
STRING

The type of the administrator. Possible values are:

  • super - The administrator is a super administrator. Each Onfleet will only have one administrator of this type.
  • standard - The administrator is a dispatcher.

Replication Method :

Full Table

Primary Key :

id

API endpoint :

List 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.

id
STRING

The hub ID.

Reference:

address
OBJECT

The street address for the hub.

apartment
STRING

The apartment or unit for the address, if applicable.

city
STRING

The city for the address.

country
STRING

The country for the address.

number
STRING

The street number for the address.

postalCode
STRING

The postal code for the address.

state
STRING

The state for the address.

street
STRING

The street for the address.

hubs (table), address (attribute)

location
ARRAY

The coordinates of the hub’s location.

value
ANYTHING

hubs (table), location (attribute)

name
STRING

The name of the hub.

teams
ARRAY

A list of IDs for teams the hub is associated with.

value
STRING

The ID of the team the hub is associated with.

Reference:

hubs (table), teams (attribute)

Replication Method :

Key-based Incremental

Replication Key :

timeLastModified

Primary Key :

id

API endpoint :

Get details

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.

id
STRING

The organization ID.

Reference:

timeLastModified
DATE-TIME

The time the organization was last modified.

country
STRING

The country the organization resides in.

delegatees
ARRAY

A list of IDs of organizations that the organization can assign tasks to.

value
STRING

The ID of the organization that can be assigned tasks.

Reference:

organizations (table), delegatees (attribute)

email
STRING

The email address for the organization.

image
STRING

The image associated with the integration.

name
STRING

The full name of the organization.

timeCreated
DATE-TIME

The time the organization was created.

timezone
STRING

The timezone the organization resides in.


Replication Method :

Key-based Incremental

Replication Key :

timeLastModified

Primary Key :

id

API endpoint :

List 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.

id
STRING

The task ID.

Reference:

timeLastModified
DATE-TIME

The time the task was last modified.

completeAfter
NUMBER

The time the task must be completed after.

completeBefore
NUMBER

The time the task must be completed for.

completionDetails
OBJECT

Details about the completion of the task.

events
ARRAY

value
ANYTHING

tasks (table), events (attribute)

failureReason
STRING

firstLocation
ARRAY

value
ANYTHING

tasks (table), firstLocation (attribute)

lastLocation
ARRAY

value
ANYTHING

tasks (table), lastLocation (attribute)

time
DATE-TIME

unavailableAttachments
ARRAY

value
ANYTHING

tasks (table), unavailableAttachments (attribute)
tasks (table), completionDetails (attribute)

creator
STRING

The ID of the administrator that created the task.

Reference:

delayTime
NUMBER

dependencies
ARRAY

Details about the dependencies associated with the task. This requires usage of the Dependency Management feature in Onfleet.

value
ANYTHING

tasks (table), dependencies (attribute)

destination
OBJECT

Details about the destination associated with the task.

address
OBJECT

The street for the address.

apartment
STRING

The apartment or unit for the address, if applicable.

city
STRING

The city for the address.

country
STRING

The country for the address.

number
STRING

The street number for the address.

postalCode
STRING

The postal code for the address.

state
STRING

The state for the address.

street
STRING

tasks (table), address (attribute)

id
STRING

The destination ID.

location
ARRAY

value
ANYTHING

tasks (table), location (attribute)

metadata
ARRAY

value
ANYTHING

tasks (table), metadata (attribute)

notes
STRING

Notes about the destination.

timeCreated
DATE-TIME

The time the destination was created.

timeLastModified
DATE-TIME

The time the destination was last modified.

tasks (table), destination (attribute)

estimatedCompletionTime
NUMBER

executor
STRING

feedback
ARRAY

value
ANYTHING

tasks (table), feedback (attribute)

identity
OBJECT

checksum
STRING

failedScanCount
NUMBER

tasks (table), identity (attribute)

merchant
STRING

metadata
ARRAY

value
ANYTHING

tasks (table), metadata (attribute)

notes
STRING

Notes about the task.

organization
STRING

The ID of the organization associated with the task.

Reference:

overrides
OBJECT

Details about the recipient overrides associated with the task.

pickupTask
BOOLEAN

Indicates if the task is a pick-up task.

quantity
NUMBER

Applicable only if Route Optimization is enabled. The quantity of the task.

recipients
ARRAY

Details about the task recipient(s).

id
STRING

The ID of the recipient.

metadata
ARRAY

Metadata about the recipient.

value
ANYTHING

tasks (table), metadata (attribute)

name
STRING

The name of the recipient.

notes
STRING

Notes about the recipient.

organization
STRING

The ID of the organization the recipient is associated with.

phone
STRING

The recipient’s phone number.

skipSMSNotifications
BOOLEAN

Indicates if

timeCreated
DATE-TIME

The time the recipient was created.

timeLastModified
DATE-TIME

The time the recipient was last modified.

tasks (table), recipients (attribute)

serviceTime
NUMBER

Applicable only if Route Optimization is enabled. The service time for the task, in minutes.

shortId
STRING

sourceTaskId
STRING

state
NUMBER

The state of the task. Possible values include:

  • 0 - Unassigned. The task has not yet been assigned to a worker.
  • 1 - Assigned. The task has been assigned to a worker.
  • 2 - Active. The task has been started by the assigned worker.
  • 3 - Completed. The task has been completed by its assigned worker. This inludes successful and failed completions.

timeCreated
DATE-TIME

The time the task was created.

trackingURL
STRING

trackingViewed
BOOLEAN

worker
STRING

The ID of the worker assigned to the task.

Reference:


Replication Method :

Key-based Incremental

Replication Key :

timeLastModified

Primary Key :

id

API endpoint :

List teams

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

id
STRING

The team ID.

Reference:

timeLastModified
DATE-TIME

The time the team was last modified.

hub
STRING

The ID of the hub associated with the team.

Reference:

managers
ARRAY

The IDs of the managing administrators associated with the team.

value
STRING

The adminstrator ID.

Reference:

teams (table), managers (attribute)

name
STRING

The name of the team.

tasks
ARRAY

The IDs of the tasks assigned to the team.

value
STRING

The task ID.

Reference:

teams (table), tasks (attribute)

timeCreated
DATE-TIME

The time the team was created.

workers
ARRAY

The IDs of the workers belonging to the team.

value
STRING

The worker ID.

Reference:

teams (table), workers (attribute)

Replication Method :

Key-based Incremental

Replication Key :

timeLastModified

Primary Key :

id

API endpoint :

List workers

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

id
STRING

The worker ID.

Reference:

timeLastModified
DATE-TIME

The time the worker was last modified.

accountStatus
STRING

The worker’s account status.

activeTask
STRING

The ID of the worker’s active task.

Reference:

capacity
NUMBER

The maximum number of units the worker can carry.

delayTime
NUMBER

The number of seconds the worker is delayed by, based on the delayTime of all assigned tasks or null if the worker isn’t delayed. Refer to Onfleet’s documentation for more info on task statuses and delay times.

displayName
STRING

The worker’s display name.

imageUrl
STRING

The URL to the image for the worker.

location
STRING

metadata
ARRAY

Additional metadata bout the worker.

value
ANYTHING

workers (table), metadata (attribute)

name
STRING

The worker’s full name.

onDuty
BOOLEAN

Indicates if the worker is on duty.

organization
STRING

The ID of the organization the worker is a member of.

Reference:

phone
STRING

The worker’s phone number.

tasks
ARRAY

A list of IDs of tasks the user has been assigned.

value
STRING

The task ID.

Reference:

workers (table), tasks (attribute)

teams
ARRAY

A list of IDs of the teams the worker belongs to.

value
STRING

The team ID.

Reference:

workers (table), teams (attribute)

timeCreated
DATE-TIME

The time the worker was created.

timeLastSeen
DATE-TIME

The time the worker was last seen.

userData
OBJECT

Details about the device and platform the worker is using to access the Onfleet app.

appVersion
STRING

The version of the Onfleet app the worker is using.

batteryLevel
NUMBER

The battery level of the user’s device.

deviceDescription
STRING

A description of the device.

platform
STRING

The platform the worker is using. For example: IOS

workers (table), userData (attribute)

vehicle
OBJECT

Details about the worker’s vehicle.

color
STRING

The color of the vehicle.

description
STRING

The description of the vehicle.

id
STRING

The vehicle ID.

licensePlate
STRING

The vehicle’s license plate number.

timeLastModified
DATE-TIME

The time the vehicle was last modified.

type
STRING

The vehicle’s type. Possible values are:

  • CAR
  • MOTORCYLE
  • BICYCLE
  • TRUCK
workers (table), vehicle (attribute)


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.