Overview: Query Builder for HubSpot CRM (Deals)

With the Query Builder for HubSpot CRM, you can create Custom HubSpot CRM Metrics using a combination of Metrics, Dimensions, and Filters. Some popular use cases for the Query Builder for HubSpot CRM include tracking individual Sales Rep performance and filtering by custom Deal Properties.

HOW TO

How to access the Query Builder for HubSpot CRM

Navigate to  Metrics > Query Builder to access the Query Builder for HubSpot CRM. Click the green + Create Custom Metric button and select your connected HubSpot CRM Account from the Data Source drop-down list.

    Query Builder is available in Plus and Business Accounts. Agency Basic Accounts have access to Query Builder in the Agency Account only.  Request a trial of Query Builder by following these steps.  

How to use the Query Builder for HubSpot CRM

A
  Data Source: This is the Data Source that the Custom Metric is syncing data from.
B
  Metric: Select a Metric from your connected HubSpot Data Source, such as "Count of Deals," "Amount" or "Number of Sales Activities." Selecting certain Metrics will expose the Dimension field. 
C
  Dimension (Optional): The Dimensions parameter re-categorizes the returned Metric value based on common criteria. Examples of Dimensions are "Deal Stage," "Pipeline," and "Deal 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 Deals by Deal Stage," "Amount by Pipeline," or "Number of Sales Activities by Deal Name."    
D

   Date Field: The Date Field determines which Deals will be included in the Custom Metric. For example, if "Create Date" is selected, any Deals created during the specified Date Range(s) will be included in the Custom Metric. If "Close Date" is selected, any Deals Closed during the specified Date Range(s) will be included in the Custom Metric.  

E
  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. 
Pro Tip : In order to combine AND and OR Filters, use the Any of Operator and enter multiple Strings in the Value field.
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.
Some common Filters include "Pipeline = Sales Pipeline" and "Deal Stage = Closed Won."
F
  Data Preview: 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.
G
  Custom Metric Name: Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving. 
H
  Save: Save your Custom Metric. 
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 CRM Account for each field. Learn more here.

How to create a Custom HubSpot CRM Metric [Example]

In this example, we'll create a Custom Metric to report on a list of the Closed Won Deal Names and Amounts from our Sales Pipeline.

1
 Navigate to Metrics > Query Builder   
2
 Click the green + New query button
3
 Select the appropriate HubSpot CRM Data Source 
4
 We will select Amount from the Metric dropdown list, since we want to track the total amount of Closed Won revenue
5
 Since we want to view the associated Deal Names, we'll select  Deal Name from the Dimension dropdown list 
6
 We're interested in tracking Closed Won Deals, so  Close Date will be our Date Field selection 
7
 Lastly, we want to restrict the Custom Metric to only retain data for the Sales Pipeline 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 Pipeline. Next, click on the  Operator dropdown, and select Equals. Lastly, in the Value textbox enter the exact Pipeline name
If you are unsure of the exact Pipeline name, change the Operator to Contains. This will make it so any HubSpot CRM Pipeline that contains the String "Sales" will be included in the Custom Metric results
8
  In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric ''Closed Won Deal Amt by Deal Name (Sales Pipeline)''
9
 Click Preview data to generate a Data Preview of the Custom Metric
10
 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 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
 Select the appropriate HubSpot CRM Data Source in the righthand Property Manager. This must be the same HubSpot CRM Account that was selected when creating the Custom Metric. 
4
 Select the  Custom tab at the top of the  Metric drop-down list. 
5
 Select the Custom Metric name to populate the Datablock.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us