# Capsule CRM

### Snapshot

| Features                        | Details                                          |
| ------------------------------- | ------------------------------------------------ |
| Release Status                  | Released                                         |
| Source API Version              | 2.0                                              |
| Table Selection                 | Yes                                              |
| Column Selection                | Yes                                              |
| Edit Integration                | Yes                                              |
| Replication Type Selection      | No                                               |
| Authentication Parameters       | <p>capsulecrm email<br>capsulecrm password</p>   |
| Replication Type                | <p>Full Replication<br>Key based replication</p> |
| Replication Key                 | <p>NA<br>lastRunDate</p>                         |
| Suggested Replication Frequency | 24 hrs                                           |

| Tables/APIs Supported |                      |
| --------------------- | -------------------- |
| Parties               | Cases                |
| Opportunities         | DeletedOpportunities |
| DeletedParties        | DeletedCases         |
| Entries               | Employees            |
| TrackDefinitions      | Teams                |
| Users                 | Tasks                |
| Tracks                | CustomFields         |
| TagDefinitions        | LostReasons          |
| Milestones            | TaskCategories       |
| ActivityTypes         | Countries            |
| Currencies            | RestHooks            |

### Integrate capsulecrm with Daton

1. Signin to Daton&#x20;
2. Select capsule from Integrations page
3. Provide Integration Name Replication Frequency and History. Integration name would be used in creating tables for the integration and cannot be changed later&#x20;
4. Provide your capsulecrm email and password to authorize Daton to periodically extract data capsule.
5. Post successful authentication you will be prompted to choose from the list of available tables
6. Then select all required fields for each table
7. Submit the integration

### Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

### Capsulecrm Data

**Parties**

Purpose: The collection of Parties on the Capsule account.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/listParties>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| id             | NUMERIC         |
| owner          | RECORD          |
| team           | NUMERIC         |
| type           | STRING          |
| tags           | RECORD          |
| about          | STRING          |
| title          | STRING          |
| firstname      | STRING          |
| lastname       | STRING          |
| jobTitle       | STRING          |
| createdAt      | TIMESTAMP       |
| updateAt       | TIMESTAMP       |
| organisation   | STRING          |
| lastContactAt  | STRING          |
| pictureURL     | STRING          |
| addresses      | RECORD          |
| phoneNumbers   | RECORD          |
| emailAddresses | RECORD          |
| wbesites       | RECORD          |
| fields         | RECORD          |

**Cases**

Purpose: <https://developer.capsulecrm.com/v2/operations/Case#listCases>.

Source API Documentation  <https://developer.capsulecrm.com>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name          | Target Datatype |
| ------------- | --------------- |
| id            | NUMERIC         |
| owner         | RECORD          |
| team          | NUMERIC         |
| party         | RECORD          |
| status        | STRING          |
| tags          | RECORD          |
| opportunity   | RECORD          |
| name          | STRING          |
| description   | STRING          |
| createdAt     | TIMESTAMP       |
| updateAt      | TIMESTAMP       |
| closedOn      | DATE            |
| lastContactAt | STRING          |
| fields        | RECORD          |

**Opportunities**

Purpose: The collection of Opportunities on the Capsule account.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Opportunity#listOpportunities>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name               | Target Datatype |
| ------------------ | --------------- |
| id                 | NUMERIC         |
| owner              | RECORD          |
| team               | NUMERIC         |
| lastStageChangedAt | TIMESTAMP       |
| party              | RECORD          |
| name               | STRING          |
| updateAt           | TIMESTAMP       |
| lastContactAt      | STRING          |
| tags               | RECORD          |
| createdAt          | TIMESTAMP       |
| updateAt           | TIMESTAMP       |
| loastReason        | STRING          |
| milestone          | RECORD          |
| lastOpenMilestone  | RECORD          |
| value              | RECORD          |
| closedOn           | DATE            |
| expectedClosedOn   | DATE            |
| description        | STRING          |
| probability        | NUMERIC         |
| durationBasis      | STRING          |
| duration           | STRING          |
| pictureURL         | STRING          |
| addresses          | RECORD          |
| phoneNumbers       | RECORD          |
| emailAddresses     | RECORD          |
| wbesites           | RECORD          |
| fields             | RECORD          |

