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 6.5.1.

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:

  • Chat: Represents a text-based conversation with an operator or bot.
  • Call: Represents a voice/video call between the user and an operator.

Common Properties

PropertyData TypeDescription
idStringUnique identifier for the conversation.
customConversationIdStringThe custom identifier for the conversation (if applicable).
questionStringThe initial question or message that started the conversation.
attenderIdStringThe ID of the assigned operator (if any).
attenderNameStringThe name of the assigned operator.
attenderEmailStringThe email of the assigned operator.
departmentNameStringThe department handling the conversation.
feedbackStringFeedback provided by the visitor about the conversation.
ratingStringRating provided by the visitor.
queuePositionIntPosition in the queue (if applicable).
mediaMediaMedia details related to the conversation.

SalesIQChatConversation

Represents a chat-based conversation.

Additional Properties

PropertyData TypeDescription
isBotAttenderBooleanIndicates whether the chat is attended by a bot.
statusChat StatusThe current status of the chat.
unreadCountIntNumber of unread messages in the chat.
lastSalesIQMessageSalesIQMessageThe last message exchanged in the conversation.

Chat Status

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.

SalesIQCallConversation

Represents a call-based conversation.

Additional Properties

  • status (Status?): 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

PropertyData TypeDescription
idStringUnique identifier for the media.
endTimeIntThe timestamp when the media session ended.
initiatedByUserTypeIndicates whether the call was started by the visitor or operator.
pickupTimeIntTimestamp when the call was picked up.
connectedTimeIntTimestamp when the call connection was established.
statusStatusThe current status of the media.
endedByUserTypeThe user type that ended the media session.
typeStringThe type of media (e.g., audio, video).
createdTimeIntTimestamp 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 { visitor, operator }

  • visitor: The end-user or customer.
  • operator: The support agent or bot handling the conversation.

SalesIQMessage

Represents an individual message in a chat.

Properties:

PropertyData TypeDescription
senderStringThe sender of the message.
textStringContent of the message.
typeStringType of message (e.g., text, file).
senderIdStringID of the sender.
timeIntTimestamp of the message.
isReadBooleanWhether the message has been read.
sentByVisitorBooleanIndicates if the message was sent by the visitor.
fileSalesIQFileAny file attached to the message.
statusStatusThe message status.

Message Status 

  • 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:

PropertyData TypeDescription
nameStringName of the file.
contentTypeStringType of file (e.g., image, document).
commentStringAny comment associated with the file.
sizeintSize of the file in bytes.

SalesIQConversationAttributes

The SalesIQConversationAttributes data class is designed to store optional metadata for a call, including the user's name, additional information, and a display picture. 

Builder Methods

Parameter:

  • name (String): The user's name.
  • additionalInfo (String): The additional information or notes for the call.
  • displayPicture (Any): The display picture to be shown during the call.
  • departments (List<SalesIQDepartment>): List of SalesIQDepartment entities.

Sets the name attribute for the call.

Copied 
SalesIQConversationAttributes(name: String, additionalInfo: String additionalInfo, displayPicture: Any, departments: List<SalesIQDepartment>)