--- title: "Data Destination - Data Destination - HubSpot" slug: "data-destination-hubspot" updated: 2024-09-19T08:16:42Z published: 2024-09-19T08:16:42Z canonical: "documents.trocco.io/data-destination-hubspot" --- > ## Documentation Index > Fetch the complete documentation index at: https://documents.trocco.io/llms.txt > Use this file to discover all available pages before exploring further. # Data Destination - Data Destination - HubSpot ## summary Help Page for ETL Configuration of Data Setting to HubSpot. ## Setting items ### STEP1 Basic settings | item name | indispensable | default value | Contents | | --- | --- | --- | --- | | HubSpot Connection Configuration | Yes | - | Select the preregistered [HubSpot Connection](/docs/connection-configuration-hubspot) Configuration that has the necessary permissions for this ETL Configuration. **Only Connection Configuration created with OAuth 2.0 as the authentication method can be selected.** | | object type | Yes | - | Select the name of the object you wish to designate as Data Destination. **List of object types** `contact``company``deal``product``ticket``line_item``quote``subscription``call``email``meeting``note``postal_mail``task`custom object | | transfer mode | Yes | `UPSERT` | Select the data transfer method to be used for the object.`UPSERT`: `UPSERT` data `against` an object.Append `(INSERT` ): Appends data to an object. | | UPSERT key | Yes | `hs_object_id` | Enter when `UPSERT is` selected as the transfer mode. Enter the name of a property that should be treated as a merge key (primary key) with no duplicate values. Note that the default value `hs_object_id` is a property with a unique value set on the HubSpot side. If you want to specify properties other than `hs_object_id`, you need to prepare them in advance on the HubSpot side. For details, please refer to the [case where an arbitrary property is set as the UPSERT key,](/docs/data-destination-hubspot#%E4%BB%BB%E6%84%8F%E3%81%AE%E3%83%97%E3%83%AD%E3%83%91%E3%83%86%E3%82%A3%E3%83%BC%E3%82%92upsert%E3%82%AD%E3%83%BC%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88) described below. | | Associations to Objects | Yes | - | Set if **an engagement object is** selected for the object type. For more information, see [Associations to Objects](/docs/data-destination-hubspot#%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%B8%E3%81%AE%E9%96%A2%E9%80%A3%E4%BB%98%E3%81%91). | :::(Warning) `(subscription` object) If `subscription is` selected as the object type, the transfer is performed by `UPSERT.` In addition, the UPSERT key will automatically specify the `email` and `subscription_id`. For details, please refer to the [case of updating the SUBSCRIPTION object](/docs/data-destination-hubspot/#subscription%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E6%9B%B4%E6%96%B0%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88) described below. ::: custom object You can also transfer data to custom objects created on HubSpot. Clicking on **Load Custom Object** will allow you to select a custom object associated with the Connection Configuration you have selected. ### Associations to Objects HubSpot allows you to [associate](https://knowledge.hubspot.com/ja/crm-setup/associate-records) a record of one object [with](https://knowledge.hubspot.com/ja/crm-setup/associate-records) a record of another object. TROCCO combines the transfer of **an engagement object** with an association to an existing HubSpot object. #### List of Engagement Objects The following is a list of engagement objects and the objects with which each can be associated. | engagement object | List of objects to be associated | | --- | --- | | `call` | `contact`, `company`, `deal`, `ticket` | | `email` | `contact`, `company`, `deal`, `ticket` | | `meeting` | `contact`, `company`, `deal`, `ticket` | | `note` | `contact`, `company`, `deal`, `ticket` | | `postal_mail` | `contact`, `company`, `deal`, `ticket` | | `task` | `contact`, `company`, `deal`, `ticket`, `quote` | #### Configuration items for associations to objects Selecting an engagement object in the object type will display the **associations to the object**. ![001.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-0.png) - **object being studied** - Select the object to be associated. - **Unique key on HubSpot side** - Enter a column with a unique value from the object to be associated. - **Column name on the transfer data side** - Enter the name of the "column to identify the record to be associated" contained in the data to be transferred. - When the value in the column matches the value of the unique key on the HubSpot side, an engagement is associated with the corresponding record. #### Example of setting an association to an object Suppose you want to transfer the following data ``` hs_timestamp,hs_call_body,company_id 2023-08-01T00:00:00.000Z,hoge,hoge@example.com,XXXXXXXXXX1 2023-08-02T00:00:00.000Z,fuga,fuga@example.com,XXXXXXXXXX1 2023-08-03T00:00:00.000Z,piyo,piyo@example.com,XXXXXXXXXX2 ``` Select `"call"` as the object type and set the following in the object association - **Target object**: `company` - **Unique key on HubSpot side**: `hs_object_id` - **Column name on the transfer data side**: `company_id` When this ETL Configuration is executed, each transfer data will be associated with the following records - Rows 1-2 of the transferred data: Records for which the value of the `hs_object_id` column of the `company` object is `XXXXXXXXXXXXXX1` - Row 3 of the transferred data: record with `hs_object_id` column value of `XXXXXXXXXXXX2` in the `company` object ## supplementary information ### To set any property as the UPSERT key If you want to set the UPSERT key to a property other than `hs_object_id` or the `contact` object's `email`, you must do so on the HubSpot side beforehand. The setup procedure is described below. 1. Log in to [HubSpot](https://app.hubspot.com/login) and click on your current HubSpot account 2. Click on the settings icon in the red frame in the upper right corner of the screen ![image](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-1.png) 3. Click **Properties** ![image](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-2.png) 4. Select the **object** and click on the property you want to use as the UPSERT key ![image](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-3.png) 5. Click on the **Rules** tab ![image](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-4.png) 6. **For this property,** enable the **Require non-duplicate values** and click Save. ![image](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/data-destination-hubspot-2024-08-29-18-40-5.png) ### To update the subscription object In order to update the `subscription` object, column names and types must be mapped on TROCCO. Refer to the table below and perform the mapping in STEP 2 "Column Setting" tab of ETL Configuration in TROCCO. | column name | data type | indispensable | Input Example | Description. | | --- | --- | --- | --- | --- | | `email` | `string` | ✓ | `hoge@example.com` | Email Address | | `subscription_id` | `long` | ✓ | `12232` | [subscription ID](/docs/data-destination-hubspot#%E3%82%B5%E3%83%96%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3id%E3%81%AE%E7%A2%BA%E8%AA%8D%E6%96%B9%E6%B3%95) | | `is_subscribed` | `boolean` | ✓ | `true` | Delivery Registration Status`true`: Subscribe to Delivery`false`: Unsubscribe | :::`(` Warning) `(` Restriction on `is_subscribed` ) - You cannot update data for which `is_subscribed` (delivery registration status) is `false` (has been `unsubscribed` ). If you wish to update the status of your delivery registration to the registered status, please do so on the HubSpot side of the screen. - Data updates to HubSpot's data are not supported without changing the status of the subscription. Therefore, it is not possible to update data that `is_subscribed is``true` for data that `is``is_subscribed` (delivery registration status) is `true` (registered) on the HubSpot side. ::: #### How to check your Subscription ID 1. On the HubSpot screen, select **Settings** > **Data Setting > Data Management** > **Properties**. 2. Select **Export All Properties in** the upper right corner of the Properties screen and click on the modal "Export" to download the Excel/CSV file. 3. In the **CONTACT** sheet of the Excel/CSV file, look for an entry beginning with `hs_email_optout_.` Example: For `hs_email_optout_111`, the subscription ID is `111`.