Jul 21, 2022 4:42 AM
I can't see how to access the unread count for the live chat. It doesn't appear to be in the status call and nothing gets returned when I load the chat or open it.
I need to be able to see if there are any unread messages when I load the widget so that I can open it for the user if there are. Currently if they get messages while they have the app closed they have no real way to know that messages are waiting for them because we hide your launcher button because it gets in the way and use our own.
Aug 31, 2022 7:35 AM
Hello @Jaycee_Lewis and @BenGale,
Yes you can listen to unreadConversationCountChanged
event and achieve the mentioned goals.
window.HubSpotConversations.on('unreadConversationCountChanged', payload => {
console.log(New unread count is ${payload.unreadCount}!
);
});
More details here - https://developers.hubspot.com/docs/api/conversation/chat-widget-sdk
Hope this helps,
Aug 31, 2022 7:37 AM
I'm looking for a way to find out an unread count on page load, rather than listening for changes.
Jul 21, 2022 2:54 PM
Hi, @BenGale 👋 Hey @tjoyce @himanshurauthan @DanielSanchez do you have any experience with this type of customization with the Conversations SDK?
Thank you very much! — Jaycee