# Onfleet (v1)

Information note **Onfleet is supported by the Singer community**   
This integration is powered by [Singer's](https://www.singer.io/) Onfleet tap. For support, [visit the GitHub repo](https://github.com/singer-io/tap-onfleet) or [join the Singer Slack](https://singer-slackin.herokuapp.com/).

## Onfleet integration summary

Stitch’s Onfleet integration replicates data using the [Onfleet REST API](http://docs.onfleet.com/docs). Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#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](https://help.qlik.com/en-US/stitch/integrations/identify-an-integration-version)** | Released on July 23, 2019 | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Singer Community](https://www.singer.io/) |
| **Stitch plan**<br><br>the Info icon<br><br>The type of Stitch plan required to use the integration. | Standard | **[API availability](https://help.qlik.com/en-US/stitch/developers/stitch-connect/guides/source-destination-reference)**<br><br>the Info icon<br><br>Indicates if the integration is available as a source in Stitch Connect. | the Success icon<br><br>This version of the integration is available via the API.<br><br><br>Available |
| **Singer GitHub repository** | [singer-io/tap-onfleet](https://github.com/singer-io/tap-onfleet) |  |  |
| **REPLICATION SETTINGS** |  |  |  |
| **[Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling where an integration's Replication Frequency is anchored to a time you select. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Advanced Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling that allows you to specify granular start times for data extraction using cron expressions. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Table-level reset**<br><br>the Info icon<br><br>Indicates if data can be reset at the table level. If unsupported, data can only be reset at the integration level. | the Remove icon<br><br>Table-level resets are not supported for this integration. Resets are only supported at the integration level.<br><br><br>Unsupported | **[Configurable Replication Methods](https://help.qlik.com/en-US/stitch/replication/replication-methods)**<br><br>the Info icon<br><br>Indicates if Replication Methods can be defined by you for tables in the integration. | the Remove icon<br><br>Configurable Replication Methods are not supported for this integration. Stitch will use pre-defined replication methods for tables you set to replicate.<br><br><br>Unsupported |
| **DATA SELECTION** |  |  |  |
| **Table selection**<br><br>the Info icon<br><br>The ability to select individual tables for replication in the Stitch interface. If table selection is unavailable, all tables and all the columns they contain will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **Column selection**<br><br>the Info icon<br><br>The ability to select individual columns for replication in the Stitch interface. If column selection is unavailable, all columns will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Success icon<br><br>Supported<br><br><br>Supported |  |  |
| **TRANSPARENCY** |  |  |  |
| **[Extraction Logs](https://help.qlik.com/en-US/stitch/replication/extractions/integration-extraction-logs)**<br><br>the Info icon<br><br>Logs detailing the Extraction phase of the replication process for a given integration. Includes error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Loading Reports](https://help.qlik.com/en-US/stitch/replication/integration-loading-reports)**<br><br>the Info icon<br><br>Reports detailing the Loading phase of the replication process for a given integration. Includes the number of rows loaded for each table and error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>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](https://onfleet.com/pricing) for more info.

* **Administrator privileges in Onfleet**. Only [administrators can create API keys](https://support.onfleet.com/hc/en-us/articles/203798149-API), which is required to use Stitch’s Onfleet integration.

### Step 1: Create an Onfleet API key

Information note **Note**: This step requires [administrator privileges in Onfleet](https://support.onfleet.com/hc/en-us/articles/203798149-API).

1. Sign into your [Onfleet account](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet).
2. Navigate to the [**API & Webhooks** tab](https://support.onfleet.com/hc/en-us/articles/360013121812-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](https://app.stitchdata.com/).

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](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#create-onfleet-api-key).

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](http://docs.onfleet.com/docs/throttling) 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](https://help.qlik.com/en-US/stitch/replication/syncing-historical-saas-data-resetting-replication-keys) guide.

### Step 4: Create a replication schedule

Information note Replication schedules affect the time Extraction begins, not the time to data loaded. Refer to the [Replication Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling) documentation for more information.

In the **Replication Frequency** section, you’ll create the integration’s [replication schedule](https://help.qlik.com/en-US/stitch/replication/replication-scheduling). 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:

* [Replication Frequency](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/replication-frequency)

* [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)

* [Advanced Scheduling using Cron](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling) (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](https://help.qlik.com/en-US/stitch/getting-started/understanding-stitch-usage) for tips on reducing your usage.

### Step 5: Set objects to replicate

Information note **Is an object missing or not replicating?** Verify that the object meets the requirements for [selection](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#selection-requirements) and [replication](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#replication-requirements).

The last step is to select the tables and columns you want to replicate. [Learn about the available tables for this integration.](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#schema)

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

* Selection options
* Individual tables and columns
* All tables and columns

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.

Information note **Important**: Using the **Select All** feature will overwrite any previous selections. However, selections aren’t final until **Finalize Your Selections** is clicked. Clicking **Cancel** will restore your previous selections. Refer to the [Select All guide](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#set-all-data-to-replicate) for more info about this feature.

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](https://help.qlik.com/en-US/stitch/images/replication/select-all-tables-menu.png)The Track all Tables and Fields menu in the Tables to Replicate tabThe 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.**

Information note

**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](https://help.qlik.com/en-US/stitch/replication/replication-scheduling#job-scheduling-and-anchor-times) 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.

Information note **Replication will continue after the seven days are over**. If you’re no longer interested in this source, be sure to **pause** or **delete** the integration to prevent unwanted usage.

## Onfleet table reference

Information note

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

Information note

**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` &gt; `customers`), while case is maintained in PostgreSQL destinations (`CusTomERs` &gt; `CusTomERs`). Refer to the [Loading Guide](https://help.qlik.com/en-US/stitch/replication/loading/destination-guides) for your destination for more info.

### administrators

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

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | timeLastModified |
| **Useful links** | [administrators schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/administrators.json "Opens in new tab: administrators schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/administrators#list-administrators "Opens in new tab: Onfleet API method") |

administrators table foreign keys

| Join administrators with | on |
| --- | --- |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#tasks) | ```<br>administrators.id = tasks.creator<br>```<br><br>```<br>administrators.organization = tasks.organization<br>``` |
| [teams](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#teams) | ```<br>administrators.id = teams.managers<br>``` |
| [organizations](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#organizations) | ```<br>administrators.organization = organizations.id<br>```<br><br>```<br>administrators.organization = organizations.delegatees<br>``` |
| [workers](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) | ```<br>administrators.organization = workers.organization<br>``` |

administrators table schema

| **email**<br><br><br>STRING |
| --- |
| **id**<br><br><br>STRING |
| **isActive**<br><br><br>BOOLEAN |
| **metadata**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **name**<br><br><br>STRING |
| **organization**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **timeCreated**<br><br><br>DATE-TIME |
| **timeLastModified**<br><br><br>DATE-TIME |
| **type**<br><br><br>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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Useful links** | [Onfleet documentation](http://docs.onfleet.com/docs/hubs "Opens in new tab: Onfleet documentation")<br><br><br>[hubs schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/hubs.json "Opens in new tab: hubs schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/hubs#list-hubs "Opens in new tab: Onfleet API method") |

hubs table foreign keys

| Join hubs with | on |
| --- | --- |
| [teams](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#teams) | ```<br>hubs.id = teams.hub<br>```<br><br>```<br>hubs.teams = teams.id<br>``` |
| [workers](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) | ```<br>hubs.teams = workers.teams<br>``` |

hubs table schema

| **address**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand address<br><br><table> <tr> <td> <p> <strong>								apartment							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								number							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								state							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								street							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| --- |
| **id**<br><br><br>STRING |
| **location**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **name**<br><br><br>STRING |
| **teams**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |

### 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 [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | timeLastModified |
| **Useful links** | [Onfleet documentation](http://docs.onfleet.com/docs/organizations "Opens in new tab: Onfleet documentation")<br><br><br>[organizations schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/organizations.json "Opens in new tab: organizations schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/organizations#get-details "Opens in new tab: Onfleet API method") |

organizations table foreign keys

| Join organizations with | on |
| --- | --- |
| [administrators](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#administrators) | ```<br>organizations.id = administrators.organization<br>```<br><br>```<br>organizations.delegatees = administrators.organization<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#tasks) | ```<br>organizations.id = tasks.organization<br>```<br><br>```<br>organizations.delegatees = tasks.organization<br>``` |
| [workers](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) | ```<br>organizations.id = workers.organization<br>```<br><br>```<br>organizations.delegatees = workers.organization<br>``` |

organizations table schema

| **country**<br><br><br>STRING |
| --- |
| **delegatees**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **email**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **image**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **timeCreated**<br><br><br>DATE-TIME |
| **timeLastModified**<br><br><br>DATE-TIME |
| **timezone**<br><br><br>STRING |

### tasks

The `tasks` table contains info about the tasks in your Onfleet account. Tasks are units of work that [`administrators`](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#administrators) create and assign to [`workers`](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) for completion.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | timeLastModified |
| **Useful links** | [Onfleet documentation](http://docs.onfleet.com/docs/tasks "Opens in new tab: Onfleet documentation")<br><br><br>[tasks schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/tasks.json "Opens in new tab: tasks schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/tasks#list-tasks "Opens in new tab: Onfleet API method") |

tasks table foreign keys

| Join tasks with | on |
| --- | --- |
| [administrators](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#administrators) | ```<br>tasks.creator = administrators.id<br>```<br><br>```<br>tasks.organization = administrators.organization<br>``` |
| [teams](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#teams) | ```<br>tasks.creator = teams.managers<br>```<br><br>```<br>tasks.id = teams.tasks<br>```<br><br>```<br>tasks.worker = teams.workers<br>``` |
| [organizations](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#organizations) | ```<br>tasks.organization = organizations.id<br>```<br><br>```<br>tasks.organization = organizations.delegatees<br>``` |
| [workers](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) | ```<br>tasks.organization = workers.organization<br>```<br><br>```<br>tasks.id = workers.activeTask<br>```<br><br>```<br>tasks.id = workers.tasks<br>```<br><br>```<br>tasks.worker = workers.id<br>``` |

tasks table schema

| **completeAfter**<br><br><br>NUMBER |
| --- |
| **completeBefore**<br><br><br>NUMBER |
| **completionDetails**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand completionDetails<br><br><table> <tr> <td> <p> <strong>								events							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								failureReason							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								firstLocation							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								lastLocation							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								time							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								unavailableAttachments							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> </table> |
| **creator**<br><br><br>STRING |
| **delayTime**<br><br><br>NUMBER |
| **dependencies**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **destination**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand destination<br><br><table> <tr> <td> <p> <strong>								address							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand address</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								apartment							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								city							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								country							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								number							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								postalCode							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								state							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								street							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								location							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								metadata							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								notes							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timeCreated							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								timeLastModified							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **estimatedCompletionTime**<br><br><br>NUMBER |
| **executor**<br><br><br>STRING |
| **feedback**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **id**<br><br><br>STRING |
| **identity**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand identity<br><br><table> <tr> <td> <p> <strong>								checksum							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								failedScanCount							</strong> </p> <p>							NUMBER													</p> </td> </tr> </table> |
| **merchant**<br><br><br>STRING |
| **metadata**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **notes**<br><br><br>STRING |
| **organization**<br><br><br>STRING |
| **overrides**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **pickupTask**<br><br><br>BOOLEAN |
| **quantity**<br><br><br>NUMBER |
| **recipients**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand recipients<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								metadata							</strong> </p> <p>							ARRAY																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								notes							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								organization							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phone							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								skipSMSNotifications							</strong> </p> <p>							BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								timeCreated							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								timeLastModified							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **serviceTime**<br><br><br>NUMBER |
| **shortId**<br><br><br>STRING |
| **sourceTaskId**<br><br><br>STRING |
| **state**<br><br><br>NUMBER |
| **timeCreated**<br><br><br>DATE-TIME |
| **timeLastModified**<br><br><br>DATE-TIME |
| **trackingURL**<br><br><br>STRING |
| **trackingViewed**<br><br><br>BOOLEAN |
| **worker**<br><br><br>STRING |

### teams

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

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | timeLastModified |
| **Useful links** | [Onfleet documentation](http://docs.onfleet.com/docs/teams "Opens in new tab: Onfleet documentation")<br><br><br>[teams schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/teams.json "Opens in new tab: teams schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/teams#list-teams "Opens in new tab: Onfleet API method") |

teams table foreign keys

| Join teams with | on |
| --- | --- |
| [administrators](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#administrators) | ```<br>teams.managers = administrators.id<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#tasks) | ```<br>teams.managers = tasks.creator<br>```<br><br>```<br>teams.tasks = tasks.id<br>```<br><br>```<br>teams.workers = tasks.worker<br>``` |
| [hubs](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#hubs) | ```<br>teams.hub = hubs.id<br>```<br><br>```<br>teams.id = hubs.teams<br>``` |
| [workers](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#workers) | ```<br>teams.tasks = workers.activeTask<br>```<br><br>```<br>teams.tasks = workers.tasks<br>```<br><br>```<br>teams.id = workers.teams<br>```<br><br>```<br>teams.workers = workers.id<br>``` |

teams table schema

| **hub**<br><br><br>STRING |
| --- |
| **id**<br><br><br>STRING |
| **managers**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **name**<br><br><br>STRING |
| **tasks**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **timeCreated**<br><br><br>DATE-TIME |
| **timeLastModified**<br><br><br>DATE-TIME |
| **workers**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |

### workers

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

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | timeLastModified |
| **Useful links** | [Onfleet documentation](http://docs.onfleet.com/docs/workers "Opens in new tab: Onfleet documentation")<br><br><br>[workers schema on GitHub](https://github.com/singer-io/tap-onfleet/blob/master/tap_onfleet/schemas/workers.json "Opens in new tab: workers schema on GitHub")<br><br><br>[Onfleet API method](http://docs.onfleet.com/docs/workers#list-workers "Opens in new tab: Onfleet API method") |

workers table foreign keys

| Join workers with | on |
| --- | --- |
| [administrators](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#administrators) | ```<br>workers.organization = administrators.organization<br>``` |
| [organizations](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#organizations) | ```<br>workers.organization = organizations.id<br>```<br><br>```<br>workers.organization = organizations.delegatees<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#tasks) | ```<br>workers.organization = tasks.organization<br>```<br><br>```<br>workers.activeTask = tasks.id<br>```<br><br>```<br>workers.tasks = tasks.id<br>```<br><br>```<br>workers.id = tasks.worker<br>``` |
| [teams](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#teams) | ```<br>workers.activeTask = teams.tasks<br>```<br><br>```<br>workers.tasks = teams.tasks<br>```<br><br>```<br>workers.teams = teams.id<br>```<br><br>```<br>workers.id = teams.workers<br>``` |
| [hubs](https://help.qlik.com/en-US/stitch/integrations/saas/onfleet#hubs) | ```<br>workers.teams = hubs.teams<br>``` |

workers table schema

| **accountStatus**<br><br><br>STRING |
| --- |
| **activeTask**<br><br><br>STRING |
| **capacity**<br><br><br>NUMBER |
| **delayTime**<br><br><br>NUMBER |
| **displayName**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **imageUrl**<br><br><br>STRING |
| **location**<br><br><br>STRING |
| **metadata**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **name**<br><br><br>STRING |
| **onDuty**<br><br><br>BOOLEAN |
| **organization**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **tasks**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **teams**<br><br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **timeCreated**<br><br><br>DATE-TIME |
| **timeLastModified**<br><br><br>DATE-TIME |
| **timeLastSeen**<br><br><br>DATE-TIME |
| **userData**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand userData<br><br><table> <tr> <td> <p> <strong>								appVersion							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								batteryLevel							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								deviceDescription							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								platform							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **vehicle**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand vehicle<br><br><table> <tr> <td> <p> <strong>								color							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								description							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								licensePlate							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timeLastModified							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |