threadByExternalId
Fetch a thread by the external ID you assigned it, scoped to a specific customer. Because externalId is only unique per-customer, both customerId and externalId are required. Returns null if no match. Requires the thread:read permission.
threadByExternalId(customerId: ID!, externalId: ID!): ThreadArguments
Returns
The unique identifier of the thread.
The human-readable identifier of the thread, ie T-1234.
The customer involved in this thread.
The title of this thread, which allows to quickly identify what it is about.
The description of this thread.
A short preview of the most recent activity in the thread, updated automatically as new messages arrive. Suitable for displaying in list views.
The priority of the thread: 0 = urgent, 1 = high, 2 = normal, 3 = low.
The external ID of this thread. You can use this field to store your own unique identifier for this thread.
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.
The datetime when the status of this thread was last changed.
The actor who last changed the status of this thread.
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.
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.
Structured details about the current agent status, such as the hand-off reason. The concrete type varies with agentStatus.
The datetime when the agent status of this thread was last changed.
The actor who last changed the agent status of this thread.
Who or what this thread is assigned to.
The datetime when this thread was last assigned to someone or something.
Secondary assignees who are looped in on the thread but are not the primary person responsible. May be users or machine users.
The labels attached to this thread.
The links attached to this thread.
The thread fields attached to this thread.
The thread discussions attached to this thread.
All of the timeline entries in this thread.
Metadata about the first message received from the customer on this thread. Null if no inbound message exists yet.
Metadata about the first message sent to the customer on this thread. Null if no outbound message has been sent yet.
Metadata about the most recent message received from the customer. Null if no inbound message exists yet.
Metadata about the most recent message sent to the customer. Null if no outbound message has been sent yet.
The datetime when this thread was created.
The actor who created this thread.
The datetime when this thread was last updated.
The actor who last updated this thread.
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.
The tenant this thread is associated with.
The tier this thread is associated with. Tiers mandate the SLAs for this thread.
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.
Details about the channel this thread is on.
The participants in this thread.
The survey responses for this thread.
The escalation details for this thread.
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.
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.
The datetime when the thread was imported into Plain. Null if the thread was not created by importThread.
The machine user who imported the thread. Null if the thread was not created by importThread.

