.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:
| Name | Description |
| conversationtype | Type of chat that has to be returned |
| ConversationType | Description |
| TYPE_OPEN | List of all open chats |
| TYPE_WAITING | List of all chats that are yet to be picked up by an operator |
| TYPE_CONNECTED | List of all connected chats |
| TYPE_ENDED | List of all ended chats |
| TYPE_CLOSED | List of all closed chats |
| TYPE_MISSED | List of all missed chats |
Callbacks:
| Name | Description |
| error | Error is returned if an error occurs while using the API. The list of possible error codes returned by the API are listed below. |
| chats | List of chats |
Error Codes:
| Code | Message |
| 500 | mobilisten not initialized |
| 605 | mobilisten disabled |
| 604 | invalid filter type |
| 600 | no network connection |
| 609 | salesiq API exception |
Syntax
CopiedZohoSalesIQ.getChatsWithFilter(
conversationType: string,
callback: (error: CallbackError, chats: SalesIQChat[] | null) => void
);Example:
CopiedZohoSalesIQ.getChatsWithFilter(ZohoSalesIQ.TYPE_OPEN,(error, chats) =>
{
//your code
});