APIs & Integrations

RecruitNB
Miembro

Extract "entered deal stage" data via API

resolver

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 Me gusta
1 Soluciones aceptada
IsaacTakushi
Solución
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

resolver

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

Ver la solución en mensaje original publicado

7 Respuestas 7
IsaacTakushi
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

resolver

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
Solución
HubSpot Employee
HubSpot Employee

Extract "entered deal stage" data via API

resolver

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
Miembro

Extract "entered deal stage" data via API

resolver

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 Me gusta
coolbublik
Miembro

Extract "entered deal stage" data via API

resolver
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 Me gusta
Derek_Gervais
Exmiembro de HubSpot
Exmiembro de HubSpot

Extract "entered deal stage" data via API

resolver

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
Participante

Extract "entered deal stage" data via API

resolver

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
Participante

Extract "entered deal stage" data via API

resolver

@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 Me gusta