# Close.io (v1)

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

## Close.io integration summary

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

## Close.io feature snapshot

A high-level look at Stitch's Close.io (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 September 17, 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-closeio](https://github.com/singer-io/tap-closeio) |  |  |
| **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 Close.io

### Step 1: Generate a Close.io API Key

1. Sign into your Close.io account.
2. Click the **user menu (your icon)** in the top right corner.
3. Click **Settings**.
4. In the Company menu (located under the **You** menu), click **Your API Keys**.
5. In the Your API Keys section, click the **Generate New API Key** button.
6. A new API Key will display. Keep this handy; you’ll need it in the next step.

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

5. In the **API Key** field, paste your Close.io API Key.

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

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

Close.io 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 Close.io, 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.

## Close.io replication

### Replicating activity data

Every time Stitch runs a replication job for Close.io, the last 24 hours’ worth of data will be replicated.

This is applicable to all tables in the integration.

As Close.io doesn’t currently provide a way to query for activities based on modification time, Stitch replicates data in this way to ensure updated activities are captured. A list of available querying methods can be found in [Close.io’s documentation](https://developer.close.io/#activities-list-or-filter-all-activity-types).

Setting the Replication Frequency to a higher frequency - like 30 minutes - can result in re-replicating recent data and contribute to greater row usage. Selecting a lower frequency can help keep your row count low.

Refer to the documentation for each of these tables in the next section for more info.

#### Attribution window examples

In the tabs below are examples of attribution windows behave during historical (initial) and ongoing replication jobs.

* Historical and full re-replications
* Ongoing replications

For historical and full re-replications of Close.io data, Stitch will query for and extract data newer than or equal to the date defined in the **Start Date** field in the Integration Settings page.

The **Start Date**, in conjunction with the **Attribution Window**, defines the minimum date Stitch should query for when extracting historical data. This is calculated as:

`Start Date - Attribution Window = Minimum Extraction Date`

**Example**

During the initial set up, the **Start Date** field is set to `07/03/2017`, or ``.

To account for the Attribution Window, Stitch would calculate the **Minimum Extraction Date** value as: `2017-07-03 00:00:00 - 24 hours = 2017-07-02 00:00:00`

If you were to write a SQL query using this date for the `activities` table, it might look like this:

```
  SELECT *
    FROM closeio.activities
   WHERE date_created >= '2017-07-02 00:00:00'   /* Min. Extraction Date */
ORDER BY date_created
```

For ongoing replication jobs, Stitch will query for and extract data using the last saved maximum value in the table’s Replication Key column and the Attribution Window for the table.

**Note:** This applies to every replication job that takes place after the historical replication job.

**Example**

The last maximum saved Replication Key value for the `activities` table is `2017-10-01 00:00:00`.

To account for the Attribution Window of 24 hours, we’d subtract this from the last maximum saved Replication Key value:

`2017-10-01 00:00:00 - 24 hours = 2017-09-30 00:00:00`

In this case, Stitch would query for and extract data that is newer than or equal to `2017-09-30 00:00:00` and older than or equal to `2017-10-01 00:00:00`.

If this were a SQL query, it might look like this:

```
  SELECT *
    FROM activities
   WHERE date_created >= '2017-09-30 00:00:00'
                              /* max Replication Key value - Attribution Window */
     AND date_created <= '2017-10-01 00:00:00'
                              /* max Replication Key value from previous job */
ORDER BY date_created
```

### Historical event log data limitations

Due to how Close.io’s API functions, [only 30 days of historical data is available for event logs](https://developer.close.io/#event-log):

> Most actions in Close.io that change an object are logged in the event log. For example, creating a lead, sending an email, or deleting a note will create an event log entry. The event log API allows you to access these events, up to 30 days back in history.

This means that despite what the integration’s **Start Date** is set to, Stitch will only be able to retrieve 30 days of historical data **from the connection date** for the `event_log` table.

Additionally, note that if you ever [reset the integration](https://help.qlik.com/en-US/stitch/replication/syncing-historical-saas-data-resetting-replication-keys), this will also apply to the date the integration is reset.

## Close.io 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 Close.io 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

The `activities` table contains info about various activities in your Close.io account.

An activity belongs to a lead and can represent any type of activity that was performed on a lead or its contact. This includes calls, emails, notes, and so on.

#### Attribution window

When Stitch replicates data for this table, it will use an attribution window of 24 hours to fetch updated activities.

This means that every time a replication job runs, the last 24 hours’ worth of data will be replicated for this table. This is because Close.io doesn’t provide a way to query for activites based on a modification time, only when activities are created. A list of available querying methods can be found in [Close.io’s documentation](https://developer.close.io/#activities-list-or-filter-all-activity-types).

Refer to the [Replication](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#replication) section for more info and examples of how the attribution window is used to query for data.

| **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)** | Append-Only 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)** | date\_created |
| **Useful links** | [Close.io documentation](https://developer.close.io/#activities "Opens in new tab: Close.io documentation")<br><br><br>[activities schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/activities.json "Opens in new tab: activities schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#activities-list-or-filter-all-activity-types "Opens in new tab: Close.io API method") |

activities table foreign keys

| Join activities with | on |
| --- | --- |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#leads) | ```<br>activities.contact_id = leads.contacts.id<br>```<br><br>```<br>activities.contact_id = leads.opportunities.contact_id<br>```<br><br>```<br>activities.contact_id = leads.tasks.contact_id<br>```<br><br>```<br>activities.lead_id = leads.id<br>```<br><br>```<br>activities.lead_id = leads.contacts.lead_id<br>```<br><br>```<br>activities.lead_id = leads.opportunities.lead_id<br>```<br><br>```<br>activities.lead_id = leads.tasks.lead_id<br>```<br><br>```<br>activities.organization_id = leads.contacts.organization_id<br>```<br><br>```<br>activities.organization_id = leads.opportunities.organization_id<br>```<br><br>```<br>activities.organization_id = leads.organization_id<br>```<br><br>```<br>activities.organization_id = leads.tasks.organization_id<br>```<br><br>```<br>activities.task_id = leads.tasks.id<br>```<br><br>```<br>activities.created_by = leads.contacts.created_by<br>```<br><br>```<br>activities.updated_by = leads.contacts.created_by<br>```<br><br>```<br>activities.user_id = leads.contacts.created_by<br>```<br><br>```<br>activities.task_assigned_to = leads.contacts.created_by<br>```<br><br>```<br>activities.users = leads.contacts.created_by<br>```<br><br>```<br>activities.created_by = leads.contacts.updated_by<br>```<br><br>```<br>activities.updated_by = leads.contacts.updated_by<br>```<br><br>```<br>activities.user_id = leads.contacts.updated_by<br>```<br><br>```<br>activities.task_assigned_to = leads.contacts.updated_by<br>```<br><br>```<br>activities.users = leads.contacts.updated_by<br>```<br><br>```<br>activities.created_by = leads.created_by<br>```<br><br>```<br>activities.updated_by = leads.created_by<br>```<br><br>```<br>activities.user_id = leads.created_by<br>```<br><br>```<br>activities.task_assigned_to = leads.created_by<br>```<br><br>```<br>activities.users = leads.created_by<br>```<br><br>```<br>activities.created_by = leads.opportunities.created_by<br>```<br><br>```<br>activities.updated_by = leads.opportunities.created_by<br>```<br><br>```<br>activities.user_id = leads.opportunities.created_by<br>```<br><br>```<br>activities.task_assigned_to = leads.opportunities.created_by<br>```<br><br>```<br>activities.users = leads.opportunities.created_by<br>```<br><br>```<br>activities.created_by = leads.opportunities.updated_by<br>```<br><br>```<br>activities.updated_by = leads.opportunities.updated_by<br>```<br><br>```<br>activities.user_id = leads.opportunities.updated_by<br>```<br><br>```<br>activities.task_assigned_to = leads.opportunities.updated_by<br>```<br><br>```<br>activities.users = leads.opportunities.updated_by<br>```<br><br>```<br>activities.created_by = leads.opportunities.user_id<br>```<br><br>```<br>activities.updated_by = leads.opportunities.user_id<br>```<br><br>```<br>activities.user_id = leads.opportunities.user_id<br>```<br><br>```<br>activities.task_assigned_to = leads.opportunities.user_id<br>```<br><br>```<br>activities.users = leads.opportunities.user_id<br>```<br><br>```<br>activities.created_by = leads.tasks.assigned_to<br>```<br><br>```<br>activities.updated_by = leads.tasks.assigned_to<br>```<br><br>```<br>activities.user_id = leads.tasks.assigned_to<br>```<br><br>```<br>activities.task_assigned_to = leads.tasks.assigned_to<br>```<br><br>```<br>activities.users = leads.tasks.assigned_to<br>```<br><br>```<br>activities.created_by = leads.tasks.created_by<br>```<br><br>```<br>activities.updated_by = leads.tasks.created_by<br>```<br><br>```<br>activities.user_id = leads.tasks.created_by<br>```<br><br>```<br>activities.task_assigned_to = leads.tasks.created_by<br>```<br><br>```<br>activities.users = leads.tasks.created_by<br>```<br><br>```<br>activities.created_by = leads.tasks.updated_by<br>```<br><br>```<br>activities.updated_by = leads.tasks.updated_by<br>```<br><br>```<br>activities.user_id = leads.tasks.updated_by<br>```<br><br>```<br>activities.task_assigned_to = leads.tasks.updated_by<br>```<br><br>```<br>activities.users = leads.tasks.updated_by<br>```<br><br>```<br>activities.created_by = leads.updated_by<br>```<br><br>```<br>activities.updated_by = leads.updated_by<br>```<br><br>```<br>activities.user_id = leads.updated_by<br>```<br><br>```<br>activities.task_assigned_to = leads.updated_by<br>```<br><br>```<br>activities.users = leads.updated_by<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#tasks) | ```<br>activities.contact_id = tasks.contact_id<br>```<br><br>```<br>activities.lead_id = tasks.lead_id<br>```<br><br>```<br>activities.organization_id = tasks.organization_id<br>```<br><br>```<br>activities.task_id = tasks.id<br>```<br><br>```<br>activities.created_by = tasks.assigned_to<br>```<br><br>```<br>activities.updated_by = tasks.assigned_to<br>```<br><br>```<br>activities.user_id = tasks.assigned_to<br>```<br><br>```<br>activities.task_assigned_to = tasks.assigned_to<br>```<br><br>```<br>activities.users = tasks.assigned_to<br>```<br><br>```<br>activities.created_by = tasks.created_by<br>```<br><br>```<br>activities.updated_by = tasks.created_by<br>```<br><br>```<br>activities.user_id = tasks.created_by<br>```<br><br>```<br>activities.task_assigned_to = tasks.created_by<br>```<br><br>```<br>activities.users = tasks.created_by<br>```<br><br>```<br>activities.created_by = tasks.updated_by<br>```<br><br>```<br>activities.updated_by = tasks.updated_by<br>```<br><br>```<br>activities.user_id = tasks.updated_by<br>```<br><br>```<br>activities.task_assigned_to = tasks.updated_by<br>```<br><br>```<br>activities.users = tasks.updated_by<br>``` |
| [event_log](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#event-log) | ```<br>activities.lead_id = event_log.lead_id<br>```<br><br>```<br>activities.organization_id = event_log.organization_id<br>```<br><br>```<br>activities.created_by = event_log.user_id<br>```<br><br>```<br>activities.updated_by = event_log.user_id<br>```<br><br>```<br>activities.user_id = event_log.user_id<br>```<br><br>```<br>activities.task_assigned_to = event_log.user_id<br>```<br><br>```<br>activities.users = event_log.user_id<br>``` |
| [custom_fields](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#custom-fields) | ```<br>activities.organization_id = custom_fields.organization_id<br>```<br><br>```<br>activities.created_by = custom_fields.created_by<br>```<br><br>```<br>activities.updated_by = custom_fields.created_by<br>```<br><br>```<br>activities.user_id = custom_fields.created_by<br>```<br><br>```<br>activities.task_assigned_to = custom_fields.created_by<br>```<br><br>```<br>activities.users = custom_fields.created_by<br>```<br><br>```<br>activities.created_by = custom_fields.updated_by<br>```<br><br>```<br>activities.updated_by = custom_fields.updated_by<br>```<br><br>```<br>activities.user_id = custom_fields.updated_by<br>```<br><br>```<br>activities.task_assigned_to = custom_fields.updated_by<br>```<br><br>```<br>activities.users = custom_fields.updated_by<br>``` |
| [users](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#users) | ```<br>activities.organization_id = users.organizations<br>```<br><br>```<br>activities.created_by = users.id<br>```<br><br>```<br>activities.updated_by = users.id<br>```<br><br>```<br>activities.user_id = users.id<br>```<br><br>```<br>activities.task_assigned_to = users.id<br>```<br><br>```<br>activities.users = users.id<br>``` |

activities table schema

| **\_type**<br><br><br>STRING |
| --- |
| **attachments**<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;. |
| **bcc**<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;. |
| **body\_html**<br><br><br>STRING |
| **body\_html\_quoted**<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 body\_html\_quoted<br><br><table> <tr> <td> <p> <strong>								expand							</strong> </p> <p>							INTEGER, BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								html							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **body\_preview**<br><br><br>STRING |
| **body\_text**<br><br><br>STRING |
| **body\_text\_quoted**<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 body\_text\_quoted<br><br><table> <tr> <td> <p> <strong>								expand							</strong> </p> <p>							INTEGER, BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								text							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **cc**<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;. |
| **contact\_id**<br><br><br>STRING |
| **created\_by**<br><br><br>STRING |
| **created\_by\_name**<br><br><br>STRING |
| **date\_created**<br><br><br>DATE-TIME |
| **date\_scheduled**<br><br><br>DATE-TIME |
| **date\_sent**<br><br><br>DATE-TIME |
| **date\_updated**<br><br><br>DATE-TIME |
| **dialer\_id**<br><br><br>STRING |
| **direction**<br><br><br>STRING |
| **duration**<br><br><br>INTEGER |
| **email\_account\_id**<br><br><br>STRING |
| **envelope**<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 envelope<br><br><table> <tr> <td> <p> <strong>								bcc							</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> <div> <button>Click to expand bcc</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								cc							</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> <div> <button>Click to expand cc</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								date							</strong> </p> <p> </p> <p>DATE-TIME																				</p> <p>STRING																				</p> </td> </tr> <tr> <td> <p> <strong>								from							</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> <div> <button>Click to expand from</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								in_reply_to							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								is_autoreply							</strong> </p> <p>							INTEGER, BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								message_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								reply_to							</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> <div> <button>Click to expand reply_to</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								sender							</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> <div> <button>Click to expand sender</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								subject							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								to							</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> <div> <button>Click to expand to</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> </table> |
| **id**<br><br><br>STRING |
| **import\_id**<br><br><br>STRING |
| **in\_reply\_to\_id**<br><br><br>STRING |
| **lead\_id**<br><br><br>STRING |
| **local\_phone**<br><br><br>STRING |
| **message\_ids**<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;. |
| **need\_smtp\_credentials**<br><br><br>INTEGER, BOOLEAN |
| **new\_status\_id**<br><br><br>STRING |
| **new\_status\_label**<br><br><br>STRING |
| **new\_status\_type**<br><br><br>STRING |
| **note**<br><br><br>STRING |
| **old\_status\_id**<br><br><br>STRING |
| **old\_status\_label**<br><br><br>STRING |
| **old\_status\_type**<br><br><br>STRING |
| **opens**<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 opens<br><br><table> <tr> <td> <p> <strong>								ip_address							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								opened_at							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								opened_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								user_agent							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **opens\_summary**<br><br><br>STRING |
| **opportunity\_confidence**<br><br><br>INTEGER |
| **opportunity\_date\_won**<br><br><br>STRING |
| **opportunity\_id**<br><br><br>STRING |
| **opportunity\_value**<br><br><br>INTEGER |
| **opportunity\_value\_currency**<br><br><br>STRING |
| **opportunity\_value\_formatted**<br><br><br>STRING |
| **opportunity\_value\_period**<br><br><br>STRING |
| **organization\_id**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **recording\_url**<br><br><br>STRING |
| **references**<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;. |
| **remote\_phone**<br><br><br>STRING |
| **send\_attempts**<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 send\_attempts<br><br><table> <tr> <td> <p> <strong>								date							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								error_class							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								error_message							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **sender**<br><br><br>STRING |
| **source**<br><br><br>STRING |
| **status**<br><br><br>STRING |
| **subject**<br><br><br>STRING |
| **task\_assigned\_to**<br><br><br>STRING |
| **task\_assigned\_to\_name**<br><br><br>STRING |
| **task\_id**<br><br><br>STRING |
| **task\_text**<br><br><br>STRING |
| **template\_id**<br><br><br>STRING |
| **template\_name**<br><br><br>STRING |
| **thread\_id**<br><br><br>STRING |
| **to**<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;. |
| **transferred\_from**<br><br><br>STRING |
| **transferred\_to**<br><br><br>STRING |
| **updated\_by**<br><br><br>STRING |
| **updated\_by\_name**<br><br><br>STRING |
| **user\_id**<br><br><br>STRING |
| **user\_name**<br><br><br>STRING |
| **users**<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;. |
| **voicemail\_duration**<br><br><br>INTEGER |
| **voicemail\_url**<br><br><br>STRING |

### custom\_fields

The `custom_fields` table contains info about the custom fields in your Close.io account.

Custom fields allow you to store arbitrary data on leads in Close.io. [Refer to Close.io’s documentation](https://help.close.io/customer/portal/articles/1104820-custom-fields) for more info.

| **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)** | date\_updated |
| **Useful links** | [custom_fields schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/custom_fields.json "Opens in new tab: custom_fields schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#custom-fields-list-all-the-custom-fields-for-your-organization "Opens in new tab: Close.io API method") |

custom\_fields table foreign keys

| Join custom\_fields with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#activities) | ```<br>custom_fields.organization_id = activities.organization_id<br>```<br><br>```<br>custom_fields.created_by = activities.created_by<br>```<br><br>```<br>custom_fields.updated_by = activities.created_by<br>```<br><br>```<br>custom_fields.created_by = activities.updated_by<br>```<br><br>```<br>custom_fields.updated_by = activities.updated_by<br>```<br><br>```<br>custom_fields.created_by = activities.user_id<br>```<br><br>```<br>custom_fields.updated_by = activities.user_id<br>```<br><br>```<br>custom_fields.created_by = activities.task_assigned_to<br>```<br><br>```<br>custom_fields.updated_by = activities.task_assigned_to<br>```<br><br>```<br>custom_fields.created_by = activities.users<br>```<br><br>```<br>custom_fields.updated_by = activities.users<br>``` |
| [event_log](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#event-log) | ```<br>custom_fields.organization_id = event_log.organization_id<br>```<br><br>```<br>custom_fields.created_by = event_log.user_id<br>```<br><br>```<br>custom_fields.updated_by = event_log.user_id<br>``` |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#leads) | ```<br>custom_fields.organization_id = leads.contacts.organization_id<br>```<br><br>```<br>custom_fields.organization_id = leads.opportunities.organization_id<br>```<br><br>```<br>custom_fields.organization_id = leads.organization_id<br>```<br><br>```<br>custom_fields.organization_id = leads.tasks.organization_id<br>```<br><br>```<br>custom_fields.created_by = leads.contacts.created_by<br>```<br><br>```<br>custom_fields.updated_by = leads.contacts.created_by<br>```<br><br>```<br>custom_fields.created_by = leads.contacts.updated_by<br>```<br><br>```<br>custom_fields.updated_by = leads.contacts.updated_by<br>```<br><br>```<br>custom_fields.created_by = leads.created_by<br>```<br><br>```<br>custom_fields.updated_by = leads.created_by<br>```<br><br>```<br>custom_fields.created_by = leads.opportunities.created_by<br>```<br><br>```<br>custom_fields.updated_by = leads.opportunities.created_by<br>```<br><br>```<br>custom_fields.created_by = leads.opportunities.updated_by<br>```<br><br>```<br>custom_fields.updated_by = leads.opportunities.updated_by<br>```<br><br>```<br>custom_fields.created_by = leads.opportunities.user_id<br>```<br><br>```<br>custom_fields.updated_by = leads.opportunities.user_id<br>```<br><br>```<br>custom_fields.created_by = leads.tasks.assigned_to<br>```<br><br>```<br>custom_fields.updated_by = leads.tasks.assigned_to<br>```<br><br>```<br>custom_fields.created_by = leads.tasks.created_by<br>```<br><br>```<br>custom_fields.updated_by = leads.tasks.created_by<br>```<br><br>```<br>custom_fields.created_by = leads.tasks.updated_by<br>```<br><br>```<br>custom_fields.updated_by = leads.tasks.updated_by<br>```<br><br>```<br>custom_fields.created_by = leads.updated_by<br>```<br><br>```<br>custom_fields.updated_by = leads.updated_by<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#tasks) | ```<br>custom_fields.organization_id = tasks.organization_id<br>```<br><br>```<br>custom_fields.created_by = tasks.assigned_to<br>```<br><br>```<br>custom_fields.updated_by = tasks.assigned_to<br>```<br><br>```<br>custom_fields.created_by = tasks.created_by<br>```<br><br>```<br>custom_fields.updated_by = tasks.created_by<br>```<br><br>```<br>custom_fields.created_by = tasks.updated_by<br>```<br><br>```<br>custom_fields.updated_by = tasks.updated_by<br>``` |
| [users](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#users) | ```<br>custom_fields.organization_id = users.organizations<br>```<br><br>```<br>custom_fields.created_by = users.id<br>```<br><br>```<br>custom_fields.updated_by = users.id<br>``` |

custom\_fields table schema

| **choices**<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;. |
| --- |
| **created\_by**<br><br><br>STRING |
| **date\_created**<br><br><br>DATE-TIME |
| **date\_updated**<br><br><br>DATE-TIME |
| **editable\_with\_roles**<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 |
| **name**<br><br><br>STRING |
| **organization\_id**<br><br><br>STRING |
| **type**<br><br><br>STRING |
| **updated\_by**<br><br><br>STRING |

### event\_log

The `event_log` table contains info about events generated in your Close.io account. This could include creating a lead, sending an email, or deleting a note.

#### Historical data limitations

Due to how Close.io’s API functions, [only 30 days of historical data is available for this table](https://developer.close.io/#event-log) from the initial connection date.

Refer to the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#historical-event-log-data) for more info.

| **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)** | date\_updated |
| **Useful links** | [event_log schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/event_log.json "Opens in new tab: event_log schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#event-log-retrieve-a-list-of-events "Opens in new tab: Close.io API method") |

event\_log table foreign keys

| Join event\_log with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#activities) | ```<br>event_log.lead_id = activities.lead_id<br>```<br><br>```<br>event_log.organization_id = activities.organization_id<br>```<br><br>```<br>event_log.user_id = activities.created_by<br>```<br><br>```<br>event_log.user_id = activities.updated_by<br>```<br><br>```<br>event_log.user_id = activities.user_id<br>```<br><br>```<br>event_log.user_id = activities.task_assigned_to<br>```<br><br>```<br>event_log.user_id = activities.users<br>``` |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#leads) | ```<br>event_log.lead_id = leads.id<br>```<br><br>```<br>event_log.lead_id = leads.contacts.lead_id<br>```<br><br>```<br>event_log.lead_id = leads.opportunities.lead_id<br>```<br><br>```<br>event_log.lead_id = leads.tasks.lead_id<br>```<br><br>```<br>event_log.organization_id = leads.contacts.organization_id<br>```<br><br>```<br>event_log.organization_id = leads.opportunities.organization_id<br>```<br><br>```<br>event_log.organization_id = leads.organization_id<br>```<br><br>```<br>event_log.organization_id = leads.tasks.organization_id<br>```<br><br>```<br>event_log.user_id = leads.contacts.created_by<br>```<br><br>```<br>event_log.user_id = leads.contacts.updated_by<br>```<br><br>```<br>event_log.user_id = leads.created_by<br>```<br><br>```<br>event_log.user_id = leads.opportunities.created_by<br>```<br><br>```<br>event_log.user_id = leads.opportunities.updated_by<br>```<br><br>```<br>event_log.user_id = leads.opportunities.user_id<br>```<br><br>```<br>event_log.user_id = leads.tasks.assigned_to<br>```<br><br>```<br>event_log.user_id = leads.tasks.created_by<br>```<br><br>```<br>event_log.user_id = leads.tasks.updated_by<br>```<br><br>```<br>event_log.user_id = leads.updated_by<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#tasks) | ```<br>event_log.lead_id = tasks.lead_id<br>```<br><br>```<br>event_log.organization_id = tasks.organization_id<br>```<br><br>```<br>event_log.user_id = tasks.assigned_to<br>```<br><br>```<br>event_log.user_id = tasks.created_by<br>```<br><br>```<br>event_log.user_id = tasks.updated_by<br>``` |
| [custom_fields](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#custom-fields) | ```<br>event_log.organization_id = custom_fields.organization_id<br>```<br><br>```<br>event_log.user_id = custom_fields.created_by<br>```<br><br>```<br>event_log.user_id = custom_fields.updated_by<br>``` |
| [users](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#users) | ```<br>event_log.organization_id = users.organizations<br>```<br><br>```<br>event_log.user_id = users.id<br>``` |

event\_log table schema

| **action**<br><br><br>STRING |
| --- |
| **changed\_fields**<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;. |
| **data**<br><br><br>STRING |
| **date\_created**<br><br><br>DATE-TIME |
| **date\_updated**<br><br><br>DATE-TIME |
| **id**<br><br><br>STRING |
| **lead\_id**<br><br><br>STRING |
| **meta**<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 meta<br><br><table> <tr> <td> <p> <strong>								request_method							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								request_path							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **object\_id**<br><br><br>STRING |
| **object\_type**<br><br><br>STRING |
| **organization\_id**<br><br><br>STRING |
| **previous\_data**<br><br><br>STRING |
| **request\_id**<br><br><br>STRING |
| **user\_id**<br><br><br>STRING |

### leads

The `leads` table contains info about the leads in your Close.io account.

Leads represent a company or organization and may contain contacts, tasks, opportunities, and activities. In Close.io, a lead is synonymous with “account” in other CRMs.

| **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)** | date\_updated |
| **Useful links** | [leads schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/leads.json "Opens in new tab: leads schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#leads-list-or-search-for-leads "Opens in new tab: Close.io API method") |

leads table foreign keys

| Join leads with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#activities) | ```<br>leads.contacts.id = activities.contact_id<br>```<br><br>```<br>leads.opportunities.contact_id = activities.contact_id<br>```<br><br>```<br>leads.tasks.contact_id = activities.contact_id<br>```<br><br>```<br>leads.id = activities.lead_id<br>```<br><br>```<br>leads.contacts.lead_id = activities.lead_id<br>```<br><br>```<br>leads.opportunities.lead_id = activities.lead_id<br>```<br><br>```<br>leads.tasks.lead_id = activities.lead_id<br>```<br><br>```<br>leads.contacts.organization_id = activities.organization_id<br>```<br><br>```<br>leads.opportunities.organization_id = activities.organization_id<br>```<br><br>```<br>leads.organization_id = activities.organization_id<br>```<br><br>```<br>leads.tasks.organization_id = activities.organization_id<br>```<br><br>```<br>leads.tasks.id = activities.task_id<br>```<br><br>```<br>leads.contacts.created_by = activities.created_by<br>```<br><br>```<br>leads.contacts.updated_by = activities.created_by<br>```<br><br>```<br>leads.created_by = activities.created_by<br>```<br><br>```<br>leads.opportunities.created_by = activities.created_by<br>```<br><br>```<br>leads.opportunities.updated_by = activities.created_by<br>```<br><br>```<br>leads.opportunities.user_id = activities.created_by<br>```<br><br>```<br>leads.tasks.assigned_to = activities.created_by<br>```<br><br>```<br>leads.tasks.created_by = activities.created_by<br>```<br><br>```<br>leads.tasks.updated_by = activities.created_by<br>```<br><br>```<br>leads.updated_by = activities.created_by<br>```<br><br>```<br>leads.contacts.created_by = activities.updated_by<br>```<br><br>```<br>leads.contacts.updated_by = activities.updated_by<br>```<br><br>```<br>leads.created_by = activities.updated_by<br>```<br><br>```<br>leads.opportunities.created_by = activities.updated_by<br>```<br><br>```<br>leads.opportunities.updated_by = activities.updated_by<br>```<br><br>```<br>leads.opportunities.user_id = activities.updated_by<br>```<br><br>```<br>leads.tasks.assigned_to = activities.updated_by<br>```<br><br>```<br>leads.tasks.created_by = activities.updated_by<br>```<br><br>```<br>leads.tasks.updated_by = activities.updated_by<br>```<br><br>```<br>leads.updated_by = activities.updated_by<br>```<br><br>```<br>leads.contacts.created_by = activities.user_id<br>```<br><br>```<br>leads.contacts.updated_by = activities.user_id<br>```<br><br>```<br>leads.created_by = activities.user_id<br>```<br><br>```<br>leads.opportunities.created_by = activities.user_id<br>```<br><br>```<br>leads.opportunities.updated_by = activities.user_id<br>```<br><br>```<br>leads.opportunities.user_id = activities.user_id<br>```<br><br>```<br>leads.tasks.assigned_to = activities.user_id<br>```<br><br>```<br>leads.tasks.created_by = activities.user_id<br>```<br><br>```<br>leads.tasks.updated_by = activities.user_id<br>```<br><br>```<br>leads.updated_by = activities.user_id<br>```<br><br>```<br>leads.contacts.created_by = activities.task_assigned_to<br>```<br><br>```<br>leads.contacts.updated_by = activities.task_assigned_to<br>```<br><br>```<br>leads.created_by = activities.task_assigned_to<br>```<br><br>```<br>leads.opportunities.created_by = activities.task_assigned_to<br>```<br><br>```<br>leads.opportunities.updated_by = activities.task_assigned_to<br>```<br><br>```<br>leads.opportunities.user_id = activities.task_assigned_to<br>```<br><br>```<br>leads.tasks.assigned_to = activities.task_assigned_to<br>```<br><br>```<br>leads.tasks.created_by = activities.task_assigned_to<br>```<br><br>```<br>leads.tasks.updated_by = activities.task_assigned_to<br>```<br><br>```<br>leads.updated_by = activities.task_assigned_to<br>```<br><br>```<br>leads.contacts.created_by = activities.users<br>```<br><br>```<br>leads.contacts.updated_by = activities.users<br>```<br><br>```<br>leads.created_by = activities.users<br>```<br><br>```<br>leads.opportunities.created_by = activities.users<br>```<br><br>```<br>leads.opportunities.updated_by = activities.users<br>```<br><br>```<br>leads.opportunities.user_id = activities.users<br>```<br><br>```<br>leads.tasks.assigned_to = activities.users<br>```<br><br>```<br>leads.tasks.created_by = activities.users<br>```<br><br>```<br>leads.tasks.updated_by = activities.users<br>```<br><br>```<br>leads.updated_by = activities.users<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#tasks) | ```<br>leads.contacts.id = tasks.contact_id<br>```<br><br>```<br>leads.opportunities.contact_id = tasks.contact_id<br>```<br><br>```<br>leads.tasks.contact_id = tasks.contact_id<br>```<br><br>```<br>leads.id = tasks.lead_id<br>```<br><br>```<br>leads.contacts.lead_id = tasks.lead_id<br>```<br><br>```<br>leads.opportunities.lead_id = tasks.lead_id<br>```<br><br>```<br>leads.tasks.lead_id = tasks.lead_id<br>```<br><br>```<br>leads.contacts.organization_id = tasks.organization_id<br>```<br><br>```<br>leads.opportunities.organization_id = tasks.organization_id<br>```<br><br>```<br>leads.organization_id = tasks.organization_id<br>```<br><br>```<br>leads.tasks.organization_id = tasks.organization_id<br>```<br><br>```<br>leads.tasks.id = tasks.id<br>```<br><br>```<br>leads.contacts.created_by = tasks.assigned_to<br>```<br><br>```<br>leads.contacts.updated_by = tasks.assigned_to<br>```<br><br>```<br>leads.created_by = tasks.assigned_to<br>```<br><br>```<br>leads.opportunities.created_by = tasks.assigned_to<br>```<br><br>```<br>leads.opportunities.updated_by = tasks.assigned_to<br>```<br><br>```<br>leads.opportunities.user_id = tasks.assigned_to<br>```<br><br>```<br>leads.tasks.assigned_to = tasks.assigned_to<br>```<br><br>```<br>leads.tasks.created_by = tasks.assigned_to<br>```<br><br>```<br>leads.tasks.updated_by = tasks.assigned_to<br>```<br><br>```<br>leads.updated_by = tasks.assigned_to<br>```<br><br>```<br>leads.contacts.created_by = tasks.created_by<br>```<br><br>```<br>leads.contacts.updated_by = tasks.created_by<br>```<br><br>```<br>leads.created_by = tasks.created_by<br>```<br><br>```<br>leads.opportunities.created_by = tasks.created_by<br>```<br><br>```<br>leads.opportunities.updated_by = tasks.created_by<br>```<br><br>```<br>leads.opportunities.user_id = tasks.created_by<br>```<br><br>```<br>leads.tasks.assigned_to = tasks.created_by<br>```<br><br>```<br>leads.tasks.created_by = tasks.created_by<br>```<br><br>```<br>leads.tasks.updated_by = tasks.created_by<br>```<br><br>```<br>leads.updated_by = tasks.created_by<br>```<br><br>```<br>leads.contacts.created_by = tasks.updated_by<br>```<br><br>```<br>leads.contacts.updated_by = tasks.updated_by<br>```<br><br>```<br>leads.created_by = tasks.updated_by<br>```<br><br>```<br>leads.opportunities.created_by = tasks.updated_by<br>```<br><br>```<br>leads.opportunities.updated_by = tasks.updated_by<br>```<br><br>```<br>leads.opportunities.user_id = tasks.updated_by<br>```<br><br>```<br>leads.tasks.assigned_to = tasks.updated_by<br>```<br><br>```<br>leads.tasks.created_by = tasks.updated_by<br>```<br><br>```<br>leads.tasks.updated_by = tasks.updated_by<br>```<br><br>```<br>leads.updated_by = tasks.updated_by<br>``` |
| [event_log](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#event-log) | ```<br>leads.id = event_log.lead_id<br>```<br><br>```<br>leads.contacts.lead_id = event_log.lead_id<br>```<br><br>```<br>leads.opportunities.lead_id = event_log.lead_id<br>```<br><br>```<br>leads.tasks.lead_id = event_log.lead_id<br>```<br><br>```<br>leads.contacts.organization_id = event_log.organization_id<br>```<br><br>```<br>leads.opportunities.organization_id = event_log.organization_id<br>```<br><br>```<br>leads.organization_id = event_log.organization_id<br>```<br><br>```<br>leads.tasks.organization_id = event_log.organization_id<br>```<br><br>```<br>leads.contacts.created_by = event_log.user_id<br>```<br><br>```<br>leads.contacts.updated_by = event_log.user_id<br>```<br><br>```<br>leads.created_by = event_log.user_id<br>```<br><br>```<br>leads.opportunities.created_by = event_log.user_id<br>```<br><br>```<br>leads.opportunities.updated_by = event_log.user_id<br>```<br><br>```<br>leads.opportunities.user_id = event_log.user_id<br>```<br><br>```<br>leads.tasks.assigned_to = event_log.user_id<br>```<br><br>```<br>leads.tasks.created_by = event_log.user_id<br>```<br><br>```<br>leads.tasks.updated_by = event_log.user_id<br>```<br><br>```<br>leads.updated_by = event_log.user_id<br>``` |
| [custom_fields](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#custom-fields) | ```<br>leads.contacts.organization_id = custom_fields.organization_id<br>```<br><br>```<br>leads.opportunities.organization_id = custom_fields.organization_id<br>```<br><br>```<br>leads.organization_id = custom_fields.organization_id<br>```<br><br>```<br>leads.tasks.organization_id = custom_fields.organization_id<br>```<br><br>```<br>leads.contacts.created_by = custom_fields.created_by<br>```<br><br>```<br>leads.contacts.updated_by = custom_fields.created_by<br>```<br><br>```<br>leads.created_by = custom_fields.created_by<br>```<br><br>```<br>leads.opportunities.created_by = custom_fields.created_by<br>```<br><br>```<br>leads.opportunities.updated_by = custom_fields.created_by<br>```<br><br>```<br>leads.opportunities.user_id = custom_fields.created_by<br>```<br><br>```<br>leads.tasks.assigned_to = custom_fields.created_by<br>```<br><br>```<br>leads.tasks.created_by = custom_fields.created_by<br>```<br><br>```<br>leads.tasks.updated_by = custom_fields.created_by<br>```<br><br>```<br>leads.updated_by = custom_fields.created_by<br>```<br><br>```<br>leads.contacts.created_by = custom_fields.updated_by<br>```<br><br>```<br>leads.contacts.updated_by = custom_fields.updated_by<br>```<br><br>```<br>leads.created_by = custom_fields.updated_by<br>```<br><br>```<br>leads.opportunities.created_by = custom_fields.updated_by<br>```<br><br>```<br>leads.opportunities.updated_by = custom_fields.updated_by<br>```<br><br>```<br>leads.opportunities.user_id = custom_fields.updated_by<br>```<br><br>```<br>leads.tasks.assigned_to = custom_fields.updated_by<br>```<br><br>```<br>leads.tasks.created_by = custom_fields.updated_by<br>```<br><br>```<br>leads.tasks.updated_by = custom_fields.updated_by<br>```<br><br>```<br>leads.updated_by = custom_fields.updated_by<br>``` |
| [users](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#users) | ```<br>leads.contacts.organization_id = users.organizations<br>```<br><br>```<br>leads.opportunities.organization_id = users.organizations<br>```<br><br>```<br>leads.organization_id = users.organizations<br>```<br><br>```<br>leads.tasks.organization_id = users.organizations<br>```<br><br>```<br>leads.contacts.created_by = users.id<br>```<br><br>```<br>leads.contacts.updated_by = users.id<br>```<br><br>```<br>leads.created_by = users.id<br>```<br><br>```<br>leads.opportunities.created_by = users.id<br>```<br><br>```<br>leads.opportunities.updated_by = users.id<br>```<br><br>```<br>leads.opportunities.user_id = users.id<br>```<br><br>```<br>leads.tasks.assigned_to = users.id<br>```<br><br>```<br>leads.tasks.created_by = users.id<br>```<br><br>```<br>leads.tasks.updated_by = users.id<br>```<br><br>```<br>leads.updated_by = users.id<br>``` |

leads table schema

| **addresses**<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 addresses<br><br><table> <tr> <td> <p> <strong>								address_1							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								address_2							</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>								label							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								state							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								zipcode							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| --- |
| **contacts**<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 contacts<br><br><table> <tr> <td> <p> <strong>								created_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								date_created							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_updated							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								display_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								emails							</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> <div> <button>Click to expand emails</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								email							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</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>								integration_links							</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> <div> <button>Click to expand integration_links</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								lead_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								organization_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phones							</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> <div> <button>Click to expand phones</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								phone							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								phone_formatted							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								title							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								updated_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								urls							</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> <div> <button>Click to expand urls</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> </table> |
| **created\_by**<br><br><br>STRING |
| **created\_by\_name**<br><br><br>STRING |
| **custom\_fields**<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 custom\_fields<br><br><table> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							STRING, NUMBER, BOOLEAN, OBJECT, ARRAY																							</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> </td> </tr> </table> |
| **date\_created**<br><br><br>DATE-TIME |
| **date\_updated**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **display\_name**<br><br><br>STRING |
| **html\_url**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **integration\_links**<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 integration\_links<br><br><table> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **name**<br><br><br>STRING |
| **opportunities**<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 opportunities<br><br><table> <tr> <td> <p> <strong>								confidence							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								contact_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								contact_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								created_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								created_by_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								date_created							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_lost							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_updated							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_won							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								integration_links							</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> <div> <button>Click to expand integration_links</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								url							</strong> </p> <p>							STRING													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								lead_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								lead_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								note							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								organization_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								status_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								status_label							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								status_type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								updated_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								updated_by_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								user_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								user_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								value_currency							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value_formatted							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								value_period							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **organization\_id**<br><br><br>STRING |
| **status\_id**<br><br><br>STRING |
| **status\_label**<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;.<br><br>Click to expand tasks<br><br><table> <tr> <td> <p> <strong>								_type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								assigned_to							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								assigned_to_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								contact_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								contact_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								created_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								created_by_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								date							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_created							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								date_updated							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								due_date							</strong> </p> <p>							DATE-TIME													</p> </td> </tr> <tr> <td> <p> <strong>								id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								is_complete							</strong> </p> <p>							INTEGER, BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								is_dateless							</strong> </p> <p>							INTEGER, BOOLEAN													</p> </td> </tr> <tr> <td> <p> <strong>								lead_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								lead_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								object_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								object_type							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								organization_id							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								text							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								updated_by							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								updated_by_name							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								view							</strong> </p> <p>							STRING													</p> </td> </tr> </table> |
| **updated\_by**<br><br><br>STRING |
| **updated\_by\_name**<br><br><br>STRING |
| **url**<br><br><br>STRING |

### tasks

The `tasks` table contains info about the tasks in your Close.io account. Tasks are action items with a given date that are assigned to a sales rep.

| **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)** | date\_updated |
| **Useful links** | [tasks schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/tasks.json "Opens in new tab: tasks schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#tasks-list-or-filter-tasks "Opens in new tab: Close.io API method") |

tasks table foreign keys

| Join tasks with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#activities) | ```<br>tasks.contact_id = activities.contact_id<br>```<br><br>```<br>tasks.lead_id = activities.lead_id<br>```<br><br>```<br>tasks.organization_id = activities.organization_id<br>```<br><br>```<br>tasks.id = activities.task_id<br>```<br><br>```<br>tasks.assigned_to = activities.created_by<br>```<br><br>```<br>tasks.created_by = activities.created_by<br>```<br><br>```<br>tasks.updated_by = activities.created_by<br>```<br><br>```<br>tasks.assigned_to = activities.updated_by<br>```<br><br>```<br>tasks.created_by = activities.updated_by<br>```<br><br>```<br>tasks.updated_by = activities.updated_by<br>```<br><br>```<br>tasks.assigned_to = activities.user_id<br>```<br><br>```<br>tasks.created_by = activities.user_id<br>```<br><br>```<br>tasks.updated_by = activities.user_id<br>```<br><br>```<br>tasks.assigned_to = activities.task_assigned_to<br>```<br><br>```<br>tasks.created_by = activities.task_assigned_to<br>```<br><br>```<br>tasks.updated_by = activities.task_assigned_to<br>```<br><br>```<br>tasks.assigned_to = activities.users<br>```<br><br>```<br>tasks.created_by = activities.users<br>```<br><br>```<br>tasks.updated_by = activities.users<br>``` |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#leads) | ```<br>tasks.contact_id = leads.contacts.id<br>```<br><br>```<br>tasks.contact_id = leads.opportunities.contact_id<br>```<br><br>```<br>tasks.contact_id = leads.tasks.contact_id<br>```<br><br>```<br>tasks.lead_id = leads.id<br>```<br><br>```<br>tasks.lead_id = leads.contacts.lead_id<br>```<br><br>```<br>tasks.lead_id = leads.opportunities.lead_id<br>```<br><br>```<br>tasks.lead_id = leads.tasks.lead_id<br>```<br><br>```<br>tasks.organization_id = leads.contacts.organization_id<br>```<br><br>```<br>tasks.organization_id = leads.opportunities.organization_id<br>```<br><br>```<br>tasks.organization_id = leads.organization_id<br>```<br><br>```<br>tasks.organization_id = leads.tasks.organization_id<br>```<br><br>```<br>tasks.id = leads.tasks.id<br>```<br><br>```<br>tasks.assigned_to = leads.contacts.created_by<br>```<br><br>```<br>tasks.created_by = leads.contacts.created_by<br>```<br><br>```<br>tasks.updated_by = leads.contacts.created_by<br>```<br><br>```<br>tasks.assigned_to = leads.contacts.updated_by<br>```<br><br>```<br>tasks.created_by = leads.contacts.updated_by<br>```<br><br>```<br>tasks.updated_by = leads.contacts.updated_by<br>```<br><br>```<br>tasks.assigned_to = leads.created_by<br>```<br><br>```<br>tasks.created_by = leads.created_by<br>```<br><br>```<br>tasks.updated_by = leads.created_by<br>```<br><br>```<br>tasks.assigned_to = leads.opportunities.created_by<br>```<br><br>```<br>tasks.created_by = leads.opportunities.created_by<br>```<br><br>```<br>tasks.updated_by = leads.opportunities.created_by<br>```<br><br>```<br>tasks.assigned_to = leads.opportunities.updated_by<br>```<br><br>```<br>tasks.created_by = leads.opportunities.updated_by<br>```<br><br>```<br>tasks.updated_by = leads.opportunities.updated_by<br>```<br><br>```<br>tasks.assigned_to = leads.opportunities.user_id<br>```<br><br>```<br>tasks.created_by = leads.opportunities.user_id<br>```<br><br>```<br>tasks.updated_by = leads.opportunities.user_id<br>```<br><br>```<br>tasks.assigned_to = leads.tasks.assigned_to<br>```<br><br>```<br>tasks.created_by = leads.tasks.assigned_to<br>```<br><br>```<br>tasks.updated_by = leads.tasks.assigned_to<br>```<br><br>```<br>tasks.assigned_to = leads.tasks.created_by<br>```<br><br>```<br>tasks.created_by = leads.tasks.created_by<br>```<br><br>```<br>tasks.updated_by = leads.tasks.created_by<br>```<br><br>```<br>tasks.assigned_to = leads.tasks.updated_by<br>```<br><br>```<br>tasks.created_by = leads.tasks.updated_by<br>```<br><br>```<br>tasks.updated_by = leads.tasks.updated_by<br>```<br><br>```<br>tasks.assigned_to = leads.updated_by<br>```<br><br>```<br>tasks.created_by = leads.updated_by<br>```<br><br>```<br>tasks.updated_by = leads.updated_by<br>``` |
| [event_log](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#event-log) | ```<br>tasks.lead_id = event_log.lead_id<br>```<br><br>```<br>tasks.organization_id = event_log.organization_id<br>```<br><br>```<br>tasks.assigned_to = event_log.user_id<br>```<br><br>```<br>tasks.created_by = event_log.user_id<br>```<br><br>```<br>tasks.updated_by = event_log.user_id<br>``` |
| [custom_fields](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#custom-fields) | ```<br>tasks.organization_id = custom_fields.organization_id<br>```<br><br>```<br>tasks.assigned_to = custom_fields.created_by<br>```<br><br>```<br>tasks.created_by = custom_fields.created_by<br>```<br><br>```<br>tasks.updated_by = custom_fields.created_by<br>```<br><br>```<br>tasks.assigned_to = custom_fields.updated_by<br>```<br><br>```<br>tasks.created_by = custom_fields.updated_by<br>```<br><br>```<br>tasks.updated_by = custom_fields.updated_by<br>``` |
| [users](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#users) | ```<br>tasks.organization_id = users.organizations<br>```<br><br>```<br>tasks.assigned_to = users.id<br>```<br><br>```<br>tasks.created_by = users.id<br>```<br><br>```<br>tasks.updated_by = users.id<br>``` |

tasks table schema

| **\_type**<br><br><br>STRING |
| --- |
| **assigned\_to**<br><br><br>STRING |
| **assigned\_to\_name**<br><br><br>STRING |
| **body\_preview**<br><br><br>STRING |
| **contact\_id**<br><br><br>STRING |
| **contact\_name**<br><br><br>STRING |
| **created\_by**<br><br><br>STRING |
| **created\_by\_name**<br><br><br>STRING |
| **date**<br><br><br>DATE-TIME |
| **date\_created**<br><br><br>DATE-TIME |
| **date\_updated**<br><br><br>DATE-TIME |
| **due\_date**<br><br><br>DATE-TIME |
| **email\_id**<br><br><br>STRING |
| **emails**<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 |
| **is\_complete**<br><br><br>BOOLEAN |
| **is\_dateless**<br><br><br>BOOLEAN |
| **lead\_id**<br><br><br>STRING |
| **lead\_name**<br><br><br>STRING |
| **local\_phone**<br><br><br>STRING |
| **object\_id**<br><br><br>STRING |
| **object\_type**<br><br><br>STRING |
| **opportunity\_note**<br><br><br>STRING |
| **opportunity\_value**<br><br><br>INTEGER |
| **opportunity\_value\_currency**<br><br><br>STRING |
| **opportunity\_value\_formatted**<br><br><br>STRING |
| **opportunity\_value\_period**<br><br><br>STRING |
| **organization\_id**<br><br><br>STRING |
| **phone**<br><br><br>STRING |
| **phone\_formatted**<br><br><br>STRING |
| **phone\_number\_description**<br><br><br>STRING |
| **recording\_url**<br><br><br>STRING |
| **remote\_phone**<br><br><br>STRING |
| **remote\_phone\_description**<br><br><br>STRING |
| **remote\_phone\_formatted**<br><br><br>STRING |
| **subject**<br><br><br>STRING |
| **text**<br><br><br>STRING |
| **updated\_by**<br><br><br>STRING |
| **updated\_by\_name**<br><br><br>STRING |
| **view**<br><br><br>STRING |
| **voicemail\_duration**<br><br><br>INTEGER |
| **voicemail\_url**<br><br><br>STRING |

### users

The `users` table contains info about the users in your Close.io account.

In Close.io, users are typically your co-workers and sales reps, or those inside your company.

| **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)** | date\_updated |
| **Useful links** | [users schema on GitHub](https://github.com/singer-io/tap-closeio/blob/master/tap_closeio/schemas/users.json "Opens in new tab: users schema on GitHub")<br><br><br>[Close.io API method](https://developer.close.io/#users-list-all-the-users-who-are-members-of-the-same-organizations-as-you-are "Opens in new tab: Close.io API method") |

users table foreign keys

| Join users with | on |
| --- | --- |
| [activities](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#activities) | ```<br>users.organizations = activities.organization_id<br>```<br><br>```<br>users.id = activities.created_by<br>```<br><br>```<br>users.id = activities.updated_by<br>```<br><br>```<br>users.id = activities.user_id<br>```<br><br>```<br>users.id = activities.task_assigned_to<br>```<br><br>```<br>users.id = activities.users<br>``` |
| [custom_fields](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#custom-fields) | ```<br>users.organizations = custom_fields.organization_id<br>```<br><br>```<br>users.id = custom_fields.created_by<br>```<br><br>```<br>users.id = custom_fields.updated_by<br>``` |
| [event_log](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#event-log) | ```<br>users.organizations = event_log.organization_id<br>```<br><br>```<br>users.id = event_log.user_id<br>``` |
| [leads](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#leads) | ```<br>users.organizations = leads.contacts.organization_id<br>```<br><br>```<br>users.organizations = leads.opportunities.organization_id<br>```<br><br>```<br>users.organizations = leads.organization_id<br>```<br><br>```<br>users.organizations = leads.tasks.organization_id<br>```<br><br>```<br>users.id = leads.contacts.created_by<br>```<br><br>```<br>users.id = leads.contacts.updated_by<br>```<br><br>```<br>users.id = leads.created_by<br>```<br><br>```<br>users.id = leads.opportunities.created_by<br>```<br><br>```<br>users.id = leads.opportunities.updated_by<br>```<br><br>```<br>users.id = leads.opportunities.user_id<br>```<br><br>```<br>users.id = leads.tasks.assigned_to<br>```<br><br>```<br>users.id = leads.tasks.created_by<br>```<br><br>```<br>users.id = leads.tasks.updated_by<br>```<br><br>```<br>users.id = leads.updated_by<br>``` |
| [tasks](https://help.qlik.com/en-US/stitch/integrations/saas/closeio#tasks) | ```<br>users.organizations = tasks.organization_id<br>```<br><br>```<br>users.id = tasks.assigned_to<br>```<br><br>```<br>users.id = tasks.created_by<br>```<br><br>```<br>users.id = tasks.updated_by<br>``` |

users table schema

| **date\_created**<br><br><br>DATE-TIME |
| --- |
| **date\_updated**<br><br><br>DATE-TIME |
| **email**<br><br><br>STRING |
| **first\_name**<br><br><br>STRING |
| **id**<br><br><br>STRING |
| **image**<br><br><br>STRING |
| **last\_name**<br><br><br>STRING |
| **last\_used\_timezone**<br><br><br>STRING |
| **organizations**<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;. |