Skip to main content
QUERY
threadBySlackPermalink(slackPermalink: String!): Thread

Arguments

Returns

id
ID!

The unique identifier of the thread.

ref
String!

The human-readable identifier of the thread, ie T-1234.

customer

The customer involved in this thread.

title
String!

The title of this thread, which allows to quickly identify what it is about.

description
String

The description of this thread.

previewText
String

A short preview of the most recent activity in the thread, updated automatically as new messages arrive. Suitable for displaying in list views.

priority
Int!

The priority of the thread: 0 = urgent, 1 = high, 2 = normal, 3 = low.

externalId
ID

The external ID of this thread. You can use this field to store your own unique identifier for this thread.

isTestThread
Boolean!

Whether this is a test thread, created for a user to try Plain out against a synthetic customer rather than a real one.

The status of this thread.

statusChangedAt

The datetime when the status of this thread was last changed.

statusChangedBy

The actor who last changed the status of this thread.

statusDetail

Structured details about the current status — for example, when a snoozed thread will wake up, or which linked issue triggered a status change. The concrete type varies with the current status.

agentStatus

The AI agent handling status of this thread: IN_PROGRESS (agent is actively working), HANDED_OFF (agent transferred to a human), or HANDLED (agent resolved it). Null if no agent is involved.

agentStatusDetail

Structured details about the current agent status, such as the hand-off reason. The concrete type varies with agentStatus.

agentStatusUpdatedAt

The datetime when the agent status of this thread was last changed.

agentStatusUpdatedBy

The actor who last changed the agent status of this thread.

assignedTo

Who or what this thread is assigned to.

assignedAt

The datetime when this thread was last assigned to someone or something.

additionalAssignees

Secondary assignees who are looped in on the thread but are not the primary person responsible. May be users or machine users.

labels
[Label!]!

The labels attached to this thread.

The links attached to this thread.

Arguments
threadFields

The thread fields attached to this thread.

threadDiscussions

The thread discussions attached to this thread.

timelineEntries

All of the timeline entries in this thread.

Arguments
first
Int
after
String
last
Int
before
String
firstInboundMessageInfo

Metadata about the first message received from the customer on this thread. Null if no inbound message exists yet.

firstOutboundMessageInfo

Metadata about the first message sent to the customer on this thread. Null if no outbound message has been sent yet.

lastInboundMessageInfo

Metadata about the most recent message received from the customer. Null if no inbound message exists yet.

lastOutboundMessageInfo

Metadata about the most recent message sent to the customer. Null if no outbound message has been sent yet.

createdAt

The datetime when this thread was created.

createdBy

The actor who created this thread.

updatedAt

The datetime when this thread was last updated.

updatedBy

The actor who last updated this thread.

supportEmailAddresses
[String!]!

The support email addresses involved in this thread. A support email address is either the default support email address or an alternate support email address. A support email address is considered to be involved in a thread when any participant in the thread uses it as their email recipient.

tenant

The tenant this thread is associated with.

tier

The tier this thread is associated with. Tiers mandate the SLAs for this thread.

serviceLevelAgreementStatusSummary

Summary of SLA objective statuses for this thread (e.g. whether first-response or next-response time targets are met, breached, or approaching breach). Always present but may show no active trackers if no SLA is linked.

The channel this thread belongs to.

channelDetails

Details about the channel this thread is on.

participants

The participants in this thread.

Arguments
first
Int
after
String
last
Int
before
String
surveyResponse

The survey responses for this thread.

escalationDetails

The escalation details for this thread.

catchupDetail

AI-generated summary and suggested actions for this thread, helping a support agent quickly get up to speed. Null if no catchup has been generated yet.

lockedAt

The datetime when the thread was locked. Null if the thread is currently unlocked.

The user or machine user who locked the thread. Null if the thread is currently unlocked.

importedAt

The datetime when the thread was imported into Plain. Null if the thread was not created by importThread.

importedBy

The machine user who imported the thread. Null if the thread was not created by importThread.

Query
Variables
Response