APIs & Integrations

BenGale
Contributor

Conversations SDK Chat Widget unreadCount

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.

0 Upvotes
4 Replies 4
DLypovets
Member

Conversations SDK Chat Widget unreadCount

Still valid problem, that once you load the chat all messages that were received between the last load and the new load are marked as Read automatically, so there is no way to keep communication clear with a customer, except of un case of no responce - using Email.

0 Upvotes
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Conversations SDK Chat Widget unreadCount

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,

Digital Marketing & Inbound Expert In Growth Hacking Technology
0 Upvotes
BenGale
Contributor

Conversations SDK Chat Widget unreadCount

I'm looking for a way to find out an unread count on page load, rather than listening for changes.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Conversations SDK Chat Widget unreadCount

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

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot