-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
🎉Source Hubspot: Add contacts associations to Deals stream. #5693
Changes from 4 commits
7ba2b69
9caab78
1d885c7
e0b483a
1cf0c2b
ebdef51
b57fb36
d51f1f5
e69541b
59f4eb5
b7a6fb1
a44003e
673dc4c
4f09a61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -620,6 +620,14 @@ def list(self, fields) -> Iterable: | |
yield record | ||
|
||
|
||
class DealToContactAssociationsStream(CRMObjectStream): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vladimir-remar it seems better from a UX standpoint to include the deal-to-contact association as a field on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @sherifnada thanks for the review, about the suggestion make sense for me, I will include the field as "associations", since "contacts" are one of them , for me it would be something like this.
and I will call it in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry I was a little unclear: why wouldn't we include this by default in the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @sherifnada and thanks again. Finally calling CRMObjectStream like this So my question is, at this point what it is the good approach to implement the associations in the current streams? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vladimir-remar that approach (including associations=['contacts']) is the one I'd recommend! |
||
""" | ||
Deals to Contacts associations | ||
""" | ||
entity = "deal" | ||
associations = ["contacts"] | ||
|
||
|
||
class DealPipelineStream(Stream): | ||
"""Deal pipelines, API v1, | ||
This endpoint requires the contacts scope the tickets scope. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,325 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": ["null", "object"], | ||
"properties": { | ||
"id": { | ||
"type": ["null", "string"] | ||
}, | ||
"properties": { | ||
"type": ["null", "object"], | ||
"properties": { | ||
"amount": { | ||
"type": ["null", "string"] | ||
}, | ||
"amount_in_home_currency": { | ||
"type": ["null", "string"] | ||
}, | ||
"closed_lost_reason": { | ||
"type": ["null", "string"] | ||
}, | ||
"closed_won_reason": { | ||
"type": ["null", "string"] | ||
}, | ||
"closedate": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"createdate": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"days_to_close": { | ||
"type": ["null", "string"] | ||
}, | ||
"dealname": { | ||
"type": ["null", "string"] | ||
}, | ||
"dealstage": { | ||
"type": ["null", "string"] | ||
}, | ||
"dealtype": { | ||
"type": ["null", "string"] | ||
}, | ||
"description": { | ||
"type": ["null", "string"] | ||
}, | ||
"engagements_last_meeting_booked": { | ||
"type": ["null", "string"] | ||
}, | ||
"engagements_last_meeting_booked_campaign": { | ||
"type": ["null", "string"] | ||
}, | ||
"engagements_last_meeting_booked_medium": { | ||
"type": ["null", "string"] | ||
}, | ||
"engagements_last_meeting_booked_source": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_acv": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_all_accessible_team_ids": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_all_assigned_business_unit_ids": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_all_owner_ids": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_all_team_ids": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_analytics_source": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_analytics_source_data_1": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_analytics_source_data_2": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_arr": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_closed_amount": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_closed_amount_in_home_currency": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_created_by_user_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_createdate": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"hs_date_entered_9567448": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_9567449": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_appointmentscheduled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_closedlost": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_closedwon": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_contractsent": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_customclosedwonstage": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_decisionmakerboughtin": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_presentationscheduled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_entered_qualifiedtobuy": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_9567448": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_9567449": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_appointmentscheduled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_closedlost": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_closedwon": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_contractsent": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_customclosedwonstage": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_decisionmakerboughtin": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_presentationscheduled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_date_exited_qualifiedtobuy": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_deal_amount_calculation_preference": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_deal_stage_probability": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_deal_stage_probability_shadow": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_forecast_amount": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_forecast_probability": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_is_closed": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_is_closed_won": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_lastmodifieddate": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"hs_latest_meeting_activity": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_likelihood_to_close": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_discount_percentage": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_discount_percentage_enabled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_recurring_billing_period": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_recurring_billing_period_enabled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_recurring_billing_start_date": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_hs_recurring_billing_start_date_enabled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_recurringbillingfrequency": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_line_item_global_term_recurringbillingfrequency_enabled": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_manual_forecast_category": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_merged_object_ids": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_mrr": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_next_step": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_num_target_accounts": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_object_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_predicted_amount": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_predicted_amount_in_home_currency": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_priority": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_projected_amount": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_projected_amount_in_home_currency": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_sales_email_last_replied": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_tcv": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_unique_creation_key": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_updated_by_user_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_user_ids_of_all_notification_followers": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_user_ids_of_all_notification_unfollowers": { | ||
"type": ["null", "string"] | ||
}, | ||
"hs_user_ids_of_all_owners": { | ||
"type": ["null", "string"], | ||
"format": "date" | ||
}, | ||
"hubspot_owner_assigneddate": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"hubspot_owner_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"hubspot_team_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"notes_last_contacted": { | ||
"type": ["null", "string"] | ||
}, | ||
"notes_last_updated": { | ||
"type": ["null", "string"] | ||
}, | ||
"notes_next_activity_date": { | ||
"type": ["null", "string"] | ||
}, | ||
"num_associated_contacts": { | ||
"type": ["null", "string"] | ||
}, | ||
"num_contacted_notes": { | ||
"type": ["null", "string"] | ||
}, | ||
"num_notes": { | ||
"type": ["null", "string"] | ||
}, | ||
"pipeline": { | ||
"type": ["null", "string"] | ||
} | ||
} | ||
}, | ||
"createdAt": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"updatedAt": { | ||
"type": ["null", "string"], | ||
"format": "date-time" | ||
}, | ||
"archived": { | ||
"type": ["null", "boolean"] | ||
}, | ||
"companies": { | ||
"type": ["null", "array"], | ||
"items": { | ||
"type": ["null", "integer"] | ||
} | ||
}, | ||
"contacts": { | ||
"type": ["null", "array"], | ||
"items": { | ||
"type": ["null", "integer"] | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to bump to
0.1.12
also get latest code from master because yesterday was merged a change to Hubspot connector.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vladimir-remar please bump the versions in all required places, to the
0.1.12