Skip to main content

I have been using the Intercom API to try to recreate the regular metrics in Metabase. I have tried using this resource but haven’t found it to be particularly helpful. 

For example, if I try this query, the response maps to the New Conversations Metric in the Intercom dashboard instead of the Assigned Conversations metric which is my intention. 
SELECT
  "Inbox Details - Team Assignee"."inbox_name" AS "Inbox Details - Team Assignee__inbox_name",
  COUNT(*) AS "count"
FROM
  "public"."conversations_data"
 
LEFT JOIN "public"."inbox_details" AS "Inbox Details - Team Assignee" ON "public"."conversations_data"."team_assignee_id" = "Inbox Details - Team Assignee"."inbox_id"
WHERE
  (
    (
      "Inbox Details - Team Assignee"."inbox_name" = 'VIP Support Inbox'
    )
   
    OR (
      "Inbox Details - Team Assignee"."inbox_name" = 'Support'
    )
    OR (
      "Inbox Details - Team Assignee"."inbox_name" = 'VIP Escalation Inbox'
    )
    OR (
      "Inbox Details - Team Assignee"."inbox_name" = 'Escalation Inbox'
    )
  )
 
   AND (
    "public"."conversations_data"."created_at" >= timestamp with time zone '2025-02-27 00:00:00.000 +00:00'
  )
  AND (
    "public"."conversations_data"."created_at" < timestamp with time zone '2025-03-06 00:00:00.000 +00:00'
  )
GROUP BY
  "Inbox Details - Team Assignee"."inbox_name"
ORDER BY
  "Inbox Details - Team Assignee"."inbox_name" ASC

I suspect that not getting the right Assigned Conversations metric is cascading to why my closed conversations, median response time, and others are also wrong. 

It would be super helpful to get the calculations for regular conversation metrics based on the exact fields provided in the API response. 

Hey Hugo👋

 

We have this article the cover some common calculations: 

 

https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/build-your-own-reports

 

That being said it’s known that there may be some discrepancy, this is straight from the team:

There are known discrepancies between in app intercom reporting and our API. Such as:

  • Spam - The API does not include spam/deleted conversations. We do however include them in the app and we do not have a filter that can remove them in the app either.
  • Admin initiated marked as outbound in the api - this use case happens when an end user gives a negative rating to an article through the messenger. The API tags this as outbound whilst our internal reports treat this as inbound. We use properties like first_user_conversation_part_created_at for some of our metrics which would not be populated if the conversation started with an outbound message. The API wouldn’t count these conversations whereas the app would. It could also lead to discrepancies in duration metrics as well if the first_user_part was dated differently.

This can lead to discrepancies between the two. There are also many different factors we use for our time measurement metrics in reporting. FRT can exclude bot inbox which isn't readily available in the API. We always calculate for a users first response in app but in the conversations api its merely from when a conversation first started.

 

Currently however it is difficult to get the same results between the conversations api and our Reporting.”

 

That being said the team is working on a new Reporting api in which should allow customers to create 1-to-1 calculations with the reports using an api. Keep an eye out here for news: https://www.intercom.com/blog/news/ on this feature. “

 

Thanks!