.Chat.getList()

This API is used to get a list of all support chats created by a visitor. The API returns a list of  SIQVisitorChat  objects which contain information for each support chat. The list of chats fetched by this API can optionally be filtered to get the desired set of conversations based on the status using the filter function parameter.

SIQVisitorChat class contains the following properties:

PropertyDescription
referenceIDID of the chat
questionThe question with which the chat was started
unreadCountUnread message count of the chat
feedbackFeedback provided for the chat
ratingRating given for the chat
statusStatus of the chat
attenderIDUnique ID of the chat attender
isBotAttenderFlag to check if the chat is last attended by a bot
departmentNameDepartment to which the chat is connected to
attenderNameName of the chat attender
attenderEmailEmail ID of the chat attender
lastMessageLast message in the chat
lastMessageSenderName of the last message sender
lastMessageTimeTime when the last message was sent in chat

 ChatStatus  shows the status of the chat. A chat can have the following status values:

Chat StatusDescription
ChatStatus.openThe combined list of connected, waiting, triggered and proactive chats
ChatStatus.connectedList of all open chats that are connected to an agent or a bot
ChatStatus.waitingList of all open chats that are yet to be picked up by an operator or a bot
ChatStatus.triggeredList of all triggered chats
ChatsStatus.proactiveList of all proactive chats
ChatStatus.missedList of all missed chats
ChatStatus.closedList of all closed chats
ChatStatus.endedThe combined list of missed and closed chats

Error Handling

CodeDescription
500Mobilisten not initialized
605Mobilisten disabled

 

Usage:


				ZohoSalesIQ.Chat.getList(filter: ChatStatus.open) { (error, chats) in
	//your code goes here
}