Skip to main content

MessageThread Object

Description​

A conversation: every message sharing an order, or failing that a sender. Summarised for a list view — the messages themselves are fetched through the messages query using the thread's orderRef.

Declaration​

type MessageThread {
key: ID!
orderId: String
orderIncId: Int
orderRef: ID
subject: String
participants: [String!]!
lastMessage: Message!
messageCount: Int!
unreadCount: Int!
flagged: Boolean!
via: String
updated: Date!
}

Fields​

NameTypeDescription
keyID!Identifier of the conversation. The order reference when the thread belongs to an order, the sender's email otherwise, and the message id for a message with neither.
orderIdStringOrder identifier string shared by the messages in this thread, when it is an order conversation.
orderIncIdIntIncremental numeric identifier of the order, when it is an order conversation.
orderRefIDInternal database reference to the order, when it is an order conversation. Pass it to the messages query to read the conversation itself.
subjectStringSubject of the most recent message in the thread.
participants[String!]!Distinct names of everyone who has written in this thread.
lastMessageMessage!Most recent message in the thread, used as the list preview.
messageCountInt!Total number of messages in the thread.
unreadCountInt!Number of messages in the thread the current user has not read.
flaggedBoolean!Whether any message in the thread is flagged.
viaStringChannel the most recent message arrived through (e.g., "email", "eshop", "discogs").
updatedDate!Date of the most recent message in the thread, which is what the list is sorted by.