HubSpot CRM Connector

This topic describes how to integrate HubSpot CRM and HCL CDP using the HCL Link connector to synchronize customer data, enable unified customer profiles, and enhance personalization.

Prerequisites

Before you begin, ensure you have the following:

  • API access and credentials for both HubSpot CRM and HCL CDP.
  • A defined data mapping between HubSpot contact properties and HCL CDP profile attributes.

Connection Parameters

Establishing a connection to HubSpot CRM and HCL CDP requires the following parameters:

Property Description
Base URL The base URL for the HubSpot CRM API.
Redirect URI The URI where HubSpot will send the authorization code.
CDP API URL CDP DI API endpoint URL (e.g. https://<base_url>/v3/data).
Access Token The OAuth 2.0 access token for authenticating with HubSpot CRM.
Auth URL The authorization URL for HubSpot CRM.
Client ID The client ID associated with your HubSpot CRM application.
Refresh Token The OAuth 2.0 refresh token for HubSpot CRM.
Client Secret The client secret for your HubSpot CRM application.
Activity Fetch Units The units used to define the frequency of activity fetching (e.g., hours, days).
Activity Fetch Frequency The rate at which activities should be fetched.

Action Properties

Define the following properties when configuring an HubSpotCRM Source connector from an action box:

Property Description
Lifecyclestage The current stage of a Contact in the business lifecycle e.g. Lead, Customer.
CDP API Key CDP DI API key for authentication (x-api-key).
CDP API Pass Key CDP DI API passkey for additional authentication (x-api-passkey).
CDP Primary Identifier The primary identifier name for CDP (e.g., identity).
Duration (in Days) The duration in days that the flow should run.
HubSpot Fields List The Fields List contains the Contact properties retrieved from HubSpot CRM.

Extracting Data from HubSpot CRM

To retrieve contact data from HubSpot CRM based on specific criteria, use the following search endpoint and request structure:

Endpoint: POST https://api.hubapi.com/crm/v3/objects/contacts/search

{
                "filterGroups": [
                {
                "filters": [
                {
                "propertyName": "lastmodifieddate",
                "operator": "GTE",
                "value": "2025-04-08T00:00:01.287Z"
                },
                {
                "propertyName": "lifecyclestage",
                "operator": "EQ",
                "value": "lead"
                }
                ]
                }
                ],
                "limit": "100",
                "after": "0"
                }

Inserting Data into HCL CDP

After standardizing the data format, the data is inserted into HCL CDP using the following endpoint:

Endpoint: POST https://<base_url>/customer-profiles/v1/profiles

Example Request Body:

[
                {
                "properties": {
                "CUSTOMER_ID": "#userID#",
                "email": "username@email.com",
                "firstname": "James",
                "lastname": "J",
                "lifecyclestage": "lead"
                },
                "userId": "105284182724",
                "type": "identify"
                }
                ]

Example Response:

statuscode,message,id,,timestamp
                200,Data Processed successfully,a67f4ed4-4339-41ca-985b-9e774d4f0aff,,2025-04-09T06:03:07