Wrong owner in report dashboard when using engagement API

SOLVE
Highlighted
Occasional Contributor

Hi all, 

 

We're currently using the Create Engagement API to log calls from our call service. But there is a problem with the report dashboard which only happens lately. I've attached 2 screenshots & as you guys can see, on the report dashboard, the owner is different from the owner on the contact details page. In fact, all of the CALLs in the report dashboard is from the same owner (in this case our admin). 

Report dashboardReport dashboardContact detailsContact details

Here is the API body that we use. The same format has been used since August & it's worked fine. I even go back and re-use one of our requests from August & the same happened. 

{
    "engagement": {
        "active": true,
        "type": "CALL",
        "ownerId": 36291376
    },
    "associations": {
        "contactIds": [
            401
        ]
    },
    "metadata": {
        "toNumber": "0933154456",
        "fromNumber": "112",
        "status": "COMPLETED",
        "body": "[Test CALL] From TienNHA (112) to 0933154456",
        "durationMilliseconds": 1997,
        "disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
    }
}

I hope you guys can help me with this & figure out a fix soon. 

Note: manually call logs are fine

Thank you,

Tien

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Solution
HubSpot Moderator

Hi @tienbk97,

 

Currently, it is not possible for us to edit the default report - Productivity or change the way the Create an Engagement | Engagements API populate the createdBy and modifiedBy properties. On my end, I did try to manually include both the createdBy and modifiedBy properties however as it is being created by an OAuth, the user would still be link to the user who authenticated the app. 

 

That said, maybe what some of your client can do is to include the custom report beside the default report - Productivity

 

Additionally, when creating the custom report, they should be able to filter the engagement activity type to only Call and can further click into the contact who has the associated Call engagement:

 

customReport.png

 

View solution in original post

Reply
0 Upvotes
6 Replies 6
Highlighted
HubSpot Moderator

Hi @tienbk97,

 

This is indeed strange and I wasn't able to reproduce this issue.

 

I tried creating an engagement using this endpoint: Create an Engagement | Engagements API and the following POST body: 

 

{
    "engagement": {
        "active": true,
        "type": "CALL",
        "ownerId": 36291376
    },
    "associations": {
        "contactIds": [
            401
        ]
    },
    "metadata": {
        "toNumber": "0933154456",
        "fromNumber": "112",
        "status": "COMPLETED",
        "body": "[Test CALL] From HubSpot",
        "durationMilliseconds": 1997,
        "disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
    }
}

(where ownerId 36291376 == Tien)

 

I'm able to see that the call I created:

 

Screen Shot 2019-11-26 at 10.49.48 AM.png

 

was reflected correctly on the Productivity report:

 

Screen Shot 2019-11-26 at 10.56.42 AM.png

 

Could you try and see if you're still seeing a mismatched?

Reply
0 Upvotes
Highlighted
Occasional Contributor

Hi @WendyGoh , 

 

Thank you for the response. I tried again with your body & the same thing happens. 

Report dashboardReport dashboardContact detailsContact details

 

But the call that you've logged on 10:48AM is displayed correctly. Is there any diffrent between our requests? I use the OAuth token not API key.

 

Thank again.

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @tienbk97,

 

Ahh, that's the key difference! I was using hapikey. 

 

I believe I'm able to shed some light on this behavior. When using OAuth to create an engagement, it'll populate the createdBy and modifiedBy property and it is set as the user who the app is authenticated to (in this case, I assumed Nam Le was the one that authenticated the app). Whereas if you're using hapikey, it will just create the engagement without those properties as a specific user cannot be tied to a portal hapikey. 

 

The report pulls the person who created the engagement and not the owner of the engagement and so we are seeing Nam Le logged the engagement when the owner is Tien when using OAuth because of the reason stated above. 

 

In this case, I'd recommend you to build a custom report that will show the Owner and not the 'Created By'.

 

As reference from this forum thread: https://community.hubspot.com/t5/APIs-Integrations/Engagement-Owner/td-p/228748 where you can refer to Robert's latest comment. 

 

Let me know if you need further clarification on this!

Reply
0 Upvotes
Highlighted
Occasional Contributor

Hi Wendy, 

 

I've looked through Robert's comment & it said that I should create another report and it'll show the owner instead of created by. That is fine with "chart-like" reports but for some of our clients, they want to use the original "Productivity" report which shows every engagement daily at a glance. They really prefer the details in every engagement (in this case CALLS) instead of just viewing the total count of calls. Is it possible for us to change up the way we call the API to edit engagement "created_by" or is there any setting we can config to edit "productivity" report? 

 

Thank you

Reply
0 Upvotes
Highlighted
Solution
HubSpot Moderator

Hi @tienbk97,

 

Currently, it is not possible for us to edit the default report - Productivity or change the way the Create an Engagement | Engagements API populate the createdBy and modifiedBy properties. On my end, I did try to manually include both the createdBy and modifiedBy properties however as it is being created by an OAuth, the user would still be link to the user who authenticated the app. 

 

That said, maybe what some of your client can do is to include the custom report beside the default report - Productivity

 

Additionally, when creating the custom report, they should be able to filter the engagement activity type to only Call and can further click into the contact who has the associated Call engagement:

 

customReport.png

 

View solution in original post

Reply
0 Upvotes
Highlighted
Occasional Contributor

Hi @WendyGoh ,

 

Thank you so much for your help.

Reply
0 Upvotes