KustomerCore.getUnreadCount()
Get the unread counts for all conversations
First, initialize chatYou must initialize with
KustomerCore.init()before you can execute any additional Core SDK methods
Accurate after refreshAfter you call
KustomerCore.sendMessage(), you should also callKustomerCore.markRead()to make sure thisKustomerCore.getUnreadCount()returns the correct data after a refresh.
Examples
// get unread counts
const unreadCounts = KustomerCore.getUnreadCount();Syntax
returnValue = KustomerCore.getUnreadCount();| Parameter | Type | Description |
|---|---|---|
| returnValue | Object | Required An object containing the unread counts. See below for the structure of returnValue. |
returnValue
returnValue// returnValue
{
total: Number,
conversations: {
SOME_CONVERSATION_ID: Number,
OTHER_CONVERSATION_ID: Number,
ANOTHER_CONVERSATION_ID: Number,
}
}Updated 17 days ago