Integrate HubSpot

  • Updated

The HubSpot integration with Optimizely Data Platform (ODP) lets you sync your HubSpot contact data and email events (sends, opens, clicks) to ODP. You can also sync your ODP segments and customer data to HubSpot for email and workflow targeting and customer profile data enrichment.

After you complete the configuration, this integration imports HubSpot contact and email data from the last 90 days with the option to import all historical email events (one time only).

Sync data from HubSpot to ODP

This part of the integration configuration imports your HubSpot contact data and email events to ODP.

  1. Go to the App Directory in ODP.
  2. Select the HupSpot app.
  3. Click Install App.
  4. On the Settings tab, click Authorize and follow the prompts to authorize your HubSpot account's connection with ODP.
  5. When you are directed back to ODP, go to Account Settings > Integrations > AWS and copy the Key ID and Secret Access Key values.
  6. Go back to the HubSpot app settings, paste the values in the corresponding fields, and click Save
  7. In the Sync section, enable the HubSpot objects you want to sync to ODP and then click Save:
    • Contacts – Syncs contacts nightly and updates the ODP customer profile. You must configure the contacts field mappings in the corresponding Contacts section.
    • Email Events – Syncs email events (sends, opens, clicks) hourly and updates the ODP customer profile. To sync historical email events from over 90 days ago, which you can only do one time, click One-Time Historical Email Events Import.

Contacts field mapping

The Contacts field mapping section includes a table that lists the HubSpot fields that sync to ODP by default. You can add field mappings if you want to sync additional fields that are not listed in the table. Repeat these steps for each field mapping you want to add:

  1. Expand the Contacts field mapping section.
  2. Below the table, select the HubSpot field from the first drop-down list.
  3. Select the ODP field from the second drop-down list that you want to map the HubSpot field to.
    If the HubSpot field does not have a corresponding field in ODP, you must first create that custom field in ODP.
  4. Click Save Field Map.
  5. After you configure the field mappings as desired, click Import All Contacts to import all HubSpot contacts with the fields you configured.
    The contact data syncs nightly, but you can manually import all contacts at any time.

You can delete custom field mappings. Repeat these steps for each field mapping you want to delete:

  1. Expand the Contacts field mapping section.
  2. Select the field mapping you want to delete from the Field Map drop-down list.
  3. Click Delete Field Map.

Sync data from ODP to HubSpot

After you configure the app, you can set up an activation in ODP to sync your customer data from ODP to HubSpot.

  1. Go to Activation > Engage.
  2. Click Create New Campaign.
  3. To sync your segments and data once, click One-Time. To set up an automated, recurring sync, click Behavioral.
  4. Click Create From Scratch.
  5. Enter a name for your activation that represents the data you are syncing to HubSpot (for example, HubSpot Data Sync).
  6. Select your desired segment and click Apply or click Create New Segment, select your desired segment conditions, and click Save.
  7. (Optional) Adjust the Enrollment Rules as desired.
  8. Expand Touchpoints.
  9. Click to edit Touchpoint 1 and select HubSpot.
  10. Complete the following fields in the Configure section:
    • Sync as Marketable Contacts – Toggle on if you want your ODP contacts to be Marketable Contacts in HubSpot. If not, toggle off.
    • Target – Select Contact List if you want to sync to a HubSpot list or select Workflow if you want to sync to a HubSpot workflow.
    • Contact List or Workflow – The name of this drop-down list matches what you selected for the Target field above. Select either the HubSpot contact list or workflow to which you want to send your ODP contacts.
      You must first set up either a static list or a workflow in HubSpot before you can select it in ODP.
    • Primary Key – Defaults to {{customer.email}}.
    • Number of Additional Fields – (Optional) Select the number of additional HubSpot data fields you want to sync (up to 4).

      A drop-down list and input field display for the number of additional fields you selected. In each Field # drop-down list, select the HubSpot field you want to populate. In each corresponding Field # Value, enter the ODP field you want to send to the selected HubSpot field. For example, if you selected Company Name from the Field # drop-down list, enter {{customer.company_name}} for the corresponding Field # Value.

  11. Click Save and then click your activation name in the breadcrumb trail.
  12. In the Touchpoints section, click Select start time and schedule.
  13. For a recurring sync (behavioral campaign), complete the following settings, then click Apply:
    • Recurring or Continuous – Select Recurring.
    • Start Date – Enter the date you want to send the data to HubSpot.
    • End – Defaults to Never. If you want to end the HubSpot data sync on a specific date, set that here.
    • Repeats – Set to Daily.
    • Repeat Every – Set to 1 day.
    • Timing – Enter the time you want to send the data to HubSpot.
    • Time Zone – Select the time zone in which you want to send this data.
  14. For a one-time sync (one-time campaign), complete the following settings, then click Apply:
    • Send Date – Enter the date you want to send the data to HubSpot.
    • Send Time – Enter the time you want to send the data to HubSpot.
    • Time Zone – Select the time zone in which you want to send this data.
    • Click Apply.
  15. Click Save and then click Go Live. Your sync starts at your designated start date and time.

Troubleshoot the data sync

To ensure data is syncing as expected from ODP to HubSpot:

  1. Go to Account Settings > Event Inspector in ODP.
  2. Click Start Inspector.
  3. When data is available in the inspector, a number displays next to Refresh. Click to view the data.
  4. The raw data that ODP and HubSpot sends back and forth displays. Click View Details to see the formatted version of that raw data.
  5. Data fields sent from HubSpot back to ODP start with _hubspot.

Each data sync is also logged in the ODP activity log:

  1. Go to Account Settings > Activity Log.
  2. Filter the categories by hubspot.
  3. Click View Details for a formatted view of the log details, including the number of matches.