message.comDevelopers

What is a conversation?

A conversation is the single unit of inbound customer contact in message.com. Every chat, ticket, and phone call is the same kind of object with a thread of messages, a status, an assignee, and a channel field that distinguishes how the contact arrived.

Definition

In traditional support stacks each channel has its own primitive. Live chat tools store "chats". Ticketing tools store "tickets". Phone systems store "calls". The same human contacting you across two channels produces two unrelated rows in two databases.

The conversation primitive collapses those three concepts into one. A conversation has a thread of messages, an assigned agent, a department, a status, and a channel field whose value is chat, ticket, or call. Everything else about the row is identical across channels.

Data model

The Conversations API returns rows shaped like this:

FieldMeaning
idUUID of the conversation.
channelchat, ticket, or call.
statusopen, pending, solved, closed, or spam.
visitorIdThe customer record this thread belongs to.
assignedAgentIdThe agent who currently owns it.
groupIdThe department it is routed to.
versionOptimistic-lock counter for safe concurrent edits.
lastMessageAtTimestamp of the latest message in the thread.

Lifecycle

A conversation moves through a small state machine. The same machine applies to every channel.

  • open is the default after the conversation lands in the queue.
  • pending means the agent is waiting on the customer or a third party.
  • solved is set when the issue is resolved. Solved conversations can be reopened.
  • spam hides the conversation from reports and queues without deleting it.
  • closed is the terminal state after retention rules expire.

Illegal transitions return 409 illegal_status_transition. See PATCH /conversations/:id/status for the allowed graph.

Messages inside a conversation

Each conversation contains a thread of messages. A message has a kind of agent, visitor, system, or internal_note. Chat messages, email replies, and call transcripts all live in the same messages table. The Messages reference documents the full payload shape.

Why the primitive matters

One schema means one queue, one search index, one report. An agent who answered the customer's chat last week sees the customer's incoming call land on the same conversation thread, with the prior chat history scrolled right above it. AI features that draft replies, classify intent, or suggest resolutions get the customer's full cross-channel history as context.

See unified inbox for the product-level consequence of this data model and channel for the field that drives routing logic.

What it is not

A "conversation view" that joins three tables at read time is not a conversation primitive. The consolidation has to happen at the storage layer, otherwise concurrent edits, search, and AI context windows fragment along the same fault lines the data does.