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 8.1.0-beta01.

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.

SalesIQConversation.Chat

Represents a chat-based conversation.

Additional Properties

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

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/bo.
  • MISSED: The chat was not attended by an operator/bo.
  • 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 (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.
endTimeLongThe timestamp when the media session ended.
initiatedByUserTypeIndicates whether the call was started by the visitor or operator.
pickupTimeLongTimestamp when the call was picked up.
connectedTimeLongTimestamp 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).
createdTimeLongTimestamp 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.
timeLongTimestamp 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.
sizeLongSize 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. To simplify object creation, the class includes a Builder pattern, allowing developers to construct instances of SalesIQConversationAttributes in a flexible and readable manner.

SalesIQConversationAttributes.Builder

The SalesIQConversationAttributes.Builder class provides a convenient way to construct a SalesIQConversationAttributes object using a step-by-step method.

Builder Methods

setName

Sets the name attribute for the call.

Copied 
SalesIQConversationAttributes.Builder setName(String name)


Parameter:

  • name (String): The user's name.
setAdditionalInfo

Sets additional information for the call, which can be used for notes or other context.

Copied 
SalesIQConversationAttributes.Builder setAdditionalInfo(String additionalInfo)


Parameter:

  • additionalInfo (String): The additional information or notes for the call.
setDisplayPicture

Sets a display picture for the call. The picture can be a URL, Bitmap, or any drawable resource.

Copied 
SalesIQConversationAttributes.Builder setDisplayPicture(Object displayPicture)


Parameter:

  • displayPicture (Any): The display picture to be shown during the call.
setDepartments

Sets a list of departments to be used for the call. The department can be an ID or name from the SIQDepartment class.

Copied 
SalesIQConversationAttributes.Builder setDepartments(List<SIQDepartment> departments)


Parameter:

departments (List<SIQDepartment>): List of SIQDepartment entities.

build()

Constructs the SalesIQCallAttributes object with the provided attributes.

Copied 
SalesIQConversationAttributes build()


Returns:

SalesIQCallAttributes: The built object containing all set attributes.