ZohoSalesIQChatDelegate
The Mobilisten iOS SDK provides a delegate for various chat event callbacks to help developers track different actions performed by the app user.
ZohoSalesIQChatDelegate Implementation
To start receiving various events within the Mobilisten, your class must conform to the ZohoSalesIQChatDelegate protocol. Then, set an instance of your class to the ZohoSalesIQ.Chat.delegate property to set your class as the delegate. The delegate methods give an instance of the SIQVisitorChat class, which contains information related to the chat.
SIQVisitorChat class contains the following properties:
Property | Description |
referenceID | ID of the chat |
question | The question with which the chat was started |
unreadCount | Unread message count of the chat |
feedback | Feedback provided for the chat |
rating | Rating given for the chat |
status | Status of the chat |
attenderID | Unique ID of the chat attender |
isBotAttender | Flag to check if the chat is last attended by a bot |
departmentName | Department to which the chat is connected to |
attenderName | Name of the chat attender |
attenderEmail | Email ID of the chat attender |
lastMessage | Last message in the chat |
lastMessageSender | Name of the last message sender |
lastMessageTime | Time when the last message was sent in chat |
Supported chat event callbacks
Method | Invoked when |
chatOpened: | a new chat is initiated by the user |
chatAttended: | a chat is picked up by an operator or bot |
chatMissed: | a chat goes missed |
chatClosed: | a chat is closed |
chatReopened: | a chat is reopened |
chatRatingRecieved: | a user rate the chat session |
chatFeedbackRecieved: | a user provides feedback about the chat session |
unreadCountChanged: | a unread chat count changes |
Setting the delegate
Copiedlet myChatEventHandler = MyChatEventHandler()
ZohoSalesIQ.Chat.delegate = myChatEventHandler