JDBC Driver for HubSpot

Build 26.0.9770

Goals

Retrieves all goal records configured in HubSpot, supporting goal tracking and performance management.

View Specific Information

In HubSpot, goals are used to create user-specific quotas for their sales and services teams.

SELECT

When selecting goals, they can be filtered by columns marked below as 'Filterable'. For those columns, the supported server-side operators are: =, !=, <, <=, >, >=, IN

Further filtering is available using AND and OR combinations. A maximum of 3 OR operators are supported server-side, with each of these operators supporting up to 3 AND operators inside of them. For example:

SELECT * FROM Goals;
SELECT * FROM Goals WHERE Id = '385180212151';

In the below server-offloading examples, "{Column}" represents any column you'd like to filter and "{Value}" represents any value you want to filter it on:

SELECT * FROM Goals WHERE {Column} = {Value} AND {Column} < {Value} AND {Column} > {Value}
SELECT * FROM Goals WHERE {Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}
SELECT * FROM Goals WHERE ({Column} = {Value} AND {Column} = {Value}) OR ({Column} != {Value} AND {Column} >= {Value})
SELECT * FROM Goals WHERE ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}) OR ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value}) OR ({Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value})

Columns

Name Type References Filterable Description
Id [KEY] Long True Unique identifier for the goal object.
Archived Bool False Indicates whether the goal record is archived.
CreatedAt Datetime False The date and time the goal was initially created.
UpdatedAt Datetime False The date and time the goal was most recently updated.
MigrationSoftDeleteDeprecated String True Indicates if the goal target is treated as deleted due to legacy migration.
Ad account asset IDs String False Semicolon-separated list of ad account IDs associated with the goal, formatted as {AD_NETWORK}-{ACCOUNT_ID}.
Ad campaign asset ids String False Semicolon-separated list of ad campaign IDs associated with the goal, formatted as {NETWORK}-{CAMPAIGN_ID}.
All teams String False The IDs of all teams, including hierarchical parents, linked to owner properties for this goal.
Business units String False Business units assigned to this goal record.
All owner ids String False List of all owner IDs—default and custom—linked to this goal.
Team ids String False The ID of the team that owns this goal. Only one team should be listed.
Assignee team ID Decimal True The ID of the team assigned to the goal, if applicable.
Assignee user ID Decimal True The ID of the user assigned to the goal, if applicable.
Campaign asset ids String False IDs of marketing campaign assets associated with this goal.
Contact lifecycle stage String True Selected lifecycle stage for contact-based goal targets.
Created by user ID Decimal True The ID of the user who created this goal. Set automatically by HubSpot.
Object create date/time Datetime True Timestamp for when this goal object was created. Set automatically by HubSpot.
currency String True Deprecated currency code; no longer in use.
Currency Exchange Rate Decimal True Exchange rate used to convert KPI values to company currency. Editable only after the goal ends.
Deal pipelines String False Serialized list of deal pipeline IDs used to calculate KPI values for the goal.
Edit updates notification frequency String False Frequency at which notifications are sent for goal edits.
End date Date True The final date included in the goal's target period.
End datetime Datetime True Timestamp marking the end of the goal's target period.
Fiscal year offset Decimal True Number of months the fiscal year deviates from the calendar year (0 = January start).
Goal name String True The name or title given to the goal.
Goal target currency code String False Currency code used to express the goal's target value.
Goal Target Group ID Decimal True Object ID of the group to which this goal target belongs.
Goal type String False The category or classification of the goal.
Group correlation UUID String True Unique identifier grouping related goal targets and groups created together.
Is forecastable String True Indicates whether the goal should be shown in forecasting tools, based on milestone criteria.
IsLegacy String True Indicates whether the goal was created during the legacy system migration.
KPI Display Unit String False Units used to display KPIs (such as dollars, hours, or count).
KpiFilterGroups String True Filter groups used for calculating KPI values for the goal.
KPI is team rollup Bool True Indicates whether KPI contributions from child teams are included in the team's total.
KpiMetricType String True The aggregation metric type (such as sum or count) used for calculating the KPI.
KpiObjectType String True CRM object type on which KPI values are based.
Kpi object type id String True ObjectTypeId of the object associated with KPI calculations.
KpiPropertyName String True The name of the property used on the object type to calculate KPI values.
KpiSingleObjectCustomGoalTypeName String True Custom goal configuration containing the metric type, object type, and property name.
KpiTimePeriodProperty String True The date-based property used to group the KPI calculation by time period.
KpiTrackingMethod String True Specifies how the progress direction is tracked (such as increasing or decreasing target).
Kpi unit type String False Measurement unit used for the KPI calculation (such as count, currency, or time).
KPI value Decimal True The latest value calculated for the KPI defined by this goal.
KPI value calculated at Decimal True Timestamp indicating when the latest KPI value was calculated, in milliseconds.
KPI value last calculated at Datetime True Date and time when the KPI value was most recently calculated.
Object last modified date/time Datetime True The timestamp of the most recent update to any property of this goal object.
LegacyActive String True Legacy flag indicating whether the goal was active or soft-deleted during migration.
LegacyCreatedAt Decimal True Timestamp for when the goal was originally created in the legacy system.
LegacyCreatedBy Decimal True User ID of the original creator from the legacy system.
LegacyQuarterlyTargetCompositeId String True Composite ID from legacy quarterly goal structure, combining three related SQL IDs.
LegacySqlId Decimal True Original ID of the goal target in the legacy system (deprecated in favor of unique ID).
LegacyUniqueSqlId Decimal True Unique identifier for legacy system goal targets to prevent duplicates.
LegacyUpdatedAt Decimal True Timestamp for the most recent update in the legacy system.
LegacyUpdatedBy Decimal True User ID of the person who last updated the goal in the legacy system.
Merged record IDs String False List of record IDs that were merged into this goal object. Set automatically by HubSpot.
MigrationSoftDelete String True Indicates if the goal target was soft-deleted during system migration.
Milestone String False The defined period (such as monthly or quarterly) during which the goal is considered active.
Record ID Decimal True Unique identifier for this goal record, set automatically by HubSpot.
Record Creation Source String True Internal value indicating the source system or method that created this goal.
Record Creation Source ID String True Internal identifier providing further detail on the source that created the goal.
Record Creation Source User ID Decimal True User ID of the person who triggered the goal creation event.
Outcome String False Result of the goal (such as achieved, missed, or exceeded).
Owner ids of all owners String False List of all user IDs assigned as owners of this goal record.
Participant type String False Indicates whether the participant in the goal is a user, team, or pipeline.
Pipeline ids String False List of pipeline IDs that this goal is tied to for KPI filtering purposes.
Pipelines String True Serialized list of pipeline identifiers used in KPI value calculation.
Progress updates notification frequency String False Frequency at which progress updates for this goal are sent.
Read Only Object Bool True Indicates whether the goal is read-only and cannot be edited.
Notify on goal achieved String True Whether notifications are enabled when the goal is achieved.
Notify with goal edit updates String True Whether users receive notifications when the goal is edited.
Notify on goal exceeded String True Whether notifications are enabled when the goal is exceeded.
Notify on goal kickoff String True Whether users are notified when the goal officially starts.
Notify on goal missed String True Whether notifications are enabled when the goal is not met.
Notify with progress updates String True Whether users receive progress update notifications for this goal.
ShouldRecalculate String True Flag indicating whether the goal target requires recalculation due to property changes or corrections.
Start datetime Datetime True Start date and time that defines the beginning of the goal target's active period.
Static KPI Filter Groups String True Filter groups applied to the goal's KPI that exclude time-based criteria.
Status String False Current status of the goal (such as active, completed, missed).
Status display order Decimal True Numerical value used to sort goal statuses in a defined display order.
Target amount Decimal True The target value that the goal aims to reach.
Target amount in company currency Decimal True Target amount converted into the company's base currency using the current exchange rate.
Team ID Decimal True The ID of the team responsible for this goal target.
Ticket pipelines String False Serialized list of ticket pipeline IDs used for KPI filtering related to tickets.
Unique creation key String True Property used to ensure idempotent creation of the goal object in HubSpot.
Updated by user ID Decimal True User ID of the person who last modified this goal. Set automatically by HubSpot.
User ID Decimal True The user ID that this goal target is assigned to.
User IDs of all notification followers String False List of user IDs who have opted in to receive notifications for this goal.
User IDs of all notification unfollowers String False List of owner user IDs who have opted out of receiving notifications for this goal.
User IDs of all owners String False User IDs of all owners assigned to this goal record.
Performed in an import Bool True Boolean flag indicating if this goal was created as part of a data import process.
Owner Assigned Date Datetime True The date an owner was most recently assigned to this goal object. Set automatically by HubSpot.
Owner String True Name of the current owner assigned to this goal.
HubSpot Team String False Primary team of the owner assigned to this goal.
Start date Date True Calendar date representing the start of the goal's time range.
Kpi progress percent Decimal True Progress toward the goal as a percentage, based on the current KPI value versus the target.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770