Creating Engagements - No Owner displayed

david_pearce
Member

When I create an engagement through the api the owner is not displayed.
If you create an engagement manually in the system then it does display the owner.

Anyone got any ideas where I am going wrong.

{“engagement”: {“active”: true,“ownerId”: 23233370,“type”: “MEETING”,“timestamp”: 1491040800000},“associations”: {“contactIds”: [ ],“companyIds”: [439653274],“dealIds”: [ ],“ownerIds”: [23233370]},“attachments”: [{“id”: 4241968539}],“metadata”: {“body”: “My Notes from The Meeting”,“startTime”: 1491040800000,“endTime”: 1491042600000,“title”: “Meeting Title”}}

0 Upvotes
6 Replies 6
3PETE
HubSpot Employee

@david.pearce what are you getting back for a response from HubSpot?

I just tested it out on my own portal and it worked. Here is my JSON body below. Also in the future if you could format your JSON when posting it will make it much more readable for me.

{
		"engagement": {
			"active": true,
			"ownerId": 15149075,
			"type": "MEETING",
			"timestamp": 1491040800000
		},
		"associations": {
			"contactIds": [ ],
			"companyIds": [],
			"dealIds": [ ],
			"ownerIds": [15149075]
		},
		"metadata": {
			"body": "My Notes from The Meeting",
			"startTime": 1491040800000,
			"endTime": 1491042600000,
			"title": "Meeting Title"
				
		}
		
}
0 Upvotes
david_pearce
Member

Still no joy for me, Here is the response text.

{
“engagement”: {
“id”:315645452,
“portalId”:2293898,
“active”:true,
“createdAt”:1493277690193,
“lastUpdated”:1493277690193,
“ownerId”:23233370,
“type”:“MEETING”,
“timestamp”:1491040800000
},
“associations”:{
“contactIds”:[],
“companyIds”:[439653274],
“dealIds”:[],
“ownerIds”:[23233370],
“workflowIds”:[],
“ticketIds”:[]
},
“scheduledTasks”:[],
“metadata”:{
“startTime”:1491040800000,
“endTime”:1491042600000,
“title”:“Meeting Title”,
“body”:“My Notes from The Meeting”
}
}

0 Upvotes
3PETE
HubSpot Employee

@david.pearce Can you confirm that you have an accurate Owner ID? What is interesting is in the response the owner ID looks properly logged.

0 Upvotes
david_pearce
Member

Hi pmanca

Yes I used the GetOwners api to list all owners and their Id’s so I know its a valid Id code.

Thanks
Dave

0 Upvotes
3PETE
HubSpot Employee

@david.pearce

I have spoken with our engineering team and at the moment the ability to show the User ID is something that can only be set within the UI. One of the reasons being is that the HapiKey or OAuth token does not have a User ID associated to it which is different then the Owner’s ID. The User ID is ultimately what is stored there and not the Owner ID. The difference between a Owner and a User is a User is someone who can log into the system where as a Owner does not have to be a User and can be just a name that is attached to records.

0 Upvotes
david_pearce
Member

OK many thanks for your reply and your help. Its not a show stopper I just need to populate the crm with historical visit reports we have. I can still do this we just wont have the sale man associated to it.

Many thanks
Dave