Skip to product menu
Skip to main content

.getChatsWithFilter()

This API lets you obtain a list of chats and additionally provides a filter parameter to let you filter out the type of chats based on their current status.

Parameters:

NameDescription
conversationtypeType of chat that has to be returned

 

ConversationTypeDescription
TYPE_OPENList of all open chats
TYPE_WAITINGList of all chats that are yet to be picked up by an operator
TYPE_CONNECTEDList of all connected chats
TYPE_ENDEDList of all ended chats
TYPE_CLOSEDList of all closed chats
TYPE_MISSEDList of all missed chats

Callbacks:

NameDescription
errorError is returned if an error occurs while using the API. The list of possible error codes returned by the API are listed below.
chatsList of chats

Error Codes:

CodeMessage
500mobilisten not initialized
605mobilisten disabled
604invalid filter type
600no network connection
609salesiq API exception

 

Syntax

CopiedZohoSalesIQ.getChatsWithFilter(
    conversationType: string,
    callback: (error: CallbackError, chats: SalesIQChat[] | null) => void
  );

Example:

CopiedZohoSalesIQ.getChatsWithFilter(ZohoSalesIQ.TYPE_OPEN,(error, chats) => 
{
   //your code
});