**DeletedOpportunities**

Purpose: A collection of opportunities that have been deleted from Capsule since the date specified in the since parameter.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Party#listDeletedParties>

Replication: Key-Based Replication

Replication Key: lastRunDate

**DeletedParties**

Purpose: A collection of parties that have been deleted from Capsule since the date specified in the since parameter.

Source API Documentation  <https://developer.capsulecrm.com>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name              | Target Datatype |
| ----------------- | --------------- |
| id                | NUMERIC         |
| deletedAt         | TIMESTAMP       |
| restrictedParties | RECORD          |

**DeletedCases**

Purpose: A collection of cases that have been deleted from Capsule since the date specified in the since parameter.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Case#listDeletedCases>

eplication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name              | Target Datatype |
| ----------------- | --------------- |
| id                | NUMERIC         |
| deletedAt         | TIMESTAMP       |
| restrictedParties | RECORD          |

**Entries**

Purpose: List notes, emails and completed tasks for parties, kases and opportunities.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Entry#listEntriesForEntity>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| id             | NUMERIC         |
| type           | STRING          |
| creator        | RECORD          |
| team           | NUMERIC         |
| attachments    | RECORD          |
| activityType   | RECORD          |
| about          | STRING          |
| title          | STRING          |
| firstname      | STRING          |
| lastname       | STRING          |
| jobTitle       | STRING          |
| createdAt      | TIMESTAMP       |
| updateAt       | TIMESTAMP       |
| organisation   | RECORD          |
| content        | STRING          |
| entryAt        | TIMESTAMP       |
| party          | RECORD          |
| Opportunity    | RECORD          |
| kase           | STRING          |
| addresses      | RECORD          |
| phoneNumbers   | RECORD          |
| emailAddresses | RECORD          |
| wbesites       | RECORD          |

**Employees**

Purpose: The collection of employees linked to this organisation.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Party#listEmployees>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| id             | NUMERIC         |
| owner          | RECORD          |
| team           | NUMERIC         |
| type           | STRING          |
| tags           | RECORD          |
| about          | STRING          |
| title          | STRING          |
| firstname      | STRING          |
| lastname       | STRING          |
| jobTitle       | STRING          |
| createdAt      | TIMESTAMP       |
| updateAt       | TIMESTAMP       |
| organisation   | STRING          |
| lastContactAt  | STRING          |
| pictureURL     | STRING          |
| addresses      | RECORD          |
| phoneNumbers   | RECORD          |
| emailAddresses | RECORD          |
| wbesites       | RECORD          |
| fields         | RECORD          |

**TrackDefinitions**

Purpose: List track definitions with the option to filter for only the track definitions for cases or opportunities.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Track#listTrackDefinitions>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name            | Target Datatype |
| --------------- | --------------- |
| id              | NUMERIC         |
| tag             | STRING          |
| captureRule     | STRING          |
| createdAt       | TIMESTAMP       |
| updateAt        | TIMESTAMP       |
| description     | STRING          |
| direction       | STRING          |
| trackDateOn     | STRING          |
| taskDefinitions | RECORD          |

**Teams**

Purpose: List all the teams on this Capsule account.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/Team#listTeams>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| id          | NUMERIC         |
| name        | STRING          |
| description | STRING          |
| memberships | RECORD          |
| createdAt   | TIMESTAMP       |
| updateAt    | TIMESTAMP       |

**Users**

Purpose: List all the users on this Capsule account.

Source API Documentation  <https://developer.capsulecrm.com/v2/operations/User#listUsers>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                 | Target Datatype |
| -------------------- | --------------- |
| id                   | STRING          |
| locale               | STRING          |
| currency             | STRING          |
| status               | STRING          |
| emailPredrence       | STRING          |
| clickToCallPrefrence | STRING          |
| party                | RECORD          |
| username             | STRING          |
| timezone             | STRING          |
| lastLoginAt          | STRING          |
| loggedIn             | TIMESTAMP       |
| name                 | STRING          |
| pictureURL           | STRING          |
| taskRemainder        | TIMESTAMP       |

**Tasks**

