# Desk

Information note **Desk extraction is supported by Stitch**   
This integration is certified by Stitch. For support, contact [Support](https://community.qlik.com/t5/Support/ct-p/qlikSupport).

## Desk integration summary

Stitch’s Desk integration replicates data using the [Desk API](http://dev.desk.com/API/using-the-api/#general). Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/desk#schema) section for a list of objects available for replication.

## Desk feature snapshot

A high-level look at Stitch's Desk (v15-10-2015) 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 October 15, 2015 | **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 Remove icon<br><br>This version of the integration isn't available via the API.<br><br><br>Not available |
| **Singer GitHub repository** | Not applicable |  |  |
| **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 Remove icon<br><br>Advanced Scheduling is not supported for this integration.<br><br><br>Unsupported |
| **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 Desk

### Step 1: Adding Stitch as an app in your Desk account

1. Sign into your Desk account.
2. Navigate to the **Admin panel** by clicking the link in the upper left section of the Agent interface.
3. In the Admin panel, click the **Settings** option in the menu at the top of the window.
4. When the Settings page displays, click the **API** option in the menu that appears on the left side of the window.
5. Click the **+Add API Application** button.
6. After clicking the button, a window will display. This is where the initial parameters for the API application are set. Complete the fields as follows:
   * **Name:** `Stitch`
   * **Website URL:** `https://www.stitchdata.com`
   * **Callback URL:** `https://www.stitchdata.com`
   * **Support URL:** `https://www.stitchdata.com`
7. When finished, click the **Add** button.

### Step 2: Retrieve your Desk key and secret

1. After the URL parameters have been successfully submitted, a screen detailing the parameters, key, and secret will display.
2. Copy the **Key and Secret** into a text file - you’ll need easy access to them to complete the setup.

### Step 3: Retrieve your Desk token and token secret

1. Click the **Your Access Token** link on the right side of the **API Application** page. A window containing your Token and Token Secret will display.
2. Copy the **Token and Token Secret** into the text file that contains your Key and Secret. Be careful not to mix up the Secret and Token Secret or you’ll encounter errors when saving the integration in Stitch.

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

5. In the **Site URL** field, enter your Desk.com website address. For example: `https://stitch.desk.com`

6. Enter your **Key, Secret, Token, and Token Secret** into their respective fields.

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

The Sync Historical Data setting defines the starting date for your Desk integration. This means that:

* For tables using **Key-based Incremental Replication**, data **equal to or newer than this date** will be replicated to your destination.
* For tables using **Full Table Replication**, all data - including records that are older, equal to, or newer than this date - will be replicated to your destination.

Change this setting if you want to replicate data beyond Desk’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 6: 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.

Desk 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)

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 Desk, 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.

## Desk 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 15-10-2015** of this integration.

This is the latest version of the Desk integration.

customers Replication Method: Key-based Incremental Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key. Primary Key: id Contains Nested Structures?: Yes If your destination doesn't natively support nested structures, Stitch will de-nest them and create subtables. See Table Info for details. The customers table contains about the end-users in your Desk account. Table Info & Attributes

### customers & Nested Structures

**This table contains nested structures.** If you use a data warehouse that doesn't natively support nested structures, some of the attributes listed below may be in a subtable.  
  
These items are marked with a `*`

In addition to the fields listed below, our Desk integration will also include any custom fields.

### customers Attributes

While we try to include everything Desk has here, **this may not be a full list of attributes.** Refer to [Desk's documentation](http://dev.desk.com/API/customers/#fields) for a full list and description of each attribute.

* Customer ID (`id`)

* first\_name

* last\_name

* company

* title

* avatar

* uid

* background

* language

* locked\_until

* created\_at

* updated\_at

* emails`*`

* phone numbers`*`

* addresses`*`

* access\_private\_portal

* access\_company\_cases

#### replies

**Replication Method:** Key-based Incremental

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `case_id:reply_id`   
**Contains Nested Structures?:** No

The `replies` table contains the individual replies in cases.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/saas/desk#replies-data)

Depending on the configuration of your Desk account, you may see more fields in this table than what’s listed here. For example: Tweet fields.

### replies Attributes

While we try to include everything Desk has here, **this may not be a full list of attributes.** Refer to [Desk's documentation](http://dev.desk.com/API/replies/#fields) for a full list and description of each attribute.

* Case ID

* Reply ID

* subject

* body

* direction (in vs. out)

* status

* to

* from

* cc

* bcc

* client\_type

* suppress\_rules

* sent\_by

* sent\_at

* created\_at

* updated\_at

#### users

**Replication Method:** Full Table

Full Table Replication is a replication method in which all rows in a table - including new, updated, and existing - are replicated during every replication job.

  
**Primary Key:** `id`   
**Contains Nested Structures?:** No

The `users` table contains about the internal users of your Desk account.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/saas/desk#users-data)

### users Attributes

While we try to include everything Desk has here, **this may not be a full list of attributes.** Refer to [Desk's documentation](http://dev.desk.com/API/users/#fields) for a full list and description of each attribute.

* User ID (`id`)

* name

* public\_name

* email

* email\_verified

* avatar

* level

* current\_login\_at

* last\_login\_at

* created\_at

* updated\_at

#### user\_groups

**Replication Method:** Full Table

Full Table Replication is a replication method in which all rows in a table - including new, updated, and existing - are replicated during every replication job.

  
**Primary Key:** `user_id:id`   
**Contains Nested Structures?:** No

The `user_groups` table contains the groups your internal users belong to.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/saas/desk#user_groups-data)

### user\_groups Attributes

While we try to include everything Desk has here, **this may not be a full list of attributes.** Refer to [Desk's documentation](http://dev.desk.com/API/users/) for a full list and description of each attribute.

* Group ID (`id`)

* User ID (`user_id`)

* Group Name

#### cases

**Replication Method:** Key-based Incremental

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `id`   
**Contains Nested Structures?:** Yes

If your destination doesn't natively support nested structures, Stitch will de-nest them and create subtables. See Table Info for details.

The `cases` table contains about the support cases in your Desk account.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/saas/desk#cases-data)

### cases & Nested Structures

**This table contains nested structures.** If you use a data warehouse that doesn't natively support nested structures, some of the attributes listed below may be in a subtable.  
  
These items are marked with a `*`

In addition to the fields listed below, our Desk integration will also include any custom fields.

### cases Attributes

While we try to include everything Desk has here, **this may not be a full list of attributes.** Refer to [Desk's documentation](http://dev.desk.com/API/cases/#fields) for a full list and description of each attribute.

* Case ID (`id`)

* external\_id

* blurb

* subject

* priority

* description

* status

* type

* labels`*`

* locked\_until

* changed\_at

* active\_at

* language

* suppress\_rules

* received\_at

* first\_opened\_at

* last\_opened\_at

* first\_resolved\_at

* resolved\_at

* created\_at

* updated\_at