Kustomer.getUnreadCount()
Kustomer chat must fully finish initializing with
Kustomer.start()
before you can execute any additional Web SDK methods.Tip: Call other methods inside the callback of
Kustomer.start()
to ensure Kustomer chat always completes initialization before the code tries to run other methods.To learn more, see Troubleshooting: Kustomer method calls won't execute.
Examples
// get unread counts
const unreadCounts = Kustomer.getUnreadCount();
Syntax
const returnValue = Kustomer.getUnreadCount();
Type | Description | |
---|---|---|
returnValue | Object | An object containing the unread counts of conversations. 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 almost 2 years ago