APIs & Integrations

Gijs_vs
Participant

Incorrect owner ID returned.

SOLVE

Hi All,

 

recently we found that Hubspot sometimes returned engagements (created from email integration) with an unexpected owner ID. In short my colleague Max would send an email and when retrieving this engagement from the API it would return the owner ID of another colleague unrelated to this customer of ours.


I'm having difficulty debugging the cause of this and suspect the problem originates in the email integration. But I am not aware of how to check the owner ID in the Hubspot frontend, so I can not rule out something odd going on in the api itself.

 

 

Code to reproduce this for our enviroment using python 3.6.7, this should display all the

relevant information in a single file called notes.json:

import requests
import json

HAPI_KEY = "[secret]"

# The note effected note = requests.get( f"https://api.hubapi.com/engagements/v1/engagements/2099603313?hapikey={HAPI_KEY}" )
# The owner found in this note based on id (incorrect) wrong = requests.get(
f"https://api.hubapi.com/owners/v2/owners/32236404?hapikey={HAPI_KEY}"
)
# The owner we expect to be returned correct = requests.get(
f"https://api.hubapi.com/owners/v2/owners/32236231?hapikey={HAPI_KEY}"
) # Output the json to a file with open('/tmp/notes.json', 'w+') as f: f.write( json.dumps( { 'note': note.json(), 'owner_retrieved': wrong.json(), 'owner_expected': correct.json(), }, indent=4, ) )

 

Am I retrieving owners / engagements in the wrong manner or is this something out of my control?

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Incorrect owner ID returned.

SOLVE

Hey @Gijs_vs ,

 

It looks like the issue here is that both users have connected max@channable.com to their account. If they connected the inbox to both accounts on accident, the user that connected the inbox accidentally (probably Katharina) should be able to disable and remove the inbox by navigating toSettings > Email Integrations.

View solution in original post

0 Upvotes
4 Replies 4
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Incorrect owner ID returned.

SOLVE

Hey @Gijs_vs ,

 

You mentioned that these engagements were creating by a 3rd party integration, is that correct? The default behavior for engagements created via the API without an explicit owner can be tricky, so I'm wondering if this might be some version of that?

 

It'd be really helpful to have a specific example engagment/owner(s) to take a look at. Could you give me your Hub ID, an Engagement ID, and the expected & incorrect owner IDs?

0 Upvotes
Gijs_vs
Participant

Incorrect owner ID returned.

SOLVE

Hi @Derek_Gervais

 

For our email integration we do not use a third party app, we use the build in hubspot functionality. I recall correctly the settings for this can be found in Settings > Integration > Email Integration.

 

Our Hub id is 4114147 (Channable), The effected engagement ID is 2099603313. On this email we retrieve the owner ID of Katharina (32236404) but we would expect to get the owner ID of Max (32236231). You can also find in the metadata that max is the sender of this email, this is what leads us to expect him as the owner of this engagement.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Incorrect owner ID returned.

SOLVE

Hey @Gijs_vs ,

 

I understand; thank you for clarifying and providing some specific examples. I'm going to dig into this a bit more with my team, since at a first glance I'm not sure what's happening, and what the expected behavior here should be.

 

I'll post here on this thread when I have some more information!

Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Incorrect owner ID returned.

SOLVE

Hey @Gijs_vs ,

 

It looks like the issue here is that both users have connected max@channable.com to their account. If they connected the inbox to both accounts on accident, the user that connected the inbox accidentally (probably Katharina) should be able to disable and remove the inbox by navigating toSettings > Email Integrations.

0 Upvotes