# Autopilot

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

## Autopilot integration summary

Stitch’s Autopilot integration replicates data using the [Autopilot REST API](https://autopilot.docs.apiary.io/#) . Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#schema) section for a list of objects available for replication.

## Autopilot feature snapshot

A high-level look at Stitch's Autopilot (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 August 23, 2017 | **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-autopilot](https://github.com/singer-io/tap-autopilot) |  |  |
| **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 Remove icon<br><br>Table selection is not supported for this integration. All available table and fields will be automatically selected for replication.<br><br><br>Unsupported | **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 Remove icon<br><br>Column selection is not supported for this integration. All available columns in tables set to replicate will be selected.<br><br><br>Unsupported |
| **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Remove icon<br><br>As this integration doesn't support table or column selection, all available tables and columns are automatically replicated.<br><br><br>Unsupported |  |  |
| **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 Autopilot

### Step 1: Retrieve your Autopilot API Key

1. Sign into your Autopilot account.
2. Click the **gear (Settings)** icon on the left side of the page.
3. In the Settings menu, click **Autopilot API**.
4. If you haven’t used the API before, you’ll need to generate a new key. Click the **Generate** button.
5. Your API Key will display.

Make sure you keep this key safe, as it has access to your Autopilot account. If at any time your key is lost or compromised, you can click the **Regenerate** button to generate a new key. **Remember to also update the key in Stitch or you’ll encounter connection issues.**

### Step 2: Add Autopilot 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 **Autopilot** 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 Autopilot” would create a schema called `stitch_autopilot` in the destination. **Note**: Schema names cannot be changed after you save the integration.

### Step 3: Define the historical replication start date

The Sync Historical Data setting defines the starting date for your Autopilot 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 Autopilot’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.

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

### Initial and historical replication jobs

After you finish setting up Autopilot, 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.

## Autopilot 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 Autopilot 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.

### contacts

The `contacts` table contains info about the contacts in your Autopilot account.

Any custom fields associated with contacts will also be replicated.

| **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)** | contact\_id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | updated\_at |
| **Useful links** | [contacts schema on GitHub](https://github.com/singer-io/tap-autopilot/blob/master/tap_autopilot/schemas/contacts.json "Opens in new tab: contacts schema on GitHub")<br><br><br>[Autopilot API method](http://docs.autopilot.apiary.io/#reference/api-methods/get-all-contacts "Opens in new tab: Autopilot API method") |

contacts table foreign keys

| Join contacts with | on |
| --- | --- |
| [lists_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#lists-contacts) | ```<br>contacts.contact_id = lists_contacts.contact_id<br>```<br><br>```<br>contacts.lists = lists_contacts.list_id<br>``` |
| [smart_segments_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#smart-segments-contacts) | ```<br>contacts.contact_id = smart_segments_contacts.contact_id<br>``` |
| [lists](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#lists) | ```<br>contacts.lists = lists.list_id<br>``` |

contacts table schema

| **anywhere\_form\_submits**<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 anywhere\_form\_submits<br><br><table> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							BOOLEAN													</p> </td> </tr> </table> |
| --- |
| **anywhere\_page\_visits**<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 anywhere\_page\_visits<br><br><table> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							BOOLEAN													</p> </td> </tr> </table> |
| **anywhere\_utm**<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 anywhere\_utm<br><br><table> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							BOOLEAN													</p> </td> </tr> </table> |
| **company**<br><br><br>STRING |
| **company\_priority**<br><br><br>BOOLEAN |
| **contact\_id**<br><br><br>STRING |
| **created\_at**<br><br><br>DATE-TIME |
| **email**<br><br><br>STRING |
| **first\_conversion\_at**<br><br><br>DATE-TIME |
| **first\_name**<br><br><br>STRING |
| **first\_visit\_at**<br><br><br>DATE-TIME |
| **last\_name**<br><br><br>STRING |
| **lead\_source**<br><br><br>STRING |
| **lists**<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;. |
| **mail\_bounced**<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 mail\_bounced<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_clicked**<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 mail\_clicked<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_complained**<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 mail\_complained<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_hardbounced**<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 mail\_hardbounced<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_opened**<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 mail\_opened<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_received**<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 mail\_received<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mail\_unsubscribed**<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 mail\_unsubscribed<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								timestamp							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> </table> |
| **mailing\_country**<br><br><br>STRING |
| **mailing\_state**<br><br><br>STRING |
| **name**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **salutation**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **twitter**<br><br><br>STRING |
| **updated\_at**<br><br><br>DATE-TIME |

### lists

The `lists` table contains info about the available lists in your Autopilot 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)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | list\_id |
| **Useful links** | [lists schema on GitHub](https://github.com/singer-io/tap-autopilot/blob/master/tap_autopilot/schemas/lists.json "Opens in new tab: lists schema on GitHub")<br><br><br>[Autopilot API method](http://docs.autopilot.apiary.io/#reference/api-methods/lists/get-list-of-lists "Opens in new tab: Autopilot API method") |

lists table foreign keys

| Join lists with | on |
| --- | --- |
| [contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#contacts) | ```<br>lists.list_id = contacts.lists<br>``` |
| [lists_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#lists-contacts) | ```<br>lists.list_id = lists_contacts.list_id<br>``` |

lists table schema

| **list\_id**<br><br><br>STRING |
| --- |
| **title**<br><br><br>STRING |

### lists\_contacts

The `lists_contacts` table contains list and contact ID pairs, allowing you to create a list of all the contacts that belong to a given Autopilot list.

| **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 Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | list\_id<br><br>contact\_id |
| **Useful links** | [lists_contacts schema on GitHub](https://github.com/singer-io/tap-autopilot/blob/master/tap_autopilot/schemas/lists_contacts.json "Opens in new tab: lists_contacts schema on GitHub")<br><br><br>[Autopilot API method](http://docs.autopilot.apiary.io/#reference/api-methods/get-contacts-on-list/get-contacts-on-list "Opens in new tab: Autopilot API method") |

lists\_contacts table foreign keys

| Join lists\_contacts with | on |
| --- | --- |
| [contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#contacts) | ```<br>lists_contacts.contact_id = contacts.contact_id<br>```<br><br>```<br>lists_contacts.list_id = contacts.lists<br>``` |
| [smart_segments_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#smart-segments-contacts) | ```<br>lists_contacts.contact_id = smart_segments_contacts.contact_id<br>``` |
| [lists](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#lists) | ```<br>lists_contacts.list_id = lists.list_id<br>``` |

lists\_contacts table schema

| **contact\_id**<br><br><br>STRING |
| --- |
| **list\_id**<br><br><br>STRING |

### smart\_segments

The `smart_segments` table contains info about the smart segments in your Autopilot 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)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | segment\_id |
| **Useful links** | [smart_segments schema on GitHub](https://github.com/singer-io/tap-autopilot/blob/master/tap_autopilot/schemas/smart_segments.json "Opens in new tab: smart_segments schema on GitHub")<br><br><br>[Autopilot API method](http://docs.autopilot.apiary.io/#reference/api-methods/smart-segments/get-list-of-smart-segments "Opens in new tab: Autopilot API method") |

smart\_segments table foreign keys

| Join smart\_segments with | on |
| --- | --- |
| [smart_segments_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#smart-segments-contacts) | ```<br>smart_segments.segment_id = smart_segments_contacts.segment_id<br>``` |

smart\_segments table schema

| **segment\_id**<br><br><br>STRING |
| --- |
| **title**<br><br><br>STRING |

### smart\_segments\_contacts

The `smart_segments_contacts` table contains segment and contact pairs, or the segments your contacts are associated with.

| **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 Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | segment\_id<br><br>contact\_id |
| **Useful links** | [smart_segments_contacts schema on GitHub](https://github.com/singer-io/tap-autopilot/blob/master/tap_autopilot/schemas/smart_segments_contacts.json "Opens in new tab: smart_segments_contacts schema on GitHub")<br><br><br>[Autopilot API method](http://docs.autopilot.apiary.io/#reference/api-methods/get-contacts-on-smart-segment/get-contacts-on-smart-segment "Opens in new tab: Autopilot API method") |

smart\_segments\_contacts table foreign keys

| Join smart\_segments\_contacts with | on |
| --- | --- |
| [contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#contacts) | ```<br>smart_segments_contacts.contact_id = contacts.contact_id<br>``` |
| [lists_contacts](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#lists-contacts) | ```<br>smart_segments_contacts.contact_id = lists_contacts.contact_id<br>``` |
| [smart_segments](https://help.qlik.com/en-US/stitch/integrations/saas/autopilot#smart-segments) | ```<br>smart_segments_contacts.segment_id = smart_segments.segment_id<br>``` |

smart\_segments\_contacts table schema

| **contact\_id**<br><br><br>STRING |
| --- |
| **segment\_id**<br><br><br>STRING |