Получить контакт HubSpot от сделки - PullRequest
0 голосов
/ 08 февраля 2020

Я запускаю Zap из HubSport, когда курс переходит на конкретную c стадию. Это сделано для того, чтобы Zapier мог запустить WebHook на моем бэкенде, и я могу получить контактную информацию (адрес электронной почты, имя, другие свойства).

Мне не ясно, что я могу получить контактную информацию из сделки.

Вот API сделки: https://developers.hubspot.com/docs/methods/deals/deals_overview

Вот структура сделки, которую я передаю Webhook:

{
    'closedate': '1575154955284', 
    'createdate': '1573686155284', 
    'days_to_close': '17', 
    'dealId': 'xxxxxxx', 
    'dealname': 'Jeff Chandler - New Deal', 
    'dealstage': 'decisionmakerboughtin', 
    'hs_all_owner_ids': 'xxxxxx', 
    'hs_analytics_source': 'DIRECT_TRAFFIC', 
    'hs_analytics_source_data_1': 'xxxxxxxx', 
    'hs_closed_amount': '0', 
    'hs_closed_amount_in_home_currency': '0', 
    'hs_created_by_user_id': 'xxxxxxxx', 
    'hs_createdate': '1573686157136', 
    'hs_deal_stage_probability': '0.8000000000000000444089209850062616169452667236328125', 
    'hs_is_closed': 'false', 
    'hs_lastmodifieddate': '1581127561944', 
    'hs_object_id': 'xxxxxxxxxx', 
    'hs_sales_email_last_replied': '1577566247000', 
    'hs_updated_by_user_id': 'xxxxxx', 
    'hubspot_owner_assigneddate': 'xxxxxxx', 
    'hubspot_owner_id': 'xxxxxx', 
    'id': 'xxxxxx-decisionmakerboughtin-xxxxxxx', 
    'isDeleted': 'False', 
    'notes_last_contacted': '1577565662000', 
    'notes_last_updated': '1577566247000', 
    'num_associated_contacts': '1', 
    'num_contacted_notes': '12', 
    'num_notes': '16', 
    'pipeline': '', 
    'portalId': ''
}

1 Ответ

0 голосов
/ 08 февраля 2020

Ладно, думаю, я нашел ответ.

API ассоциаций: https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview

Вызов API ассоциаций на моем dealId с типом ассоциации 3 (Контакты), дает мне контактный идентификатор. Boom!

API для типов ассоциаций: https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview

...