APIs & Integrations

Not applicable

Adding call engagement via API - invalid from

SOLVE

I'm adding call engagements to contacts via API. I'm providing two phone numbers: from, and to, as specified in the documentation:

Engagements overview

An overview of engagements and the Engagements API

Zaznaczenie_209

But in the call details it is not reflected properly - I sometimes see somebody's else as the person who made the call. I.e. a call made by different person that I see as my own

How can I set those fields properly?

0 Upvotes
1 Accepted solution
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Adding call engagement via API - invalid from

SOLVE

Hi @gacek, those toNumber and fromNumber fields are internal fields only that can only be pulled from the API. They do not have any implication who's names appear when logging a call. When submitting a call engagement via the API, the part that controls who logs the call (e.g. where it it says in your screenshot "You logged a call") is the ownerId property within the "engagement" object. If you wanted to change who logs the call, you should insert a different ownerId in the property below by finding their internal ID here: https://app.hubspot.com/property-settings/3430672/contact/hubspot_owner_id

"engagement": {
        "active": true,
        "ownerId": 1, <===== this property is the one that controls who logs the call
        "type": "NOTE",
        "timestamp": 1409172644778
    },

The call engagement will always appear on the associated contact specified in the associations sections:

 "associations": {
        "contactIds": [1], <==== contact vid goes here, this is the contact who's timeline the call will always log onto.
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    }

Let me know if I can clarify anything.

View solution in original post

0 Upvotes
3 Replies 3
Not applicable

Adding call engagement via API - invalid from

SOLVE

Another screenshot: improper from and to fields:

Zaznaczenie_208

0 Upvotes
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

Adding call engagement via API - invalid from

SOLVE

Hi @gacek, those toNumber and fromNumber fields are internal fields only that can only be pulled from the API. They do not have any implication who's names appear when logging a call. When submitting a call engagement via the API, the part that controls who logs the call (e.g. where it it says in your screenshot "You logged a call") is the ownerId property within the "engagement" object. If you wanted to change who logs the call, you should insert a different ownerId in the property below by finding their internal ID here: https://app.hubspot.com/property-settings/3430672/contact/hubspot_owner_id

"engagement": {
        "active": true,
        "ownerId": 1, <===== this property is the one that controls who logs the call
        "type": "NOTE",
        "timestamp": 1409172644778
    },

The call engagement will always appear on the associated contact specified in the associations sections:

 "associations": {
        "contactIds": [1], <==== contact vid goes here, this is the contact who's timeline the call will always log onto.
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    }

Let me know if I can clarify anything.

0 Upvotes
Not applicable

Adding call engagement via API - invalid from

SOLVE

OK, thanks. I think it is a bit clearer for me right now

0 Upvotes