.getChatsWithFilter()

This API allows you to programmatically get a list of all chats had by the visitor provided a filter value based on chat status. This API can be used as a source of data to make custom support user interfaces.:

Parameters:

NameDescription
chatTypeStatus of chats to be returned

Chat Properties:

PropertyDatatypeDescription
idStringID of the chat
questionStringThe question with which the chat was initiated
attenderNameStringName of the chat attender
attenderEmailStringEmail of the chat attender
attenderIDStringID of the chat attender
departmentNameStringName of the department to which the chat is associated
feedbackStringFeedback provided for the chat
lastMessageStringLast message in the chat
statusStringThe status of the chat
ratingStringRating given for the chat
unreadCountintUnread message count for the chat
isBotAttenderBooleanFlag to check if the last chat was attended by a bot
lastMessageSenderStringName of the last message sender
lastMessageTimelongTime of the last message in chat

 

ChatTypeDescription
CHATTYPE.OPENList of all open chats
CHATTYPE.WAITINGList of all chats that are yet to be picked up by an operator
CHATTYPE.CONNECTEDList of all connected chats
CHATTYPE.ENDEDList of all ended chats
CHATTYPE.CLOSEDList of all closed chats
CHATTYPE.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 is listed below.
chatsList of chats

Error Codes:

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

Usage

CopiedZohoSalesIQ.getChatsWithFilter(ZohoSalesIQ.CHATTYPE.OPEN, function(chats){
	// your code goes here
}, function(error){
	// your code to handle errors
});