getList()
Note: This API is supported from version 10.0.0.
The getList() API fetches the list of conversations and returns the result via the callback.
Parameters:
- completion: A closure that returns the result of retrieving the list of conversations.
- Error: An object describing the failure.
- Conversations: An array of SalesIQConversation objects, each containing the following properties:
- SalesIQCall: Represents a direct call.
- SalesIQChat: Represents a chat converted to a call.
Example
CopiedZohoSalesIQCalls.getList { error, conversations in
if let error = error {
// Handle error: access error.code and error.message for more details
print("Error: \(error.code) - \(error.message)")
} else {
conversations.forEach { conversation in
if let callConversation = conversation as? SalesIQCall {
// Handle call conversation
print("Call ID: \(callConversation.id)")
} else if let chatConversation = conversation as? SalesIQChat {
// Handle chat conversation
print("Chat ID: \(chatConversation.id)")
}
}
}
}