Conversation Classes
The conversation classes represent and manage chats and calls in SalesIQ, offering structured access to conversation details, messages, media, and participant information.
Classes:
Note: This API is supported from version 10.0.0.
SalesIQConversation
The SalesIQConversation class represents a conversation in Zoho SalesIQ, which can be either a chat or a call. It is a sealed class with the following subclasses:
- SalesIQChat: Represents a text-based conversation with an operator or bot.
- SalesIQCall: Represents a voice/video call between the user and an operator.
Common Properties
Property | Data Type | Description |
---|---|---|
id | String | Unique identifier for the conversation. |
customConversationId | String | The custom identifier for the conversation (if applicable). |
question | String | The initial question or message that started the conversation. |
attenderId | String | The ID of the assigned operator (if any). |
attenderName | String | The name of the assigned operator. |
attenderEmail | String | The email of the assigned operator. |
departmentName | String | The department handling the conversation. |
feedback | String | Feedback provided by the visitor about the conversation. |
rating | String | Rating provided by the visitor. |
queuePosition | Int | Position in the queue (if applicable). |
media | Media | Media details related to the conversation. |
SalesIQConversation.Chat
Represents a chat-based conversation.
Additional Properties
Property | Data Type | Description |
---|---|---|
isBotAttender | Boolean | Indicates whether the chat is attended by a bot. |
status | ChatStatus | The current status of the chat. |
unreadCount | Int | Number of unread messages in the chat. |
lastMessage | SalesIQMessage | The last message exchanged in the conversation. |
ChatStatus
Defines possible statuses for a chat.
public enum Status { WAITING, CONNECTED, MISSED, CLOSED, TRIGGERED, PROACTIVE }
- WAITING: The visitor is waiting for an operator/bot.
- CONNECTED: The chat is active with an operator/bot.
- MISSED: The chat was not attended by an operator/bot.
- CLOSED: The conversation has been closed.
- TRIGGERED: The chat was initiated by a system trigger.
- PROACTIVE: The operator proactively started the conversation.
SalesIQConversation.Call
Represents a call-based conversation.
Additional Properties
- status (SalesIQCallConversationStatus): The current status of the call.
Call Status
Defines possible statuses for a call.
public enum Status { WAITING, CONNECTED, MISSED, CLOSED }
- WAITING: The call is ringing.
- CONNECTED: The call is active.
- MISSED: The call was not answered.
- CLOSED: The call has ended.
SalesIQConversation.Media
Represents media details for a conversation.
Properties
Property | Data Type | Description |
---|---|---|
id | String | Unique identifier for the media. |
endTime | Long | The timestamp when the media session ended. |
initiatedBy | UserType | Indicates whether the call was started by the visitor or operator. |
pickupTime | Long | Timestamp when the call was picked up. |
connectedTime | Long | Timestamp when the call connection was established. |
status | Status | The current status of the media. |
endedBy | UserType | The user type that ended the media session. |
type | String | The type of media (e.g., audio, video). |
createdTime | Long | Timestamp when the media session was created. |
Media Status
Defines possible statuses for a media session.
public enum Status { ENDED, REJECTED, MISSED, CANCELLED, CONNECTED, INVITED, INITIATED, ACCEPTED }
- INVITED: A call invitation has been sent.
- INITIATED: The media session was started.
- ACCEPTED: The call invitation was accepted.
- CONNECTED: The media session is active.
- ENDED: The media session has ended.
- REJECTED: The call invitation was rejected.
- MISSED: The call was not answered.
- CANCELLED: The call was canceled before it was answered.
User Type
Represents the type of user in the conversation.
public enum UserType { USER, AGENT }
- USER: The end-user or customer.
- AGENT: The support agent or bot handling the conversation.
SalesIQMessage
Represents an individual message in a chat.
Properties:
Property | Data Type | Description |
---|---|---|
sender | SalesIQSenderDetails | The sender's name and ID. |
text | String | Content of the message. |
type | String | Type of message (e.g., text, file). |
Id | String | ID of the message. |
time | Long | Timestamp of the message. |
isRead | Boolean | Whether the message has been read. |
sentByUser | Boolean | Indicates if the message was sent by the visitor. |
isEdited | Boolean | Indicates if the message is been edited after sent. |
isDeleted | Boolean | Indicates if the message is been deleted. |
file | SalesIQFile | Any file attached to the message. |
status | SalesIQMessageStatus | The message status. |
SalesIQSenderDetails
Represents the details of the sender of the last message.
Property | Data Type | Description |
---|---|---|
id | String | Unique identifier of the sender. |
name | String | Display name of the sender. |
SalesIQMessageStatus
- SENDING: The message is being sent.
- UPLOADING: The file is being uploaded.
- SENT: The message was successfully sent.
- FAILURE: The message could not be sent.
SalesIQFile
Represents a file attached to a message.
Properties:
Property | Data Type | Description |
---|---|---|
name | String | Name of the file. |
contentType | String | Type of file (e.g., image, document). |
comment | String | Any comment associated with the file. |
size | Long | Size of the file in bytes. |