Overview: Query Builder for HubSpot CRM (Engagements)
With the Query Builder for HubSpot CRM (Engagements), you can use Custom Company Properties and a combination of metrics, dimensions, and filters to create Custom Metrics in Databox.
How to access the Query Builder for HubSpot CRM (Engagements)

Navigate to Metrics > Query Builder to access the Query Builder for HubSpot CRM (Engagements). Click the green + New Custom Metric button and select your connected HubSpot CRM Account from the Data Source drop-down list. Select the Engagements radio button.
Query Builder is available on the Professional and Performer plans. Request a trial of Query Builder by following
these steps.
How to use the Query Builder for HubSpot CRM (Engagements)

A
Data Source: This is the Data Source that the Custom Metric is syncing data from.
B
Engagement type: Select an Engagement type from your connected HubSpot CRM Data Source, such as "Calls", "Meetings", "Notes" or "Tasks". Selecting the Engagement type, will expose the Metric field for that specific type.
C
Metric: Select a Metric from your connected HubSpot CRM Data Source, such as "Count of calls", "Count of Meetings", or "Count of Emails". Selecting certain Metrics will expose the Dimension field.
D
Dimension (Optional): The Dimension parameter re-categorizes the returned Metric value based on common criteria. Examples of Dimensions are "Call and Meeting type", "Meeting description" and "Meeting Name". If no Dimension is selected, the Custom Metric will store 1 aggregated Metric value for each Date Range.
Pro Tip: Add the word "by" in between the Metric and Dimension in order to determine an appropriate Custom Metric Name. From the Metric and Dimension examples outlined above, we could create the Custom Metrics "Count of Meetings by Meeting Outcome," "Count of Calls by Caller Number," or "Count of Emails by Email Subject."
E
Date Field: The Date Field determines which Engagements will be included in the Custom Metric. For example, if "Create Date" is selected, any Calls made during the specified Date Range(s) will be included in the Custom Metric.
F
Filter by (Optional): Filters restrict the data that gets included in the Custom Metric. All data that is returned is tested against the Filter(s). Multiple Filters can be combined using AND /OR boolean logic.
If the data synced from the Metric and Dimension fields meet the Filter specifications, the data is retained and included in the Custom Metric value. If the data synced from the Metric and Dimension fields don't meet the Filter specifications, the data is excluded from the Custom Metric value.
Pro Tip : If you don't know which Filters to put in place for your use case, use the Dimension + Data Preview to troubleshoot and get more insight into the data that is returned from your HubSpot Account for each field. Learn more
here.
Some common Filters include filtering data by ''Record ID'' or ''Created by user ID.''
G
Favourable Trend: By default,
Trending up is positive is pre-selected, which will display the percentage change value on Datablocks as green when the Metric value has increased. If the Custom Metric you created has opposite trends, select
Trending down is positive radio button. Learn more
here.
H
Preview data: After clicking
Preview data, a Data Preview of the Custom Metric will be displayed. Daily Metric values are displayed in this section, along with the total Metric values for the Date Range in bold at the bottom. You can view the Data Preview for different Date Ranges by clicking on the drop-down list at the top of the Data Preview.
I
Custom Metric Name: Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving.
J
Save: Save your Custom Metric.
How to create a Custom HubSpot CRM (Engagements) Metric [Example]
In this example, we'll create a Custom Metric to report on Count of Calls by the Call outcome as Initial Engagement.

1
Navigate to
Metrics
> Query Builder
2
Click the green
+ New query button
3
Select the appropriate HubSpot CRM Data Source
4
Select the
Engagement
radio button.
5
We will select
Calls from the
Engagement type drop-down list
6
We will select
Count of Calls from the
Metric dropdown list, since we want to track the number of calls.
7
We want to view the associated Call outcome, therefore we'll select
Call outcome from the
Dimension dropdown list
8
We're interested in tracking the calls made status, so
Create Date will be our
Date Field selection
9
Lastly, we want to restrict the Custom Metric to only retain data based on Call outcome as Initial Engagement, so we'll add a Filter to the Custom Metric
First, click on the
Advanced Options hyperlink to open the Filter section of the Query Builder. Click on the
Filter by dropdown and select
Call Outcome. Next, click on the
Operator dropdown, and select
Contains. Lastly, in the
Value text box, enter
Initial Engagement.
10
In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric "Count of Calls by Call outcome (Initial Engagement)"
11
Click
Preview data to generate a Data Preview of the Custom Metric.
12
Once we confirm that these are the results we're looking for, we'll click
Save to save the Custom Metric.
How to add a Custom HubSpot CRM (Engagements) Metric to a Databoard

1
Open the selected Databoard in the Databox Designer, or create a new Databoard.
2
Drag and drop a blank Datablock onto the Databoard from the Visualization Library.
3
Click on the Datablock on the Databoard to open the corresponding
Data block
Editor on the right-hand side of the Designer.
4
In the
Metrics drop-down, click
Data Source to select the appropriate HubSpot CRM Data Source. This must be the same HubSpot CRM Account that was selected when creating the Custom Metric. This will filter out metrics from the specific Data Source.
5
In the
Metric Type drop-down, select
Custom to filter out all Custom Metric from this specific Data Source.
6
In the main
Metrics drop-down, select the metric you'd like to display on the Datablock, using the Search bar if needed. This will update the Datablock, and it will populate with the corresponding data.