# HubSpot

### Snapshot

| Features                        | Details                                                     |
| ------------------------------- | ----------------------------------------------------------- |
| Release Status                  | Released                                                    |
| Source API Version              | v2                                                          |
| Table Selection                 | Yes                                                         |
| Column Selection                | Yes                                                         |
| Edit Integration                | Yes                                                         |
| Replication Type Selection      | No                                                          |
| Authentication Parameters       | <p>Hubspot apikey<br>Hubspot account email and password</p> |
| Replication Type                | <p>Full Replication<br>Key Based Replication</p>            |
| Replication Key                 | Date                                                        |
| Suggested Replication Frequency | 24 hrs                                                      |

| Tables/APIs Supported |           |
| --------------------- | --------- |
| Contacts              | Companies |
| Tickets               | Deals     |
| Products              |           |

### Integrate Hubspot with Daton

1. Signin to Daton&#x20;
2. Select hubspot 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.
4. provide your hubspot apikey.&#x20;
5. Then provide your hubspot account email and Password,it shows up all the users you have. Select the user to authorize Daton to periodically extract data from hubspot.
6. Post successful authentication, you will be prompted to choose from the list of available tables
7. Then select all required fields for each table
8. 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

### HUBSPOT Data

**Contacts**

Purpose:For a given account, return all contacts that have been created in the account.

Source API Documentation  <https://developers.hubspot.com/docs/methods/contacts/get_contacts>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name              | Target Datatype |
| ----------------- | --------------- |
| addedAt           | INTEGER         |
| vid               | INTEGER         |
| canonical-vid     | INTEGER         |
| merged-vids       | RECORD          |
| portal-id         | NUMERIC         |
| is-contact        | BOOLEAN         |
| profile-token     | STRING          |
| profile-url       | STRING          |
| properties        | RECORD          |
| identity-profiles | RECORD          |

**Companies**

Purpose:Used to get all of the companies in a account. Returns a paginated list of companies

Source API Documentation  <https://developers.hubspot.com/docs/methods/companies/get-all-companies>

Replication: Key-Based Replication

Replication Key: lastRunDate

**Fields**

| Name       | Target Datatype |
| ---------- | --------------- |
| portalId   | NUMERIC         |
| companyId  | NUMERIC         |
| isDeleted  | BOOLEAN         |
| properties | RECORD          |

**Deals**

Purpose:Get all of the deals in an account. Returns a paginated set of deals.

Source API Documentation  <https://developers.hubspot.com/docs/methods/deals/get-all-deals>

Replication: Key-Based Replication

Replication Key: properties

**Fields**

| Name         | Target Datatype |
| ------------ | --------------- |
| portalId     | NUMERIC         |
| dealId       | NUMERIC         |
| isDeleted    | BOOLEAN         |
| associations | RECORD          |
| properties   | RECORD          |

**Tickets**

Purpose:Get all tickets from a portal, up to 100 per request.

Source API Documentation  <https://developers.hubspot.com/docs/methods/tickets/get-all-tickets>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Target Datatype |
| ---------- | --------------- |
| objectType | STRING          |
| portalId   | NUMERIC         |
| objectId   | NUMERIC         |
| properties | RECORD          |
| isDeleted  | BOOLEAN         |

**Products**

Purpose:Get all of the products in an account. Returns a paginated set of deals.

Source API Documentation  <https://developers.hubspot.com/docs/methods/deals/get-all-products>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Target Datatype |
| ---------- | --------------- |
| objectType | STRING          |
| portalId   | INTEGER         |
| objectId   | INTEGER         |
| properties | RECORD          |
| isDeleted  | 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/hubspot.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.
