# Hubspot

## Video Demo

We have created a [brief product overview here](https://www.youtube.com/watch?v=ZH6K-jDcMBA) that shows how to setup a sync to HubSpot.

## Object Types

Hightouch can both create and update standard HubSpot objects (Contacts, Companies and Deals) as well as custom objects (like "invoices" or "projects"). To use a custom object, you first need to [create it in HubSpot directly.](https://knowledge.hubspot.com/crm-setup/use-custom-objects)

## Modes

The HubSpot destination has two different possible modes for how to alter HubSpot objects:

* **Upsert** — pushes new objects to HubSpot and updates fields that change in your warehouse.
* **Update** — updates particular fields on existing objects in HubSpot. It does not add new objects.

## Matching Query Results to HubSpot Objects

You have to choose how to match records from your model to objects in HubSpot. Select a matching column from your model that corresponds to the same field in the HubSpot object. In the example below, we are mapping our model's `email` field to HubSpot's `email` field on our Contacts objects.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MXcvKcL_7CrEBmEDFfz%2F-MXcyqgLIosQH1QK3F9m%2Fimage.png?alt=media\&token=be289805-0655-4b9f-b8fc-de99cb8450b5)

## Object Association

An Object Association is for when you have data relating the current object to a different object in your database, and you want to create that same association in HubSpot. For example, if you wanted to map your contacts to companies, you can do so by selecting the `CONTACT_TO_COMPANY` association. Then, you can select a common field to map both object types (such as a company's domain).

In the example below, we are mapping Contacts to Companies by matching the `company_domain` field on our Contacts model to the `domain` field on our Company objects.&#x20;

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MXcvKcL_7CrEBmEDFfz%2F-MXczKIRljrO02iF7-5L%2Fimage.png?alt=media\&token=4b2b6cf7-bc7c-499c-8f2a-ba242842e21a)

## Mapping Query columns to HubSpot Fields

Finally, you can choose which specific fields you want to update on your objects in HubSpot. If you do not yet have a HubSpot field to place your data in, you can add a new field to the object within HubSpot directly. Then, refresh the Hightouch site and the new field should be available to map.

&#x20;In the example below, we are mapping our model's `first_order_item_name` field to the custom field  `first_order_item_name` that we added to our Contacts objects in HubSpot.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MXcvKcL_7CrEBmEDFfz%2F-MXd05fh1gHEeJddiYIJ%2Fimage.png?alt=media\&token=3836ca92-8c5b-4ea1-8483-c94a726a2955)
