This integration is powered by Singer's Onfleet tap. For support, visit the GitHub repo or join the Singer Slack.
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 | |
Stitch plan |
Standard |
API availability |
Available |
Singer GitHub repository | |||
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
- Sign into your Onfleet account.
- Navigate to the API & Webhooks tab.
- Click the + button in the bottom of the API Keys section to create a new API key.
- In the Name prompt that displays, enter a name for the API key. For example:
Stitch
- 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
- Sign into your Stitch account.
-
On the Stitch Dashboard page, click the Add Integration button.
-
Click the Onfleet icon.
-
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. - In the API Key field, paste the Onfleet API key you created in Step 1.
-
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:
- For tables using Key-based Incremental Replication, data equal to or newer than this date will be replicated to your destination.
- 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 destination.
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:
-
Advanced Scheduling using Cron (Advanced or Premium plans only)
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:
-
Individual tables and columns
-
All tables and columns
Click the tabs to view instructions for each selection method.
- In the integration’s Tables to Replicate tab, locate a table you want to replicate.
-
To track a table, click the checkbox next to the table’s name. A blue checkmark means the table is set to replicate.
-
To track a column, click the checkbox next to the column’s name. A blue checkmark means the column is set to replicate.
- Repeat this process for all the tables and columns you want to replicate.
- When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.
- Click into the integration from the Stitch Dashboard page.
-
Click the Tables to Replicate tab.
- In the list of tables, click the box next to the Table Names column.
-
In the menu that displays, click Track all Tables and Fields:
- 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.
Initial replication jobs with Anchor Scheduling
If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.
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
Schemas and versioning
Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.
The schema and info displayed below is for version 1 of this integration.
This is the latest version of the Onfleet integration.
Table and column names in your destination
Depending on your destination, table and column names may not appear as they are outlined below.
For example: Object names are lowercased in Redshift (CusTomERs
> customers
), while case is maintained in PostgreSQL destinations (CusTomERs
> CusTomERs
). Refer to the Loading Guide for your destination for more info.
administrators
Replication Method : |
Key-based Incremental |
Replication Key |
timeLastModified |
Primary Key |
id |
API endpoint : |
The administrators
table contains info about the administrators in your Onfleet account.
id
The administrator ID. Reference: |
timeLastModified
The time the administrator was last modified. |
email
The administrator’s email address. |
isActive
Indicates if the administrator is active. |
metadata
Metadata about the administrator. |
name
The complete name of the administrator. |
organization
The ID of the organization the administrator is associated with. Reference: |
phone
The administrator’s phone number. |
timeCreated
The time the administrator was created. |
type
The type of the administrator. Possible values are:
|
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
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
The hub ID. Reference: |
|||||||
address
The street address for the hub.
|
|||||||
location
The coordinates of the hub’s location. |
|||||||
name
The name of the hub. |
|||||||
teams
A list of IDs for teams the hub is associated with.
|
organizations
Replication Method : |
Key-based Incremental |
Replication Key |
timeLastModified |
Primary Key |
id |
API endpoint : |
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
The organization ID. Reference: |
|
timeLastModified
The time the organization was last modified. |
|
country
The country the organization resides in. |
|
delegatees
A list of IDs of organizations that the organization can assign tasks to.
|
|
email
The email address for the organization. |
|
image
The image associated with the integration. |
|
name
The full name of the organization. |
|
timeCreated
The time the organization was created. |
|
timezone
The timezone the organization resides in. |
Replication Method : |
Key-based Incremental |
Replication Key |
timeLastModified |
Primary Key |
id |
API endpoint : |
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
The task ID. Reference: |
||||||||||||||
timeLastModified
The time the task was last modified. |
||||||||||||||
completeAfter
The time the task must be completed after. |
||||||||||||||
completeBefore
The time the task must be completed for. |
||||||||||||||
completionDetails
Details about the completion of the task.
|
||||||||||||||
creator
The ID of the administrator that created the task. Reference: |
||||||||||||||
delayTime
|
||||||||||||||
dependencies
Details about the dependencies associated with the task. This requires usage of the Dependency Management feature in Onfleet. |
||||||||||||||
destination
Details about the destination associated with the task.
|
||||||||||||||
estimatedCompletionTime
|
||||||||||||||
executor
|
||||||||||||||
feedback
|
||||||||||||||
identity
|
||||||||||||||
merchant
|
||||||||||||||
metadata
|
||||||||||||||
notes
Notes about the task. |
||||||||||||||
organization
The ID of the organization associated with the task. Reference: |
||||||||||||||
overrides
Details about the recipient overrides associated with the task. |
||||||||||||||
pickupTask
Indicates if the task is a pick-up task. |
||||||||||||||
quantity
Applicable only if Route Optimization is enabled. The quantity of the task. |
||||||||||||||
recipients
Details about the task recipient(s).
|
||||||||||||||
serviceTime
Applicable only if Route Optimization is enabled. The service time for the task, in minutes. |
||||||||||||||
shortId
|
||||||||||||||
sourceTaskId
|
||||||||||||||
state
The state of the task. Possible values include:
|
||||||||||||||
timeCreated
The time the task was created. |
||||||||||||||
trackingURL
|
||||||||||||||
trackingViewed
|
||||||||||||||
worker
The ID of the worker assigned to the task. Reference: |
Replication Method : |
Key-based Incremental |
Replication Key |
timeLastModified |
Primary Key |
id |
API endpoint : |
The teams
table contains info about the teams in your Onfleet account.
id
The team ID. Reference: |
|
timeLastModified
The time the team was last modified. |
|
hub
The ID of the hub associated with the team. Reference: |
|
managers
The IDs of the managing administrators associated with the team.
|
|
name
The name of the team. |
|
tasks
The IDs of the tasks assigned to the team.
|
|
timeCreated
The time the team was created. |
|
workers
The IDs of the workers belonging to the team.
|
workers
Replication Method : |
Key-based Incremental |
Replication Key |
timeLastModified |
Primary Key |
id |
API endpoint : |
The workers
table contains info about the workers (or drivers) in your Onfleet account. Workers are organization members who complete tasks.
id
The worker ID. Reference: |
||||||
timeLastModified
The time the worker was last modified. |
||||||
accountStatus
The worker’s account status. |
||||||
activeTask
The ID of the worker’s active task. Reference: |
||||||
capacity
The maximum number of units the worker can carry. |
||||||
delayTime
The number of seconds the worker is delayed by, based on the |
||||||
displayName
The worker’s display name. |
||||||
imageUrl
The URL to the image for the worker. |
||||||
location
|
||||||
metadata
Additional metadata bout the worker. |
||||||
name
The worker’s full name. |
||||||
onDuty
Indicates if the worker is on duty. |
||||||
organization
The ID of the organization the worker is a member of. Reference: |
||||||
phone
The worker’s phone number. |
||||||
tasks
A list of IDs of tasks the user has been assigned.
|
||||||
teams
A list of IDs of the teams the worker belongs to.
|
||||||
timeCreated
The time the worker was created. |
||||||
timeLastSeen
The time the worker was last seen. |
||||||
userData
Details about the device and platform the worker is using to access the Onfleet app.
|
||||||
vehicle
Details about the worker’s vehicle.
|
Related | Troubleshooting |
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.