Deals
Retrieves all deals from HubSpot, supporting both OAuth and private-app token authentication methods.
Table Specific Information
A deal represents an ongoing transaction that a sales team is pursuing with a contact or company. It is tracked through pipeline stages until won or lost.
SELECT
When selecting deals, 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 Deals WHERE [Amount] > 100 AND [Close Date] > '2020-01-01' SELECT * FROM Deals WHERE [Deal Name] = 'John' OR [Deal Name] = 'William'
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 Deals WHERE {Column} = {Value} AND {Column} < {Value} AND {Column} > {Value}
SELECT * FROM Deals WHERE {Column} != {Value} AND {Column} >= {Value} AND {Column} <= {Value} AND {Column} = {Value}
SELECT * FROM Deals WHERE ({Column} = {Value} AND {Column} = {Value}) OR ({Column} != {Value} AND {Column} >= {Value})
SELECT * FROM Deals 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})
INSERT
INSERT INTO Deals (Currency) VALUES ('USD')
UPDATE
UPDATE Deals SET Currency = 'EUR' WHERE ID = '471395623'
DELETE
DELETE FROM Deals WHERE ID = '471395623'
Columns
| Name | Type | ReadOnly | References | Filterable | Description |
| Id [KEY] | Long | True | True |
Unique identifier for the deal object. | |
| Archived | Bool | True | False |
Indicates whether the deal is archived and no longer actively managed. | |
| CreatedAt | Datetime | True | False |
Timestamp when the deal was initially created in HubSpot. | |
| UpdatedAt | Datetime | True | False |
Timestamp when the deal was most recently updated. | |
| ItemURL | String | True | False |
Direct URL linking to the detailed view of this specific deal record in HubSpot. | |
| Amount in company currency | Decimal | True | True |
Total value of the deal converted into your company's primary currency using the applicable exchange rate. | |
| Days to close | Decimal | True | True |
Number of days between the deal's creation and the date it was closed. | |
| Currency | String | False | True |
Currency code representing the currency used for the deal amount, such as USD or EUR. | |
| Annual contract value | Decimal | True | True |
Annual Contract Value (ACV) for the deal, representing expected recurring yearly revenue. | |
| Business units | String | False | True |
Business units assigned to the deal for organizational segmentation. | |
| Deal Collaborator | String | True | True |
IDs of HubSpot users who collaborated on managing or closing the deal. | |
| Deal Split Users | String | True | True |
IDs of users sharing revenue or credit for the deal through a revenue split. | |
| Latest Source | String | True | True |
Most recent session source tied to a contact directly or indirectly associated with the deal. | |
| Latest Source Company | String | True | True |
Most recent session source tied to a company associated with the deal. | |
| Latest Source Contact | String | True | True |
Most recent session source tied to a directly associated contact. | |
| Latest Source Data 1 | String | True | True |
Additional detail about the most recent session source from a contact or company linked to the deal. | |
| Latest Source Data 1 Company | String | True | True |
Additional detail about the most recent session source for a company indirectly associated with the deal. | |
| Latest Source Data 1 Contact | String | True | True |
Additional detail about the most recent session source for a contact directly associated with the deal. | |
| Latest Source Data 2 | String | True | True |
Secondary additional source information related to the latest session tied to the deal. | |
| Latest Source Data 2 Company | String | True | True |
Secondary additional source information from a company associated with the deal's latest session. | |
| Latest Source Data 2 Contact | String | True | True |
Secondary additional source information from a contact directly linked to the deal's latest session. | |
| Latest Source Timestamp | Datetime | True | True |
Timestamp of the latest recorded session activity for a contact associated with the deal. | |
| Latest Source Timestamp Company | Datetime | True | True |
Timestamp of the latest recorded session activity for a company associated with the deal. | |
| Latest Source Timestamp Contact | Datetime | True | True |
Timestamp of the latest recorded session activity for a contact directly tied to the deal. | |
| Original Source Type | String | False | True |
The original source category, such as Organic Search or Paid Social, associated with the earliest contact activity tied to the deal. | |
| Original Source Data 1 | String | True | True |
Additional details about the original source for the associated contact or company. | |
| Original Source Data 2 | String | True | True |
Further supplemental details about the original source for the contact or company linked to the deal. | |
| Annual recurring revenue | Decimal | True | True |
Annual Recurring Revenue (ARR) generated by the deal, if applicable. | |
| HubSpot Campaign | String | False | True |
Marketing campaign ID or name associated with the deal, if sourced from campaign activity. | |
| Closed Deal Amount | Decimal | True | True |
Final monetary amount recorded when the deal was marked as closed. | |
| Closed Deal Amount In Home Currency | Decimal | True | True |
Closed deal amount converted into the company's primary currency for reporting consistency. | |
| Created by user ID | Decimal | True | True |
ID of the user who originally created the deal. Automatically set by HubSpot. | |
| Date entered Appointment Scheduled (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Appointment Scheduled' stage within the Sales Pipeline. | |
| Date entered Closed Lost (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Closed Lost' stage within the Sales Pipeline. | |
| Date entered Closed Won (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Closed Won' stage within the Sales Pipeline. | |
| Date entered Contract Sent (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Contract Sent' stage within the Sales Pipeline. | |
| Date entered Decision Maker BoughtIn (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Decision Maker Bought-In' stage within the Sales Pipeline. | |
| Date entered Presentation Scheduled (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Presentation Scheduled' stage within the Sales Pipeline. | |
| Date entered Qualified To Buy (Sales Pipeline) | Datetime | True | True |
Date and time when the deal entered the 'Qualified To Buy' stage within the Sales Pipeline. | |
| Date exited Appointment Scheduled (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Appointment Scheduled' stage within the Sales Pipeline. | |
| Date exited Closed Lost (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Closed Lost' stage within the Sales Pipeline. | |
| Date exited Closed Won (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Closed Won' stage within the Sales Pipeline. | |
| Date exited Contract Sent (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Contract Sent' stage within the Sales Pipeline. | |
| Date exited Decision Maker BoughtIn (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Decision Maker Bought-In' stage within the Sales Pipeline. | |
| Date exited Presentation Scheduled (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Presentation Scheduled' stage within the Sales Pipeline. | |
| Date exited Qualified To Buy (Sales Pipeline) | Datetime | True | True |
Date and time when the deal exited the 'Qualified To Buy' stage within the Sales Pipeline. | |
| Deal amount calculation preference | String | False | True |
Specifies how the deal amount is determined based on associated line items or manual input. | |
| Deal probability | Decimal | False | True |
Probability percentage representing the likelihood that the deal will close. Defaults to the probability tied to the deal's stage. | |
| Deal stage probability shadow | Decimal | True | True |
Backup probability percentage used when the main deal probability is not set. Defaults to 0 if unavailable. | |
| Exchange rate | Decimal | True | True |
Exchange rate used to convert the deal's amount into your company's home currency. | |
| Forecast amount | Decimal | True | True |
Forecasted value calculated by multiplying the deal amount in company currency by the forecast probability. | |
| Forecast probability | Decimal | False | True |
Custom probability percentage assigned to forecast the deal's likelihood of closing. | |
| Is Deal Closed_ | Bool | True | True |
Indicates whether the deal has been marked as closed, either won or lost. | |
| Is Closed Won | Bool | True | True |
Indicates whether the deal has been closed and marked as won. | |
| Deal Split Added | Bool | True | True |
Indicates whether revenue sharing (split) has been added to the deal among multiple users. | |
| Last Modified Date | Datetime | True | True |
Timestamp of the most recent update to any property on the deal, automatically set by HubSpot. | |
| Likelihood to close by the close date | Decimal | True | True |
Predicted probability, between 0 and 1, that the deal will close by its close date. | |
| Global Term Line Item Discount Percentage | String | False | True |
Internal value for applying a global discount percentage across line items in the deal. | |
| Global Term Line Item Discount Percentage Enabled | Bool | False | True |
Indicates whether a global discount percentage has been enabled for the deal's line items. | |
| Global Term Line Item Recurring Billing Period | String | False | True |
Internal value representing the recurring billing period for line items in the deal. | |
| Global Term Line Item Recurring Billing Period Enabled | Bool | False | True |
Indicates whether a global recurring billing period is enabled for the deal's line items. | |
| Global Term Line Item Recurring Billing Start Date | String | False | True |
Internal value representing the start date for recurring billing of line items in the deal. | |
| Global Term Line Item Recurring Billing Start Date Enabled | Bool | False | True |
Indicates whether the global recurring billing start date is enabled for the deal's line items. | |
| Global Term Line Item Recurring Billing Frequency | String | False | True |
Internal value specifying the recurring billing frequency for the deal's line items. | |
| Global Term Line Item Recurring Billing Frequency Enabled | Bool | False | True |
Indicates whether recurring billing frequency is globally enabled for the deal's line items. | |
| Forecast category | String | False | True |
Sales forecast category manually assigned to the deal, such as Best Case, Commit, or Closed Won. | |
| Merged object IDs | String | True | True |
List of object IDs that have been merged into this deal record. Set automatically by HubSpot. | |
| Monthly recurring revenue | Decimal | True | True |
Monthly Recurring Revenue (MRR) expected from the deal, based on recurring line items. | |
| Next step | String | False | True |
Description of the next planned action or activity for advancing the deal. | |
| Number of Active Deal Registrations | Decimal | True | True |
Count of currently active deal registrations linked to this deal. Automatically managed by HubSpot. | |
| Number of Deal Registrations | Decimal | True | True |
Total number of deal registrations associated with this deal. Automatically set by HubSpot. | |
| Number of Deal Splits | Decimal | True | True |
Number of revenue splits assigned to the deal, distributing deal value across multiple users. | |
| Number of target accounts | Decimal | True | True |
Number of target account companies associated with this deal. Set automatically by HubSpot. | |
| Record ID | Decimal | True | True |
Unique identifier for the deal record, assigned automatically by HubSpot. | |
| Pinned Engagement ID | Decimal | True | True |
ID of the engagement (such as a call or meeting) pinned to the top of the deal timeline. Managed automatically. | |
| The predicted deal amount | Decimal | True | True |
Expected revenue for the deal calculated by multiplying the deal amount by its likelihood to close by the close date. | |
| The predicted deal amount in your company's currency | Decimal | True | True |
Expected revenue in the company's primary currency, factoring in the predicted likelihood to close. | |
| Priority | String | False | True |
Priority classification assigned to the deal, used to indicate urgency or strategic importance. | |
| Weighted amount | Decimal | True | True |
Deal amount multiplied by the current probability to estimate likely revenue. | |
| Weighted amount in company currency | Decimal | True | True |
Weighted amount converted into the company's primary currency based on exchange rate. | |
| Read Only Object | Bool | True | True |
Indicates whether the deal is read-only and cannot be edited by users. | |
| Total contract value | Decimal | True | True |
Total Contract Value (TCV) representing the complete revenue expected from the deal over its full contract term. | |
| Time in Appointment Scheduled (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Appointment Scheduled' stage within the Sales Pipeline. | |
| Time in Closed Lost (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Closed Lost' stage within the Sales Pipeline. | |
| Time in Closed Won (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Closed Won' stage within the Sales Pipeline. | |
| Time in Contract Sent (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Contract Sent' stage within the Sales Pipeline. | |
| Time in Decision Maker BoughtIn (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Decision Maker Bought-In' stage within the Sales Pipeline. | |
| Time in Presentation Scheduled (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Presentation Scheduled' stage within the Sales Pipeline. | |
| Time in Qualified To Buy (Sales Pipeline) | Decimal | True | True |
Total time in seconds the deal spent in the 'Qualified To Buy' stage within the Sales Pipeline. | |
| Unique creation key | String | True | True |
Unique key assigned to ensure idempotent creation of the deal and avoid duplicate records. | |
| Updated by user ID | Decimal | True | True |
ID of the user who last made an update to the deal record. Set automatically by HubSpot. | |
| User IDs of all notification followers | String | True | True |
List of user IDs who subscribed to receive notifications when updates occur on the deal. | |
| User IDs of all notification unfollowers | String | True | True |
List of user IDs who unsubscribed from receiving notifications about the deal. | |
| User IDs of all owners | String | True | True |
List of user IDs assigned as owners of the deal, including default and additional owners. | |
| Owner Assigned Date | Datetime | True | True |
Date and time when the current owner was assigned to the deal. Updated automatically by HubSpot. | |
| Deal Name | String | False | True |
The name or title assigned to the deal to describe it in HubSpot. | |
| Amount | Decimal | False | True |
The current monetary value assigned to the deal. | |
| Deal Stage | String | False | True |
The current sales stage of the deal, reflecting its position in the pipeline. | |
| Pipeline | String | False | True |
The sales pipeline to which the deal belongs, which defines available sales stages. | |
| Close Date | Datetime | False | True |
Expected or actual date when the deal is anticipated to close or was closed. | |
| Create Date | Datetime | False | True |
Date when the deal was created in HubSpot. Automatically recorded. | |
| Date of last meeting booked in meetings tool | Datetime | True | True |
Date of the most recent meeting booked through HubSpot's meetings tool related to a contact associated with the deal. | |
| Campaign of last booking in meetings tool | String | True | True |
UTM campaign parameter associated with the last meeting booking for a contact linked to the deal. | |
| Medium of last booking in meetings tool | String | True | True |
UTM medium parameter (such as email or social media) that referred the associated contact to book their most recent meeting. | |
| Source of last booking in meetings tool | String | True | True |
UTM source parameter (such as LinkedIn or Twitter) that referred the associated contact to book their most recent meeting. | |
| Latest meeting activity | Datetime | True | True |
Timestamp of the most recent meeting logged, booked, or scheduled with a contact linked to the deal. | |
| Recent Sales Email Replied Date | Datetime | True | True |
Date when a reply was received to the most recent tracked sales email related to the deal. | |
| Deal owner | String | False | True |
Primary user or sales representative assigned ownership of the deal. | |
| Last Contacted | Datetime | True | True |
Timestamp when the last call, one-to-one sales email, or meeting was logged for this deal. | |
| Last Activity Date | Datetime | True | True |
Timestamp when the most recent activity (such as call, email, meeting, or note) was logged for the deal. | |
| Next Activity Date | Datetime | True | True |
Scheduled date of the next planned activity related to the deal, such as a follow-up call or meeting. | |
| Number of times contacted | Decimal | True | True |
Total number of sales communications (calls, emails, or meetings) logged for the deal. | |
| Number of Sales Activities | Decimal | True | True |
Total number of sales activities associated with the deal, such as calls or meetings. | |
| HubSpot Create Date | Datetime | True | True |
Date the deal record was first created inside HubSpot. | |
| HubSpot Team | String | True | True |
Team assignment of the primary owner of the deal within HubSpot. | |
| Deal Type | String | False | True |
Classification of the deal, such as New Business or Existing Business. | |
| All owner ids | String | True | True |
List of all ownership property IDs associated with this deal, both default and custom. | |
| Deal Description | String | False | True |
Descriptive notes or summary providing context about the deal's purpose, history, or details. | |
| All team ids | String | True | True |
IDs of all HubSpot teams assigned to the deal, including teams linked through custom properties. | |
| All accessible team ids | String | True | True |
List of all team IDs, including inherited ones, that have access permissions related to the deal. | |
| Number of Associated Contacts | Decimal | True | True |
Total number of contact records linked to this deal. Set automatically by HubSpot. | |
| Closed Lost Reason | String | False | True |
Stated reason why the deal was closed as lost, used for sales reporting and coaching insights. | |
| Closed Won Reason | String | False | True |
Stated reason why the deal was successfully closed as won, used for analysis of winning factors. |