# Marketo (v2)

Information note **Marketo extraction is supported by Stitch**   
This integration is powered by [Singer's](https://www.singer.io/) Marketo tap and certified by Stitch. [Check out and contribute to the repo on GitHub](https://github.com/singer-io/tap-marketo).  
  
For support, contact [Support](https://community.qlik.com/t5/Support/ct-p/qlikSupport).

## Marketo integration summary

Stitch’s Marketo integration replicates data using the [Marketo REST API](https://developers.marketo.com/rest-api/) and [Marketo Bulk API](https://developers.marketo.com/rest-api/bulk-extract/). Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#schema) section for a list of objects available for replication.

## Marketo feature snapshot

A high-level look at Stitch's Marketo (v2) 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 June 26, 2018 | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Stitch](https://community.qlik.com/t5/Support/ct-p/qlikSupport) |
| **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-marketo](https://github.com/singer-io/tap-marketo) |  |  |
| **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 Marketo

### Marketo setup requirements

To set up Marketo in Stitch, you need:

* **Admin permissions in Marketo.** Marketo Admin permissions are required to complete portions of the setup process.

Prior to set up, we recommend that you monitor your **Marketo API call usage** if other applications are also connected to your Marketo account. While Stitch is designed to use only a portion of your allotted API calls, replication may be impacted if numerous applications are using the API.

See the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#replication) for more details.

### Step 1: Create an API-only user role in Marketo

Information note If you have an [API-Only User Role](http://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User+Role) in your Marketo account, [skip to the next section](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#create-stitch-marketo-api-user).

1. Sign into your Marketo account.
2. Click the **Admin** option.
3. Under Admin, open the **Security** menu.
4. Click **Users & Roles**.
5. Click the **Roles** tab.
6. Click **New Role**.
7. In the **Create New Role** window, do the following:
   * **Role Name** - Enter a name for the role. If it’s specific to Stitch, make the name specific - something like “Stitch API Role.”
   * **Description** - Enter a description.
   * **Permissions** - Click the checkbox next to the **Access API** option.
8. Click **Create**.

### Step 2: Create a Stitch Marketo API user

Next, [you’ll create an API User](http://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User) for Stitch. Creating a Stitch-specific user ensures that Stitch is easily distinguishable in any logs or audits.

1. Click the **Admin** option.
2. Under Admin, open the **Security** menu.
3. Click **Users & Roles**.
4. In the Users tab, click **Invite New User**.
5. In the **INFO** section, enter an email address and first and last name.
6. Click **Next**.
7. In the **PERMISSIONS** section, click the checkboxes next to the **API User Role** you created and the **API Only option**.
8. Click **Next**.
9. In the **MESSAGE** section, click the **Send** button to create the user.

### Step 3: Create an API Custom Service in Marketo

To generate the API credentials you need to connect Stitch to Marketo, you need to [create an API Custom Service](http://docs.marketo.com/display/public/DOCS/Create+a+Custom+Service+for+Use+with+ReST+API) and associate it with the Stitch API user.

1. In **Admin**, open the **Integration** menu.
2. Click **LaunchPoint**.
3. Click **New** and then **New Service**.
4. In the New Service window, do the following:
   * **Display Name** - Enter “Stitch”.
   * **Service** - Select **Custom** from the dropdown.
   * **Description** - Enter a description.
   * **API Only User** - Select the Stitch user you created.
5. Click **Create**.
6. After the service is created, it’ll display in the Installed Services grid. Click the **View Details** link to display your API credentials.
7. Copy the **Client ID** and **Secret** into a text file.

### Step 4: Whitelist Stitch's IP addresses in Marketo

Information note **Completing this step is required only if you have IP Restriction enabled in Marketo.** You can check if this setting is enabled by clicking **Admin &gt; Web Services** and looking in the **IP Restrictions** section. If this setting isn’t enabled, skip ahead to the next step.

* [Step 4.1: Verify your Stitch account’s data pipeline region](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#verify-stitch-account-region)

* [Step 4.2: Add Stitch’s IP addresses to Marketo’s Web Services whitelist](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#add-ip-addresses-to-web-services)

#### Step 4.1: Verify your Stitch account's data pipeline region

The IP addresses you’ll whitelist depend on the [**Data pipeline region** your account is in](https://help.qlik.com/en-US/stitch/security/supported-data-pipeline-regions).

1. [Sign into your Stitch account](https://app.stitchdata.com/), if you haven’t already.

2. Click **User menu (your icon) &gt; Edit User Settings** and locate the **Data pipeline region** section to verify your account’s region.

3. Locate the list of IP addresses for your region:

   * [North America region IP addresses](https://help.qlik.com/en-US/stitch/security/stitch-ip-addresses#north-america-ip-addresses)

   * [Europe region IP addresses](https://help.qlik.com/en-US/stitch/security/stitch-ip-addresses#europe-ip-addresses)

Keep this list handy - you’ll need it in the next step.

#### Step 4.2: Add Stitch's IP addresses to Marketo's Web Services whitelist

1. In the **Integration** menu, click **Web Services**.
2. In the **IP Restrictions section**, click the **Edit** button.
3. In the **Allowed Addresses** field, paste one of the IP addresses you retrieved in the [previous step](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#verify-stitch-account-region).
4. Repeat step 4 until all the Stitch IP addresses for your data pipeline region are added.
5. Click the **Save** button.

Leave the Web Services page open - you’ll need it in the next step.

### Step 5: Retrieve your Marketo REST API Base URLs

1. On the Web Services page, scroll down to the **REST API** section.
2. In this section, find the **Endpoint** and **Identity** fields.
3. Copy these URLs into the text file where you have your Client ID and Client Secret.

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

5. In the **Endpoint Base URL** field, paste your **Marketo REST API Endpoint URL**.

6. In the **Identity Base URL** field, paste your **Marketo REST API Identity URL**.

7. In the **Client ID** field, paste your **Marketo API Client ID**.

8. In the **OAuth Client Secret** field, paste your **Marketo API Client Secret**.

9. In the **Max Daily API Calls** field, either keep the default 40,000 value or use a larger number based on your **Marketo API Quota**.

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

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

Marketo 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 9: 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/marketo#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 Marketo 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 Marketo, 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.

## Marketo replication

* [Marketo Daily REST API call limits](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#marketo-daily-api-call-limits)

* [Activities and Leads replication](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#activities-leads-replication)

### Marketo Daily REST API call limits

By default, all Marketo accounts have a maximum number of 50,000 daily account calls.

The integration’s **Max Daily API Calls** field dictates the quantity of your total API quota Stitch is allowed to use per 24 hour period. **Note**: This includes API usage from other apps. By default, Stitch’s Marketo integration will use up to 40,000 of these calls per day, which can be increased or reduced by setting a **Max Daily API Calls** value.

When the integration detects that the source account’s quota usage has exceeded the specified **Max Daily API Calls** limit, Stitch will be unable to replicate any Marketo data until more API quota is available. If you find that the 50,000 total call limit isn’t enough, contact Marketo support to inquire about raising your limit.

### Activities and Leads replication

To efficiently replicate activity and lead data, Stitch’s Marketo integration uses the Bulk API to extract data. While this approach is more efficient than the REST API, it may also impact your overall row count and frequency with which data is replicated.

#### Leads replication

To incrementally replicate `leads` data, Marketo requires the authorizing account to have the ability to filter using the `updatedAt` field. This allows Stitch to use an `updatedAt` query parameter to extract only new and updated data from the `leads` endpoint.

If your account doesn’t have this filter enabled, Stitch will use the `createdAt` field to incrementally replicate `leads` data. **Note**: This will result in data for this table using [Append-Only loading](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior).

#### Bulk API limits

Information note **Note**: This section applies to the `activity_[activity_types]` and `leads` tables. Bulk API call limits are a separate quota from REST API call limits.

Part of the extraction process using the Bulk API involves writing and downloading a file of the extracted data. Stitch then pushes the data from this file into your destination.

Marketo currently [limits the amount of data pulled on a daily basis to 500MB](http://developers.marketo.com/rest-api/bulk-extract/#limits). Exceeding the limit will pause replication until midnight CT, when it will be possible to resume.

## Marketo 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 2** of this integration.

This is the latest version of the Marketo 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.

### activities

In [version 1 of Stitch’s Marketo integration](https://help.qlik.com/en-US/stitch/integrations/saas/marketo/v1), the `activities` table contained all data pertaining to lead activities.

In this version, you can choose to replicate lead activity data for specific activity types. For every activity type defined in your Marketo account, you’ll see an `activities` table in the **Tables to Replicate** tab. For example: `activities_click_email` contains lead activity data for the `click_email` activity type.

These tables will contain the fields listed below, along with any fields specific to that activity type.

| **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)** | marketoGuid |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | activityDate |
| **Useful links** | [activities schema on GitHub](https://github.com/singer-io/tap-marketo/blob/master/tap_marketo/schemas/activities.json "Opens in new tab: activities schema on GitHub")<br><br><br>[Marketo API method](http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getLeadActivitiesUsingGET "Opens in new tab: Marketo API method") |

activities table foreign keys

| Join activities with | on |
| --- | --- |
| [activity_types](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#activity-types) | ```<br>activities.activityTypeId = activity_types.id<br>``` |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#leads) | ```<br>activities.leadId = leads.id<br>``` |

activities table schema

| **activityDate**<br><br><br>DATE-TIME |
| --- |
| **activityTypeId**<br><br><br>INTEGER |
| **campaignId**<br><br><br>INTEGER |
| **leadId**<br><br><br>INTEGER |
| **marketoGuid**<br><br><br>STRING |
| **primary\_attribute\_name**<br><br><br>STRING |
| **primary\_attribute\_value**<br><br><br>STRING |
| **primary\_attribute\_value\_id**<br><br><br>INTEGER |

### activity\_types

The `activity_types` table contains metadata about the activity types - form fill, web page visit, lead creation, and so on - available in Marketo.

| **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** | [activity_types schema on GitHub](https://github.com/singer-io/tap-marketo/blob/master/tap_marketo/schemas/activity_types.json "Opens in new tab: activity_types schema on GitHub")<br><br><br>[Marketo API method](http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getAllActivityTypesUsingGET "Opens in new tab: Marketo API method") |

activity\_types table foreign keys

| Join activity\_types with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#activities) | ```<br>activity_types.id = activities.activityTypeId<br>``` |

activity\_types table schema

| **attributes**<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 attributes<br><br><table> <tr> <td> <p> <strong>								dataType							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| --- |
| **description**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **primaryAttribute**<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 primaryAttribute<br><br><table> <tr> <td> <p> <strong>								dataType							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |

### campaigns

The `campaigns` table contains info about your Marketo campaigns

| **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)** | updatedAt |
| **Useful links** | [campaigns schema on GitHub](https://github.com/singer-io/tap-marketo/blob/master/tap_marketo/schemas/campaigns.json "Opens in new tab: campaigns schema on GitHub")<br><br><br>[Marketo documentation](http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Campaigns/getCampaignsUsingGET "Opens in new tab: Marketo documentation") |

campaigns table foreign keys

| Join campaigns with | on |
| --- | --- |
| [programs](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#programs) | ```<br>campaigns.programId = programs.id<br>``` |

campaigns table schema

| **active**<br><br><br>BOOLEAN |
| --- |
| **createdAt**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **programId**<br><br><br>INTEGER |
| **programName**<br><br><br>STRING |
| **type**<br><br><br>STRING |
| **updatedAt**<br><br><br>DATE-TIME |
| **workspaceName**<br><br><br>STRING |

### leads

The `leads` table contains info about your Marketo leads.

Stitch replicates leads from Marketo using the Bulk API. The Replication Key for this table varies depending on your Marketo account setup:

* **If updatedAt filtering is enabled**, this table will use `updatedAt` as the Replication Key
* **If updatedAt filtering isn’t enabled,** this table will use `createdAt` as the Replication Key. Additionally, data will be loaded using [Append-Only loading](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior).

[Read more about replicating this table](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#leads-replication).

| **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 |
| **Useful links** | [Marketo API method](http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/getLeadsByFilterUsingGET "Opens in new tab: Marketo API method") |

leads table foreign keys

| Join leads with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#activities) | ```<br>leads.id = activities.leadId<br>``` |

leads table schema

| **acquiredBy**<br><br><br>BOOLEAN |
| --- |
| **id**<br><br><br>INTEGER |
| **isExhausted**<br><br><br>BOOLEAN |
| **membershipDate**<br><br><br>DATE |
| **nurtureCadence**<br><br><br>STRING |
| **progressionStatus**<br><br><br>STRING |
| **reachedSuccess**<br><br><br>BOOLEAN |
| **reachedSuccessDate**<br><br><br>STRING |
| **stream**<br><br><br>STRING |

### lists

The `lists` table contains info about the static lists in your Marketo account.

**Note**: Due to some of the limitations in Marketo API, only static lists will 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)** | id |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | updatedAt |
| **Useful links** | [lists schema on GitHub](https://github.com/singer-io/tap-marketo/blob/master/tap_marketo/schemas/lists.json "Opens in new tab: lists schema on GitHub")<br><br><br>[Marketo API method](http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Static_Lists/getListsUsingGET "Opens in new tab: Marketo API method") |

lists table schema

| **createdAt**<br><br><br>DATE-TIME |
| --- |
| **description**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **programName**<br><br><br>STRING |
| **updatedAt**<br><br><br>DATE-TIME |
| **workspaceName**<br><br><br>STRING |

### programs

The `programs` table contains info about your Marketo programs. Programs can be parents to most types of assets in Marketo and allow you to track membership and success of leads.

| **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)** | updatedAt |
| **Useful links** | [Marketo documentation](http://developers.marketo.com/rest-api/assets/programs/ "Opens in new tab: Marketo documentation")<br><br><br>[programs schema on GitHub](https://github.com/singer-io/tap-marketo/blob/master/tap_marketo/schemas/programs.json "Opens in new tab: programs schema on GitHub")<br><br><br>[Marketo API method](https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/browseProgramsUsingGET "Opens in new tab: Marketo API method") |

programs table foreign keys

| Join programs with | on |
| --- | --- |
| [campaigns](https://help.qlik.com/en-US/stitch/integrations/saas/marketo#campaigns) | ```<br>programs.id = campaigns.programId<br>``` |

programs table schema

| **channel**<br><br><br>STRING |
| --- |
| **createdAt**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **folder**<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 folder<br><br><table> <tr> <td> <p> <strong>								folderName							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							INTEGER													</p> </td> </tr> </table> |
| **id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **type**<br><br><br>STRING |
| **updatedAt**<br><br><br>DATE-TIME |
| **url**<br><br><br>STRING |
| **workspace**<br><br><br>STRING |