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 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:
-
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
The administrators
table contains info about the administrators in your Onfleet account.
Key-based Incremental |
|
Primary Key |
id |
Replication Key |
timeLastModified |
Useful links |
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 |
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.
Full Table |
|
Primary Key |
id |
Useful links |
address OBJECT
|
|||||||
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.
Key-based Incremental |
|
Primary Key |
id |
Replication Key |
timeLastModified |
Useful links |
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 |
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.
Key-based Incremental |
|
Primary Key |
id |
Replication Key |
timeLastModified |
Useful links |
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
|
||||||||||||||
creator STRING |
||||||||||||||
delayTime NUMBER |
||||||||||||||
dependencies ARRAY |
||||||||||||||
destination OBJECT
|
||||||||||||||
estimatedCompletionTime NUMBER |
||||||||||||||
executor STRING |
||||||||||||||
feedback ARRAY |
||||||||||||||
id STRING |
||||||||||||||
identity OBJECT
|
||||||||||||||
merchant STRING |
||||||||||||||
metadata ARRAY |
||||||||||||||
notes STRING |
||||||||||||||
organization STRING |
||||||||||||||
overrides OBJECT |
||||||||||||||
pickupTask BOOLEAN |
||||||||||||||
quantity NUMBER |
||||||||||||||
recipients ARRAY
|
||||||||||||||
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.
Key-based Incremental |
|
Primary Key |
id |
Replication Key |
timeLastModified |
Useful links |
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.
Key-based Incremental |
|
Primary Key |
id |
Replication Key |
timeLastModified |
Useful links |
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
|
||||||
vehicle OBJECT
|
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.