HubSpot
HubSpot is a cloud-based, AI-driven CRM solution used for tracking details of business relationships. The HubSpot target connector is implemented using HubSpot REST APIs and HubSpot properties, and supports token-based authentication.
• Supported Versions: HubSpot API Version 3.0.
• Querying Data: The HubSpot connector retrieves data using the HubSpot search API.
• Authentication: HubSpot uses bearer token to do authentication and authorization. When making a call to one of the HubSpot API endpoints, set the value of the Authorization field to Bearer <your_token>, where <your_token> is the bearer token provided by HubSpot.
• Data Operations: The HubSpot connector allows you to retrieve, insert, update, and delete data from/to HubSpot. Use HTTP methods (GET, POST, PUT, DELETE) to interact with records.
• Custom Properties and Objects: The HubSpot connector supports custom properties for HubSpot standard and custom objects.
Tip... HubSpot Inc. periodically adds new properties to entities which can result in a DataConnect schema mismatch error when connecting the source or executing a map. If you encounter this, set the source Schema Mismatch property to Use Connection, Match by Name in the Map Editor, refresh the schema and then try again.
Note: When creating a new map (manually or using the Map Wizard) and the target has no schema, DataConnect attempts to create one using the source schema. This is a straightforward process with a single record source to a single record target. The process differs with a multi-record (or hierarchical) source to multi-record target. In this case, DataConnect locates the first “flat” source record type (a record where none of the fields are themselves a record) and uses it to generate a basic schema for the target. Users can then build out the schema.
Prerequisites
Before using the connector, perform the following:
• Obtain a HubSpot access token for API calls.
• Obtain access permission for HubSpot objects.
Connector Parts
The HubSpot connector has a single connector part, an access token, which is granted to users by HubSpot.
Connector parts are the fields you configure to connect with a data source or target. The fields that are available depend on the connector you select.
For a list of all parts for source connectors, see
Specifying Source Connector, Parts, and Properties.
For a list of all parts for target connectors, see
Specifying Target Connector, Parts, and Properties.
Connector Properties
You can specify the following source (S) and target (T) properties:
HubSpot Objects
HubSpot objects are divided into standard objects and custom objects. The HubSpot connector supports the following HubSpot standard objects:
"calls", "cart", "communications", "companies", "contacts",
"deals", "discounts", "emails", "engagements", "fees",
"feedback_submissions","goal_targets", "line_items", "marketing_event","meeting_event",
"notes", "order","postal_mail", "products", "quotes",
"quote_template", "tasks", "taxes", "tickets"
A list of custom objects can be retrieved by API call. Custom objects are listed after the standard objects. Permissions must be set for each object in order to read and write.
For more information about HubSpot objects, refer to HubSpot documentation at
https://developers.hubspot.com/beta-docs/.
Object Properties and Connector Schema
HubSpot object properties are used to store information on CRM records. HubSpot provides a set of default properties for each object. Properties can be used to populate the connector schema for the objects. Custom properties can also be created and managed in HubSpot, or using the properties API.
CRM object properties can be obtained using following REST service call:
HttpGet("https://api.hubapi.com/crm/v3/properties/ " + object_name);
Data Type Support
The following data types are supported:
• bool
• date
• datetime
• string
• numbers
• enumeration
Source Connector
Several HubSpot APIs are provided for retrieving data from the server.
GET Request
To read one object, make a GET request to /crm/v3/objects/{object_name}. GET request has the following options: PageSize, Properties and Associations.
Query Statement
HubSpot connector uses HubSpot search API (see https://developers.hubspot.com/docs/api/crm/search#specify-returned-properties) for query support. The source connector supports all search APIs except that:
• "objects":"object_name" must be added to JSON search criteria.
• the limit parameter is replaced by PageSize option.
The following example posts JSON artifacts as the query statement to retrieve contacts records with firstname Alice:
{
"filterGroups":[
{
"objects":"contacts",
"filters":[
{
"propertyName": "firstname",
"operator": "EQ",
"value": "Alice"
}
]
}
]
}"
Batch/Read
Query statement also supports HubSpot batch/read API (see https://developers.hubspot.com/docs/api/crm/contacts). In the following example, JSON artifacts are posted.
Note: In this example, the POST body must define "objects":"object_name".
{
"objects":"deals",
"properties": [
"dealname",
"dealstage",
"pipeline"
],
"idProperty": "uniqueordernumber",
"inputs": [
{
"id": "0001111"
},
{
"id": "0001112"
}
]
}
Target Connector
The HubSpot target connector only has APPEND mode to support the creation of HubSpot objects in batch.