KustomerCore.getUnreadCount()
Get the unread counts for all conversations
First, initialize chat
You must initialize with
KustomerCore.init()
before you can execute any additional Core SDK methods
Accurate after refresh
After 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 over 3 years ago