APIs & Integrations

PacoVu
Member

Create a call engagement with call disposition and activity type

I am using the engagement v1 endpoint successfully to create a call engagement with the following fields

var params = {
   engagement: {
      active: true,
      type: "CALL",
      timestamp: data.timestamp
   },
   associations: {
      contactIds: [data.contact_id]
   },
   metadata: {
      toNumber: data.to_number,
      fromNumber: data.from_number,
      status: "COMPLETED",
      durationMilliseconds: data.duration,
      body: data.notes
   }
}

 

How can I add the call disposition and activity type to the same post body?

I see the endpoint v2 has different body, but it does not show how to specify the "fromNumber", "toNumber" etc. as in the v1 endpoint
{
   "properties": [
   {
      "name": "hs_engagement_type",
      "value": "CALL"
   },
   {
      "name": "hs_timestamp",
      "value": 1638977095485
   },

   ...

 

Thanks

0 Upvotes
6 Replies 6
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Create a call engagement with call disposition and activity type

Hi @PacoVu ,

Pleas use this api to create :

webdew_0-1640248413977.png

 

https://legacydocs.hubspot.com/docs/methods/engagements/create_engagement

https://legacydocs.hubspot.com/docs/methods/engagements/get-call-dispositions

webdew_1-1640248431286.png


Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.

0 Upvotes
PacoVu
Member

Create a call engagement with call disposition and activity type

As I wrote above, the call type is either "Follow-up" or "Demo". You can specify the value from the UI. But I am not sure how to set it from API call.

Screen Shot 2021-12-11 at 10.31.13 AM.png

0 Upvotes
RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Create a call engagement with call disposition and activity type

Hi @PacoVu ,

 

Thx for the tag @dennisedson !

 

The dispostion can be added to this request when it's the ID or the right Dispostion. 

What kind of Call type do you mean? I cannot find this one in my Hubspot Environment.

 

Regards Ronald

PacoVu
Member

Create a call engagement with call disposition and activity type

Actually I made a guess to add like this, then it works

 

metadata: {
    toNumber: data.to_number,
    fromNumber: data.from_number,
    status: "COMPLETED",
    durationMilliseconds: data.duration,
    body: notes,
    disposition: data.call_disposition
}

 

But I still don't know how and if it's possible to post the call type "Follow-up" or "Demo" at all. I tried type: "Demo", and callType: "Demo" but it does not work.

AbdulQayyum
Participant

Create a call engagement with call disposition and activity type

use call disposition id in the disposition field.

e.g. f240bbac-87c9-4f6e-bf70-924b57d47db7 for Connected outcome.
dennisedson
HubSpot Product Team
HubSpot Product Team

Create a call engagement with call disposition and activity type

@RMones , mind lending a hand here?

0 Upvotes