Purpose: The collection of Tasks on the Capsule account. By default the body will contain only the open tasks.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Task#listTasks>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                  | Target Datatype |
| --------------------- | --------------- |
| id                    | NUMERIC         |
| category              | RECORD          |
| description           | STRING          |
| status                | STRING          |
| detail                | STRING          |
| party                 | RECORD          |
| opportunity           | RECORD          |
| owner                 | RECORD          |
| daysAfter             | NUMERIC         |
| taskDelayRule         | STRING          |
| nextTask              | STRING          |
| active                | BOOLEAN         |
| dueOn                 | DATE            |
| completedBy           | TIMESTAMP       |
| completedAt           | STRING          |
| kase                  | RECORD          |
| hasTrack              | BOOLEAN         |
| repeat                | RECORD          |
| overrideToCirrentUser | STRING          |
| addresses             | RECORD          |
| phoneNumbers          | RECORD          |
| emailAddresses        | RECORD          |
| wbesites              | RECORD          |

**Tracks**

Purpose: List track definitions with the option to filter for only the track definitions for cases or opportunities.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Track#listTrack>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| id          | NUMERIC         |
| tasks       | RECORD          |
| description | STRING          |
| trackDateOn | DATE            |
| direction   | STRING          |

**CustomFields**

Purpose: The collection of all custom fields on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Custom_Field#listFields>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name         | Target Datatype |
| ------------ | --------------- |
| id           | NUMERIC         |
| name         | STRING          |
| description  | STRING          |
| type         | STRING          |
| displayOrder | NUMERIC         |
| tag          | RECORD          |
| captureRule  | STRING          |
| options      | STRING          |

**TagDefinitions**

Purpose: The collection of all of the tags on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Tag#listTags>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| id          | NUMERIC         |
| name        | STRING          |
| description | STRING          |
| dataTag     | BOOLEAN         |

**LostReasons**

Purpose: The collection of all the lost reasons on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Lost_Reason#listLostReasons>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                | Target Datatype |
| ------------------- | --------------- |
| id                  | NUMERIC         |
| name                | STRING          |
| includeForCoversion | BOOLEAN         |
| createdAt           | TIMESTAMP       |
| updateAt            | TIMESTAMP       |

**Milestones**

Purpose: The collection of all the milestones on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Milestone#listMilestones>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name           | Target Datatype |
| -------------- | --------------- |
| id             | NUMERIC         |
| name           | STRING          |
| description    | STRING          |
| complete       | BOOLEAN         |
| probability    | NUMERIC         |
| pipeline       | STRING          |
| daysUntilState | NUMERIC         |
| createdAt      | TIMESTAMP       |
| updateAt       | TIMESTAMP       |

**TaskCategories**

Purpose:The collection of all the task categories on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Category#listCategories>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name   | Target Datatype |
| ------ | --------------- |
| id     | NUMERIC         |
| name   | STRING          |
| colour | STRING          |

**ActivityTypes**

Purpose: The collection of all the activity types on this Capsule account.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Activity_Type#listActivityTypes>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name                | Target Datatype |
| ------------------- | --------------- |
| id                  | NUMERIC         |
| name                | STRING          |
| icon                | RECORD          |
| updateLastContacted | BOOLEAN         |

**Countries**

Purpose: Collection of country names available in Capsule; useful for populating the country field of the party's address. These are the same for all Capsule accounts.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Internationalization#listCountries>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| alpha2Code  | STRING          |
| alpha3Code  | STRING          |
| numericCode | NUMERIC         |
| name        | STRING          |

**Currencies**

Purpose: Collection of ISO currency code options available in Capsule; useful for populating and displaying the opportunities' value. These are the same for all Capsule accounts.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/Internationalization#listCurrencies>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Target Datatype |
| ---------- | --------------- |
| code       | STRING          |
| symbol     | STRING          |
| name       | STRING          |
| pluralName | STRING          |

**RestHooks**

Purpose: REST Hooks allow you to subscribe to certain events in Capsule.

Source-Api documentation: <https://developer.capsulecrm.com/v2/operations/REST_Hook#listRestHooks>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name      | Target Datatype |
| --------- | --------------- |
| id        | NUMERIC         |
| event     | STRING          |
| targetUrl | STRING          |
| embed     | STRING          |
| batched   | BOOLEAN         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/saas-integrations/capsule-crm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
