Overview: Query Builder for HubSpot Marketing (Workflows)


How to access the Query Builder for HubSpot Marketing (Workflows)

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

    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 Marketing (Workflows)

  Custom Query Name:  Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving.
   Workflow: Select a Workflow from your connected HubSpot Marketing Data Source.   
  Metric: Select a Metric from your connected HubSpot Marketing Data Source, such as "Active Enrolled," "Total Enrolled" or "Contact Performance." 
If you select "Contact Performance," the Dimension and Aggregation fields will be exposed. 
Dimension: Specify the contact performance that you want to track. Dimension options are "Completed Workflow," "Contacts Enrolled," and "Contacts Lost." 

Aggregation: Select the aggregation, which determines the buckets that the contacts are grouped into. This selection will determine how you can visualize your Custom Metric on a Chart. 


  Date Range: Select up to 8 Date Ranges that will be available for the Custom Metric. The Date Ranges selected are the only periods of time that data is synced for this Custom Metric. 

  Compare With(Optional): Select a comparison period to measure each Date Range against, like "Previous Period." Data for the comparison period will be synced for each Date Range that is selected. 
  Data Preview: After clicking Run query, 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 tabs at the top of the Data Preview. 

How to create a Custom Workflow Metric [Example]

In this example, we'll create a Custom Metric to return the number of Contacts who completed our Onboarding Workflow. 

 Navigate to Metrics > Query Builder   
 Click the green + New query button
 Select the appropriate HubSpot Marketing Data Source and the Workflows button
 In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric # Contacts Completed Onboarding Workflow
 We will select Onboarding Workflow from the Workflow dropdown list
 Since we want to track Contacts who completed the Workflow, we'll select Contact Performance as the Metric and Completed Workflow as the Dimension
 We'll select WEEK as the Aggregation
 We will choose Week to Date, Month to Date, Quarter to Date, Year to Date, and Last 12 Months as  Date Range selections 
 We want to view our performance against the previous period, so we'll select Previous Period as the Compare With value
 Click Run query to generate a Data Preview of the Custom Metric
 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 Workflow Metric to a Databoard

 Open the selected Databoard in the Databox Designer, or create a new Databoard.
 Drag and drop a blank Datablock onto the Databoard from the Visualization Library. 
 Select the appropriate HubSpot Marketing Data Source from the righthand Datablock Settings panel. This must be the same HubSpot Marketing Account that was selected when creating the Custom Metric. 
 Select the  Custom tab at the top of the  Metric drop-down list. 
 Select the Custom Metric name to populate the Datablock.

Additional Information

  • Up to 36 months of historical data is accessible for "Contact Performance" Metrics using this Query Builder.
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