Kustomer.getOpenConversations()
Returns a list of open conversations.
Kustomer.getOpenConversations()
returns a list of open conversations.
First, initialize chat fully
Kustomer Chat must finish initializing fully 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
// Grab open conversations after Kustomer.start()
Kustomer.start({}, () => {
Kustomer.getOpenConversations((conversations, error) => {
console.log(conversations, error);
});
});
Syntax
Kustomer.getOpenConversations(function(conversations, error))
Parameter | Type | Description |
---|---|---|
function(conversations, error) | Function | Optional A callback that is run after Kustomer.getOpenConversations completes.conversations is an array of conversation objects. error is either undefined or a native JavaScript Error object. |
Updated over 3 years ago