Deals
Retrieve the available Deals in HubSpot. This table supports both OAuth and APIKey authentications.
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 =, !=, <, <=, >, >=. Further filtering is available using AND and OR combinations. A maximum of 2 OR operators are supported server-side, with each of these operators supporting up to 2 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}
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 | False | True |
Unique identifier of the deal. |
|
| Archived | Bool | True | False |
Whether the deal is archived or not. |
|
| CreatedAt | Datetime | True | False |
When the deal was created. |
|
| UpdatedAt | Datetime | True | False |
When the deal was last updated. |
|
| Amount_in_company_currency | Double | True | True |
The amount of the deal, using the exchange rate, in your company's currency |
|
| Days_to_close | Double | True | True |
The number of days the deal took to close |
|
| Currency | String | False | True |
Currency code for the deal. |
|
| Original_Source_Type | String | False | True |
Original source for the contact with the earliest activity for this deal. |
|
| Original_Source_Data_1 | String | True | True |
Additional information about the original source for the associated contact, or associated company if there is no contact, with the oldest value for the Time first seen property. |
|
| Original_Source_Data_2 | String | True | True |
Additional information about the original source for the associated contact, or associated company if there is no contact, with the oldest value for the Time first seen property. |
|
| HubSpot_Campaign | String | False | True |
The marketing campaign the deal is associated with |
|
| Closed_Deal_Amount | Double | True | True |
Returns the amount if the deal is closed. Else, returns 0. |
|
| Closed_Deal_Amount_In_Home_Currency | Double | True | True |
Returns the amount in home currency if the deal is closed. Else, returns 0. |
|
| Created_by_user_ID | Double | True | True |
The user that created this object. This value is automatically set by HubSpot and may not be modified. |
|
| Deal_amount_calculation_preference | String | False | True |
Specifies how deal amount should be calculated from line items |
|
| Deal_Stage_Probability | Double | True | True |
The probability between 0 and 1 of deal stage. Defaults to 0 for unknown deal stages. |
|
| Is_Deal_Closed_ | Bool | True | True |
True if the deal was won or lost. |
|
| Last_Modified_Date | Datetime | True | True |
The most recent date that any property on a deal was updated. This is updated automatically by HubSpot. |
|
| Likelihood_to_close_by_the_close_date | Double | True | True |
Hubspot predicted likelihood between 0 and 1 of the deal to close by the close date. |
|
| Merged_object_IDs | String | True | True |
The list of object IDs that have been merged into this object. This value is automatically set by HubSpot and may not be modified. |
|
| Deal_ID | Double | True | True |
The unique ID for this deal. This unique ID is automatically populated by HubSpot and cannot be changed. |
|
| The_predicted_deal_amount | Double | True | True |
Returns the multiplication of the deal amount times the predicted likelihood of the deal to close by the close date. |
|
| The_predicted_deal_amount_in_your_company_s_currency | Double | True | True |
Returns the multiplication of the deal amount in your company's currency times the predicted likelihood of the deal to close by the close date. |
|
| Projected_Deal_Amount | Double | True | True |
Returns the multiplication of the amount times the probability of the deal closing. |
|
| Projected_Deal_Amount_in_Home_Currency | Double | True | True |
Returns the multiplication of the amount in home currency times the probability of the deal closing. |
|
| Updated_by_user_ID | Double | True | True |
The user that last updated this object. This value is automatically set by HubSpot and may not be modified. |
|
| Owner_Assigned_Date | Datetime | True | True |
The date the most recent deal owner was assigned to a deal. This is updated automatically by HubSpot. |
|
| Deal_Name | String | False | True |
The name given to this deal. |
|
| Amount | Double | False | True |
The total amount of the deal |
|
| Deal_Stage | String | False | True |
The stage of the deal. Deal stages allow you to categorize and track the progress of the deals that you are working on. |
|
| Pipeline | String | False | True |
The pipeline the deal is in. This determines which stages are options for the deal. |
|
| Close_Date | Datetime | False | True |
The expected close date of the deal |
|
| Create_Date | Datetime | False | True |
The date the deal was created. This property is set automatically by HubSpot. |
|
| Date_of_last_meeting_booked_in_meetings_tool | Datetime | True | True |
The date of the most recent meeting an associated contact has booked through the meetings tool. |
|
| Campaign_of_last_booking_in_meetings_tool | String | True | True |
This UTM parameter shows which marketing campaign (e.g. a specific email) referred an associated contact to the meetings tool for their most recent booking. This property is only populated when you add tracking parameters to your meeting link. |
|
| Medium_of_last_booking_in_meetings_tool | String | True | True |
This UTM parameter shows which channel (e.g. email) referred an associated contact to the meetings tool for their most recent booking. This property is only populated when you add tracking parameters to your meeting link. |
|
| Source_of_last_booking_in_meetings_tool | String | True | True |
This UTM parameter shows which site (e.g. Twitter) referred an associated contact to the meetings tool for their most recent booking. This property is only populated when you add tracking parameters to your meeting link. |
|
| Latest_meeting_activity | Datetime | True | True |
The date of the most recent meeting (past or upcoming) logged for, scheduled with, or booked by a contact associated with this deal. |
|
| Recent_Sales_Email_Replied_Date | Datetime | True | True |
The last time a tracked sales email was replied to for this deal |
|
| Deal_owner | String | False | True |
The owner of the deal |
|
| Last_Contacted | Datetime | True | True |
The last time a call, sales email, or meeting was logged for this deal. This is set automatically by HubSpot based on user actions. |
|
| Last_Activity_Date | Datetime | True | True |
The last time a note, call, email, meeting, or task was logged for a deal. This is set automatically by HubSpot based on user actions in the deal record. |
|
| Next_Activity_Date | Datetime | True | True |
The date of the next upcoming activity for a deal. This property is set automatically by HubSpot based on user action. This includes logging a future call, sales email, or meeting using the Log feature, as well as creating a future task or scheduling a future meeting. This is updated automatically by HubSpot. |
|
| Number_of_times_contacted | Double | True | True |
The number of times a call, email or meeting was logged for this deal |
|
| Number_of_Sales_Activities | Double | True | True |
The total number of sales activities (notes, calls, emails, meetings, or tasks) logged for a deal. This is updated automatically by HubSpot. |
|
| HubSpot_Create_Date | Datetime | True | True |
The date the deal was created. This property is set automatically by HubSpot. |
|
| HubSpot_Team | String | True | True |
The team of the owner of the deal. |
|
| Deal_Type | String | False | True |
The type of deal. By default, categorize your deal as either a New Business or Existing Business. |
|
| All_owner_ids | String | True | True |
The value of all owner referencing properties for this object, both default and custom |
|
| Deal_Description | String | False | True |
Description of the deal |
|
| All_team_ids | String | True | True |
The team ids corresponding to all owner referencing properties for this object, both default and custom |
|
| All_accessible_team_ids | String | True | True |
The team ids, including up the team hierarchy, corresponding to all owner referencing properties for this object, both default and custom |
|
| Number_of_Contacts | Double | True | True |
The number of contacts associated with this deal. This property is set automatically by HubSpot. |
|
| Closed_Lost_Reason | String | False | True |
Reason why this deal was lost |
|
| Closed_Won_Reason | String | False | True |
Reason why this deal was won |