Conversation & Message Objects

Conversations contain the operational support history between Visitors and Team Members. Messages belong to Conversations and can contain text, media, threading information, delivery state, or internal-note metadata.

Conversation Lifecycle

The canonical user-facing Conversation lifecycle contains three states:

OPEN → RESOLVED 

OPEN

The Conversation is active and available for ongoing communication.

RESOLVED

The Conversation has been resolved. Resolution can trigger CSAT behavior when enabled.

CLOSED is a legacy persistence value. It is not a current user-facing Conversation lifecycle state. User-facing APIs, dashboard workflows, and current operational behavior use RESOLVED.

Conversation Object

ConversationRoom represents a Conversation.

FieldTypeRequiredNullableDefaultDescription
idstringYesNoGeneratedConversation identifier.
currentStatusConversationStatusYesNoOPENCurrent Conversation lifecycle state.
workspaceIdstringYesNo—Owning Workspace.
channelIdstringYesNo—Entry-point Channel.
guestIdstringYesNo—Visitor associated with the Conversation.
agentIdstringNoYesnullAssigned Agent, or null when unassigned.
isPinnedbooleanYesNofalseWhether the Conversation is pinned.
pinnedAtISO-8601 timestampNoYesnullPin timestamp.
latestMessageIdstringNoYesnullReference to the latest Message.
metadataConversationMetadataNoYesnullStructured Conversation metadata.
createdAtISO-8601 timestampYesNoGeneratedConversation creation timestamp.
updatedAtISO-8601 timestampYesNoGeneratedLast activity timestamp.

Conversation Metadata

ConversationMetadata contains structured information associated with Conversation state and operational context, including supported summary, priority, and resolution metadata.

Message Object

Message represents an individual message in a Conversation.

FieldTypeRequiredNullableDefaultDescription
idstringYesNoGeneratedMessage identifier.
conversationIdstringYesNo—Parent Conversation.
senderIdstringNoYesnullAuthor User identifier. System-generated messages may not have a sender.
contentstringNoYesnullMessage content. Maximum supported text length is 5,000 characters.
typeMessageTypeYesNoREGULARMessage category.
isInternalNotebooleanYesNofalseIndicates an internal note hidden from Visitors.
statusMessageStatusYesNoSENTCurrent message delivery state.
deliveredAtISO-8601 timestampNoYesnullDelivery timestamp.
seenAtISO-8601 timestampNoYesnullRead timestamp.
parentIdstringNoYesnullParent message for a threaded reply.
mediaIdstringNoYesnullAssociated media asset identifier.
mediaUrlstringNoYesnullMedia delivery URL.
metadataMessageMetadataNoYesnullStructured message metadata.
createdAtISO-8601 timestampYesNoGeneratedMessage creation timestamp.

Message Delivery Lifecycle

PENDING

   ↓

SENT

   ↓

DELIVERED

   ↓

SEEN

SENT / DELIVERED

   ↓

FAILED

Delivery States

StateDescription
PENDINGClient-side optimistic state before server acknowledgment.
SENTMessage has been successfully persisted.
DELIVEREDMessage has been delivered through the supported real-time path.
SEENMessage has been marked as read.
FAILEDMessage transmission or validation failed.

Message Types

ValueDescription
REGULARStandard conversation message.
SYSTEM_PROMPTSystem-generated event or notification message.
AUTOMATED_RESPONSEAutomated response such as a configured welcome or offline message.

Internal Notes

When isInternalNote is true, the message is an internal note intended for Team Members and is not exposed to the Visitor as a public reply.

Message Metadata

MessageMetadata can contain structured objects such as:

MessageButton

FieldTypeDescription
labelstringButton text.
urlstringDestination URL.

MessageAttachment

FieldTypeDescription
fileIdstringUploaded file identifier.
fileNamestringFile name.
fileUrlstringFile access URL.
fileTypestringMIME or file type information.
fileSizenumberFile size.

MessageSystemEvent

FieldTypeDescription
typestringSystem event type.
actorIdstringUser or system actor identifier.
actorNamestringDisplay name of the actor.
targetIdstringTarget entity identifier where applicable.
targetNamestringTarget display name where applicable.

Threading & Attachments

parentId identifies the parent message for threaded replies.

mediaId identifies the associated media asset.

mediaUrl contains the delivery URL associated with the media asset.

Conversation Read State

ConversationReadState tracks per-user read position and unread state.

Typical state information includes:

  • conversationId
  • userId
  • lastSeenAt
  • lastSeenMessageId
  • unreadCount
  • hasUnread

Conversation Assignment Log

ConversationAssignmentLog records Conversation assignment changes.

AssignmentAction values:

  • ASSIGNED
  • UNASSIGNED

Need Help?

Email: support@ysdesk.com

Documentation: https://docs.ysplugins.com/ys-desk

Next