In modern technology, there is a clear need to reuse objects and let the user configure each object once and repeatedly use it over and over again.
This is the basic assumption of the “Connection” configuration in Totango Customer Data Hub.
Connection to a data source is usually done by Ops or Data teams, and the main idea is that it will be configured once and you can reuse the same connection for several integrations.
Important note, the CRM integration family is a closed system, therefore, the data source connectors which are created can be re-used for only CRM integrations and not for other integration families.
Topics covered in this article:
- Creating Hubspot Connection
- Configuring HubSpot Connection
- Writing query for HubSpot
- How to add a Company Id property to deals object
- Tasks and Touchpoints outbound sync
Creating Hubspot Connection
Go to your Totango instance and click on Global Settings > Data Management > Customer Data Hub > Click CRMs and select Hubspot
(note: you will need Totango admin privileges).
- Create a new connection (or review your existing connections)
Configuring HubSpot Connection
HubSpot configuration is based on OAuth credentials and requires a HubSpot admin permission to install it.
You can create the connection right from the HubSpot Marketplace OR from Totango Customer Data Hub.
Create A Connection to Totango from HubSpot Marketplace
- Go to the HubSpot marketplace (on the right side of the top bar) and search for the Totango app.
- Review the Totango app details and click the "Connect app" button
- You will be redirected to your Totango account.
Log in using a Totango global admin user or a user with Customer Data Hub permissions, enter the HubSpot connector name and meaningful description, and click "Test and Save Connection" button.
- After clicking on the "Test and Save Connection" button, HubSpot dialog will open asking which HubSpot account to connect Totango, select the right HubSpot account.
Important note, click on the HubSpot account name to select it and not any other button on the dialog.
On the following page accept Totango permissions
- That's it!
Now you can create your first integration by clicking on the Green plus button.
Create HubSpot Connector From Totango
This is another way to create your HubSpot connector. If you already connected it from the HubSpot marketplace, you should skip this section and start streaming HubSpot data to Totango.
- 1. Go to the CRM connection on the Customer Data Hub page, and find the HubSpot connector
Note, you must be a Totango global admin user or a user with Customer Data Hub permissions to see this page.
- Enter the connection name and description, and click the 'Test and add connection' to connect to HubSpot using your OAuth credentials.
You will be asked to enter your HubSpot credentials unless you are already connected in a different tab of the browser. In the later, the oAuth configuration will take the credentials stored in your active browser session.
Important Note, when integrating to HubSpot there are cases in which a user has several accounts associated with his user. You should select the right account when authenticating.
Writing query for HubSpot
- Choose your object for query (contacts, companies, deals, line_items, etc.)
- Choose fields (properties) which we want to get (from dropdown menu) for an object or start to type name of the field:
Important: Custom object fields are not supported for selection as HubSpot API does not support it. You should choose only fields from the list.
You can filter the inbound integration data by adding a query filter and using HubSpot querying language.
Read more about HubSpot query filtering language.
For example, if you want to filter on deals where 'dealstage' equals 'appointmentscheduled' and ‘hs_lastmodifieddate’ earlier then July 26, 2020 11:59:59 PM GMT then the query will be:
1. No spaces are allowed within the filter text
2. Due to HubSpot limitation, the Totango-Hubspot connector supports a maximum of two filters. read more here
3. The query APIs are limited to 10,000 total results for any given query. Attempting to page beyond 10,000 will generate an error.
In order to make it easier and faster to import accounts (companies) or users (contacts) from Hubspot, and to exports tasks and touchpoints from Totango to Hubspt we created mapping templates for these objects that give initial defaults when creating a new Hubspot integration job to:
- Object fields
- Mapping to Totango of these fields
We use the most popular object fields and mapping. The customer can add or change the fields and the mapping.
The mapping template is loaded automatically when the user creates a new Hubspot Accounts or Users integration job.
Tasks (Engegements - Tasks) outbound:
Touchpoints (Engegements - Notes) outbound:
Key properties for objects in HubSpot
How to add a Company Id property to deals object
Deals object in HubSpot, as well as other objects, are missing the Company Id property.
Company Id is a required property to connect the entity to the right company, thus it is a mandatory key for syncing data to Totango.
Follow the below steps to configure a workflow including a trigger and automation that will add the Company Id to the Deals object
- In your HubSpot account click on Automation - Workflows
- Click on ‘Create workflow’ button
- On the left-side panel choose ‘Company based’ and write a name of workflow in the top field ‘Name your workflow’. After that click the ‘Next’ button.
- Click on button ‘Set enrollment triggers’
- Choose 'Company' as the Filter type
- Choose 'Associated deals' as the triggered workflow
- Configure the criteria to be 'is greater than 0', click on the radio button ‘Include objects with no data’, and click on ‘Apply filter’.
- You can test the criteria by clicking on 'Test Criteria' button and at the end click 'Save'.
- Now that the workflow trigger is created, you should create workflow automation.
This workflow automation will copy the 'Company Id' value whenever a company has deals associated with it. The workflow automation will be configured for a company object that has property “Associated deals” greater than zero.
Click on Plus ('+') icon in the middle of the workflow chart
- Choose the action ‘Copy property value’ from the list
- Choose the property ‘Company ID’ as the property to copy from, and 'Deal' as the target property type.
If you already have an 'AssociatedCompanyID' property in the Deal object select it in the 'Property to copy to' dropdown.
If you do not have this property, click on 'Create a new deal property' the link below the dropdown and follow the steps described in How to create an AssociatedCompanyID property in the Deal object section below.
- In the 'Copy Property' window, click the 'Save' button.
- Now your workflow is ready, review your created workflow by clicking on the 'Review' button on the top-right corner.
- Review the workflow details, and select the 'Yes, enroll on existing companies as of now' radio-button to copy company id to their existing deals.
Click on Turn On' button in the top right corner to activate the workflow.
After enabling the workflow, you can find it in the list of workflows as turned 'on'.
How to create an 'AssociatedCompanyID' property in the Deal object
- In your HubSpot account, click the settings icon settings in the main navigation bar.
In the left sidebar menu, navigate to Properties.
In the upper right, click 'Create property', fill in the fields according to the screenshot below, then click 'Next'.
- Choose 'Single line text' as the 'Field Type', check the ‘Allow users to search for information entered to this field' option, and click the 'Create' button.
- After clicking the 'Create' button, you'll see an 'AssociatedCompanyID property was created' notification.
Tasks and Touchpoints outbound sync
In order to have a better team collaboration and better understanding the customer full picture in real-time, task and touchpoints can be synced from Totango to Hubspot to support use cases where the organization wants to use Totango as the ultimate system of record for activity history or to reflect Totango activity history in Hubspot.
Every task and touchpoint which is created in Totango can be synced to Hubspot as Engagement-Task and Engagement-Note objects in Hubspot
We understand that although Totango is the main platform for your CS team, other teams in your company use Hubspot for work, task management, and customer engagements.
Step by step
- Connect to Hubspot (see above)
- Select Tasks/Touchpoints Outbound integration job from The Hubspot integration
- Filter the tasks/touchpounts you want to export to Hubspot
- Click 'Connect'
- The mapping page is pre-loaded with a default mapping template
- Modify the mapping table if needed
- Click 'Validate Mapping' and see the preview of the objects and fields that will be exported to Hubspot
- Complete the Setting and Scheduling and click 'Save and Sync'