Chat.getList ()

This API is used to get a list of all the conversations of a visitor. This API returns an array of VisitorChat objects.

Parameters:

NameDescription
conversationTypeThe type of chat that is required
conversationListenerCallback listener to listen to success and error callbacks

 

ConversationTypeDescription
ConversationType.OPENList of all open chats
ConversationType.WAITINGList of all chats that are yet to be picked up by an operator
ConversationType.CONNECTEDList of chats connected to an operator
ConversationType.CLOSEDList of all closed chats
ConversationType.MISSEDList of all missed chats
ConversationType.ENDEDA combined list of all missed and closed chats

 

Error Codes:

CodesMessage
600no network connection
605mobilisten disabled
609salesIQ api exception

Syntax:

CopiedZohoSalesIQ.Chat.getList(conversationType,conversationListener);

Example:

CopiedZohoSalesIQ.Chat.getList(ConversationType.OPEN, new ConversationListener()
{
    @Override
    public void onSuccess(ArrayList<VisitorChat>chats)
   {
      //your code
   }
    @Override
    public void onFailure(int code, String message)
   {
      //your code 
   }
});