Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for deal history #118

Open
caitlinmoorman opened this issue May 11, 2020 · 7 comments
Open

Support for deal history #118

caitlinmoorman opened this issue May 11, 2020 · 7 comments

Comments

@caitlinmoorman
Copy link

Currently, the tap only includes the most recent version of deal properties in the versions data. This is not super useful, as it simply matches the data available in the deal entity itself. The Hubspot API supports a parameter to include the full history of a deal's properties, which enables the recreation of a deal pipeline over time.

From Hupspot's API docs
&includePropertyVersions=true | By default, you will only get data for the most recent version of a property in the "versions" data. If you include this parameter, you will get data for all previous versions.

def sync_deals(STATE, ctx):

@wss-chadical
Copy link

wss-chadical commented May 26, 2020

doh! I was just going to fire up the hubspot integration on Stitch Data Loader.... to specifically query deal property history via bigquery.

Darn it.

@caitlinmoorman Are you using Stitch Data Loader or are you running these taps on your own infrastructure?

@caitlinmoorman
Copy link
Author

@wss-chadical I use Stitch.

Depending on what you need, you can still accomplish some history queries via deal properties - deals should contain fields for when the deal entered stage X and entered stage Y. However, you can't track the history of all deal properties (for example, no visibility into historical deal amount).

@wss-chadical
Copy link

wss-chadical commented May 27, 2020

@caitlinmoorman lol. Specifically date entering a specific stage is what we want.
That's good to know. I'll fire up the stitch for now as date entered stages is the ask.

What's your target?

@wss-chadical
Copy link

wss-chadical commented May 27, 2020

The core is that we want to be able to query the history of any property... so yeah.... &includePropertyVersions=True.

Sort of frustrating over the last 2 years using stitch primarily for Hubspot.

  1. Still no support for new hubspot objects like Tickets, Quotes, Products
  2. This tap still cannot handle when objects are deleted from Hubspot. (I know this is a hubspot issue - but vendors such as stitch do have some pull.)

@caitlinmoorman
Copy link
Author

What's your target?
We're on Redshift.

One warning on using the date entering various stages from the deals object - I just discovered one of our deals isn't populating any of the entered_x_stage columns for some reason, so it's invisible in the reconstructed deal history. That makes this issue slightly more pressing for me, so maybe I can find some time to play around with it in the next couple of weeks - shouldn't be too hard to fix.

@wss-chadical
Copy link

@caitlinmoorman
So, looking at the code...
They are using the get_all_deals endpoint: https://developers.hubspot.com/docs/methods/deals/get-all-deals

Read this thread as well: https://community.hubspot.com/t5/APIs-Integrations/Deals-Endpoint-Returning-414/td-p/320123

Stitch is now using the undocumented allPropertiesFetchMode=latest_version parameter per hubspot's recommendation.

@wss-chadical
Copy link

wss-chadical commented Jun 3, 2020

@caitlinmoorman To get what you (we) need... the allPropertiesFetchMode needs to be set to 'all_versions'.

I've confirmed this works via postman api call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants