Issue with using onUnreadCountChange API method for Badging with a customer launcher

  • 11 January 2024
  • 1 reply

We have created a custom launcher for our web application to access the Intercom Messenger. We are implementing our own custom badging as well and using the onUnreadCountChange Javascript API method. However, when testing the badging functionality, the count seems to be inaccurate. 

For example, if an user has only one active conversation and our agent sends them 4 messages, is the expected return value from unreadCount supposed to be 4? From what we observed, if an user has multiple active conversations, then the unreadCount will then be 2.

We are expecting and would like the unread count to be the total number of unread messages for a customer’s conversation(s). However, it seems as if the unread count is only associated with the number of unread conversations instead.

Could you help clarify this, thanks!





Best answer by cameron.gumley 12 January 2024, 06:38

View original

1 reply

Userlevel 2
Badge +3

Hi @Jonathan Lu -- Cam from the Intercom Engineering Support team!

I know we discussed this in a Messenger chat, but just wanted to reply here so the community was aware of the answer to your question 👍

You are correct - the 'unread' count figure delivered using the Intercom('onUnreadCountChange') method increments based on the number of unread Conversations, rather than the number of unread individual Messages within any/all Conversations.


So, if your agent sends 4 messages to an end-user within 1 Conversation then the 'unread' count will be "1".


At present there just isn't a method to register the number of unread individual Messages, but I can 100% see how it would be a useful capability to have and have submitted an FRQ to our Product Development team for this type of capability! Hopefully this is something we see added at some point in the future 🙏