APIs & Integrations

RecruitNB
Member

Extract "entered deal stage" data via API

SOLVE

Hi,

The HS Service told me that one cannot extract “entered deal stage” data information from Hubspot, as these aren’t Deal properties, but “information stored on the back end of the deal record”. I would like to run cohorts based on these information, preferably within Slemma.

Do you have tips how to do that?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

SOLVE

Hi, all.

Apologies for the delayed response, @peter.strik. This topic fell through the cracks. It is possible to retrieve the dealstage property history:

  • If you're using the Get all deals endpoint, include the query parameter propertiesWithHistory=dealstage in your request.
  • If you're using the Get a deal endpoint, include the query parameter includePropertyVersions=true.

Welcome, @Matija_Ziberna! Let me know if the above methods work for you.

Isaac Takushi

Associate Certification Manager

View solution in original post

7 Replies 7
IsaacTakushi
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

SOLVE

Hi, @talyhProp.

 

That is correct. At this time, the v3 CRM APIs do not support fetching property histories. The product team is aware of this limitation and folks like @dennisedson and Developer Support will continue advocating for the feature.

In the meantime, if it's critical to pull property histories, it's fine to continue using the v1 Deals API.

Isaac Takushi

Associate Certification Manager
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

SOLVE

Hi, all.

Apologies for the delayed response, @peter.strik. This topic fell through the cracks. It is possible to retrieve the dealstage property history:

  • If you're using the Get all deals endpoint, include the query parameter propertiesWithHistory=dealstage in your request.
  • If you're using the Get a deal endpoint, include the query parameter includePropertyVersions=true.

Welcome, @Matija_Ziberna! Let me know if the above methods work for you.

Isaac Takushi

Associate Certification Manager
talyhProp
Member

Extract "entered deal stage" data via API

SOLVE

Hi there @IsaacTakushi !
That seems to only apply to v1 of the API, is that correct?
Passing `includePropertyVersions=true`  to v3 `GET` didn't yield the history.

Is there an equivalent capability for v3? (either on `List` or `Search`)?

Thanks!

0 Upvotes
coolbublik
Member

Extract "entered deal stage" data via API

SOLVE
const dealsResponse = await hubspot.deals.get(
{
properties: ['dealname', 'closedate', 'createdate', 'dealstage', 'amount'],
propertiesWithHistory: ['closedate'],
propertiesWithHistory: ['dealstage'],
propertiesWithHistory: ['dealname'],
propertiesWithHistory: ['Amount']

});



doing so I can only get Amount history data, cannot get dealstage etc. 
could you please help me ?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Extract "entered deal stage" data via API

SOLVE

Hi @Recruit,

Support was correct; there isn’t an ‘Entered deal stage’ deal property that keeps track of when a deal has entered a particular stage. What you might consider doing is to use the Deals API to get a deal, and include the dealstage property. The timestamp field is the date/time the dealstage property was set to it’s current value, which you could use as the date/time the deal ‘entered’ that stage.

Get a Deal | Deals API

GET  /deals/v1/deal/:dealId - Returns an object representing the deal with the id :dealId associated with the specified portal.

PeterStrik
Participant

Extract "entered deal stage" data via API

SOLVE

Hi @Derek_Gervais,
Thanks for that note. I'm interested in calculating entered deal stage as well, but for a slightly different purpose.

I'm building a report on the # SQLs created in a month, where SQL is a dealstage value. Specifically, I'm interested in all SQLs created in a specific month, regardless of the current dealstage value of the Deal (e.g. a Deal could be Closed Won by the end of the month but still needs to be counted).

Is there a way to retrieve the dealstage history, rather than just the current status?

Matija2209
Participant

Extract "entered deal stage" data via API

SOLVE

@peter.strik did you perhaps find a solution for this? I'm creating SQL query to show deals entered in sample stage for specific stage to no avail. I've used above tip but it doesnt show perfect numbers.

0 Upvotes