getList()
Note: This API is supported from version 0.0.1.
The getList() API fetches the list of conversations and returns the result via the callback.
Return Type: Future<List<SalesIQConversation>>
- Returns: A list of SalesIQConversation objects, either SalesIQCallConversation or SalesIQChatConversation.
Example
CopiedZohoSalesIQCalls.getList().then((calls: Array<SalesIQConversation>) => {
for (let i = 0; i < calls.length; i++) {
let conversation = calls[i];
if (conversation instanceof SalesIQCallConversation) {
console.log("Call " + (i + 1) + ": " + JSON.stringify(conversation, null, 2));
} else if (conversation instanceof SalesIQChatConversation) {
console.log("Chat " + (i + 1) + ": " + JSON.stringify(conversation, null, 2));
}
}
}).catch((error: Error) => {
console.error("Error getting calls list: " + JSON.stringify(error, null, 2));
});