APIs & Integrations

L_P
投稿者

API query number of calls and meetings by user

解決

How to use API to query number of calls and meetings by user?

 

Please direct me to the best endpoint.

 

Thanks!

3件の承認済みベストアンサー
himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hello @L_P,

 

Calls and meetings are stored as an engagement in HubSpot, and associated with objects.

 

You have to call Get associations https://legacydocs.hubspot.com/docs/methods/crm-associations/get-associations endpoint to fetch the associated engagements and have to pass 9 as a definition id as that is the definition id for Contact to engagement https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview

 

Hope this helps!

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology

元の投稿で解決策を見る

himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hello @L_P,

 

Timestamp returned by HubSpot is Time in Milliseconds and you might try this to get it in readable format -

date('Y-m-d h:i:s', floor($timestamp / 1000));

 

There is no data about the status of engagement in the response.

 

To get the rep name using owner id you have to call - /crm/v3/owners/{ownerId}

 

More details here - https://developers.hubspot.com/docs/api/crm/owners

 

Hope this helps,

Digital Marketing & Inbound Expert In Growth Hacking Technology

元の投稿で解決策を見る

himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hi @L_P,

 

You can get the status of the meeting engagement by engagement detail API - https://legacydocs.hubspot.com/docs/methods/engagements/get_engagement

 

You will have details and outcomes in the metadata > meetingOutcome key.

 

Hope this helps!

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology

元の投稿で解決策を見る

7件の返信
L_P
投稿者

API query number of calls and meetings by user

解決

Hello , is it possible to filter the results of the below to only include engagements that were NOT emails? 

Yes I can ignore the emails in the results, but it makes for a lot of processing ,I would prefer to only have calls, meetings, tasks to start with

https://api.hubapi.com/engagements/v1/engagements/recent/modified?hapikey=(apikey)&offset=20

0 いいね!
coryM
メンバー

API query number of calls and meetings by user

解決

@himanshurauthan  
Hi Himanshu, 

 

Is this endpoint deprecated for ownerID? I keep trying to get engaments associated to an "ownerId" But it doesnt give me any result. 
I am using this endpoint with oauth: 
https://api.hubapi.com/crm-associations/v1/associations/<ownerId>/HUBSPOT_DEFINED/9?

Any help would be appriciated. 

0 いいね!
himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hello @L_P,

 

Calls and meetings are stored as an engagement in HubSpot, and associated with objects.

 

You have to call Get associations https://legacydocs.hubspot.com/docs/methods/crm-associations/get-associations endpoint to fetch the associated engagements and have to pass 9 as a definition id as that is the definition id for Contact to engagement https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview

 

Hope this helps!

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology
L_P
投稿者

API query number of calls and meetings by user

解決

Thank you that helps. I'm now getting that result and looping through the JSON in PHP.

 

However I am having difficulty with the timestamps returned. I thought they were Unix but PHP's date conversion is not making sense of them. What format are the timestamps in, what conversion is necessary to make them normal date time? 

 

And, how do you determine if a call / meeting has been completed rather than just planned but not done?

 

And, how do you convert owner id to sales rep name?

 

Thanks!

himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hello @L_P,

 

Timestamp returned by HubSpot is Time in Milliseconds and you might try this to get it in readable format -

date('Y-m-d h:i:s', floor($timestamp / 1000));

 

There is no data about the status of engagement in the response.

 

To get the rep name using owner id you have to call - /crm/v3/owners/{ownerId}

 

More details here - https://developers.hubspot.com/docs/api/crm/owners

 

Hope this helps,

Digital Marketing & Inbound Expert In Growth Hacking Technology
L_P
投稿者

API query number of calls and meetings by user

解決

Thank you, thats a great help. So is there no way whatsoever of finding if the call or meeting was completed?  That seems quite weird as the purpose is to report on sales rep productivity. Scheduling but not completing lots of meetings is not productive... but this seems to be difficult to detect! Is there not even another endpoint I could call on an individual activity to determine if it was done or missed?

himanshurauthan
解決策
ソートリーダー | Elite Partner
ソートリーダー | Elite Partner

API query number of calls and meetings by user

解決

Hi @L_P,

 

You can get the status of the meeting engagement by engagement detail API - https://legacydocs.hubspot.com/docs/methods/engagements/get_engagement

 

You will have details and outcomes in the metadata > meetingOutcome key.

 

Hope this helps!

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology