Skip to content

Commit b687ea6

Browse files
authored
Publish POST /fin/escalate in the Preview spec and clarify /fin/ask escalation wording (#608)
1 parent ce34a32 commit b687ea6

1 file changed

Lines changed: 160 additions & 3 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 160 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24658,7 +24658,7 @@ paths:
2465824658
properties:
2465924659
type:
2466024660
type: string
24661-
description: The kind of capability — `procedure` for a runnable procedure, or a static action such as `reply` or `ask`.
24661+
description: The kind of capability — `procedure` for a runnable procedure, or a static action such as `reply`, `ask`, or `escalate`.
2466224662
example: procedure
2466324663
id:
2466424664
type: string
@@ -24741,7 +24741,9 @@ paths:
2474124741
Ask Fin a single, self-contained question and receive one informational answer.
2474224742

2474324743
Unlike a conversation, `/fin/ask` is non-conversational: Fin will not ask follow-up
24744-
questions, will not run procedures, and will not escalate to a human.
24744+
questions, will not run procedures, and will not escalate to a human on its own. You can
24745+
still escalate one yourself with `POST /fin/escalate`; the ask conversation stays closed
24746+
and the handoff is routed separately.
2474524747

2474624748
Fin's answer is delivered asynchronously via the `fin_replied` event. The conversation
2474724749
ends with a `complete` status — there is no `awaiting_user_reply` cycle.
@@ -25280,6 +25282,161 @@ paths:
2528025282
order_id: '98765'
2528125283
settings:
2528225284
email: true
25285+
"/fin/escalate":
25286+
post:
25287+
summary: Escalate to a human
25288+
parameters:
25289+
- name: Intercom-Version
25290+
in: header
25291+
schema:
25292+
"$ref": "#/components/schemas/intercom_version"
25293+
tags:
25294+
- Fin Agent
25295+
operationId: escalateFinConversation
25296+
description: |
25297+
Hand a conversation off to a human teammate. If you use the Intercom Helpdesk, the
25298+
handoff lands in your team inbox.
25299+
25300+
Provide either `conversation_id` or `user`:
25301+
25302+
- `conversation_id` — escalate an existing agent conversation, including one started
25303+
with `/fin/ask`. On the Intercom Helpdesk, Fin by default summarises the conversation
25304+
and opens a new Helpdesk conversation that carries the summary as an internal note;
25305+
the original agent conversation is not reassigned. Configure an escalation Operator
25306+
Workflow to change this default.
25307+
- `user` — escalate on behalf of a user with no prior agent conversation. On the Intercom
25308+
Helpdesk, a new Helpdesk conversation is created for the teammate. Include an optional
25309+
`message` for its first message.
25310+
25311+
In both cases the optional `context` is attached as an internal note (supplied by your
25312+
orchestrating agent, not generated by Fin) alongside any summary.
25313+
25314+
Escalating an existing conversation also sets its AI Agent resolution state to
25315+
`escalated`, readable as `ai_agent.resolution_state` on the Conversations API. This is a
25316+
resolution state, not a billable resolution.
25317+
25318+
On Fin for Platforms there is no Intercom inbox, so an escalation that no workflow
25319+
handles — whether by `conversation_id` or `user` — does not open a Helpdesk
25320+
conversation for a teammate. You are notified with the `escalated` status and hand the
25321+
conversation to a human on your own platform. Escalating by `user` still creates the
25322+
Fin conversation, returned as `intercom_conversation_id`.
25323+
25324+
You are notified over the existing webhook or SSE channel with an `escalated` status
25325+
followed by `complete`. The `complete` status signals that Fin is done; it does not close
25326+
the conversation. On the Intercom Helpdesk it remains open in the human inbox; on Fin for
25327+
Platforms it remains open for whoever handles it on your own platform.
25328+
responses:
25329+
'200':
25330+
description: Conversation escalated successfully
25331+
content:
25332+
application/json:
25333+
examples:
25334+
Existing conversation:
25335+
value:
25336+
conversation_id: ext-123
25337+
status: escalated
25338+
sse_subscription_url: 'https://primary-realtime.intercom-messenger.com/event-stream?channels=fin_agent_api:app123:ext-123&accessToken=eyJhbG...&rewind=2m'
25339+
New conversation:
25340+
value:
25341+
intercom_conversation_id: '987654321'
25342+
status: escalated
25343+
schema:
25344+
type: object
25345+
properties:
25346+
conversation_id:
25347+
type: string
25348+
description: The external ID of the conversation. Returned when you escalate an existing conversation by `conversation_id` (echoed back). When you escalate a `user`, a new conversation is created and only `intercom_conversation_id` is returned.
25349+
example: ext-123
25350+
intercom_conversation_id:
25351+
type: string
25352+
description: The internal Intercom conversation ID. Returned when a new conversation was created for the escalation.
25353+
example: '987654321'
25354+
sse_subscription_url:
25355+
type: string
25356+
description: |
25357+
Optional. A URL to subscribe to Server-Sent Events (SSE) for this conversation, if SSE is enabled. The access token is a JWT with a 3-minute TTL. The token is revoked when Fin sets the conversation to complete status. Includes a `rewind` window so a subscriber that connects after the escalation is processed can still receive the `escalated` and `complete` events.
25358+
example: 'https://primary-realtime.intercom-messenger.com/event-stream?channels=fin_agent_api:app123:ext-123&accessToken=eyJhbG...&rewind=2m'
25359+
status:
25360+
type: string
25361+
enum:
25362+
- escalated
25363+
description: The resulting status of the conversation.
25364+
example: escalated
25365+
'400':
25366+
description: Bad Request
25367+
content:
25368+
application/json:
25369+
examples:
25370+
Neither identifier provided:
25371+
value:
25372+
type: error.list
25373+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
25374+
errors:
25375+
- code: parameter_invalid
25376+
message: Either conversation_id or user must be provided
25377+
Conversation not found:
25378+
value:
25379+
type: error.list
25380+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
25381+
errors:
25382+
- code: parameter_invalid
25383+
message: Conversation not found
25384+
schema:
25385+
"$ref": "#/components/schemas/error"
25386+
'401':
25387+
description: Unauthorized
25388+
content:
25389+
application/json:
25390+
examples:
25391+
Unauthorized:
25392+
value:
25393+
type: error.list
25394+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
25395+
errors:
25396+
- code: unauthorized
25397+
message: Access Token Invalid
25398+
schema:
25399+
"$ref": "#/components/schemas/error"
25400+
requestBody:
25401+
required: true
25402+
content:
25403+
application/json:
25404+
schema:
25405+
type: object
25406+
properties:
25407+
conversation_id:
25408+
type: string
25409+
description: The external ID of the conversation to escalate. Provide this or `user`.
25410+
example: ext-123
25411+
user:
25412+
"$ref": "#/components/schemas/fin_agent_user"
25413+
message:
25414+
type: string
25415+
maxLength: 10000
25416+
description: Optional first message for the new conversation, used only when escalating on behalf of a `user`. Shown to the end-user (unlike `context`, which is an internal note), so don't include sensitive orchestration data. Defaults to "Requesting human support".
25417+
example: I'd like to speak to a human about my refund.
25418+
context:
25419+
type: string
25420+
maxLength: 10000
25421+
description: Optional context for the receiving teammate explaining why the conversation is being escalated. Attached as an internal note, never shown to the user. Avoid including credentials or unnecessary personal data — the note is visible to any teammate with access to the conversation.
25422+
example: Customer is requesting a refund and is frustrated.
25423+
oneOf:
25424+
- required:
25425+
- conversation_id
25426+
- required:
25427+
- user
25428+
examples:
25429+
Escalate an existing conversation:
25430+
value:
25431+
conversation_id: ext-123
25432+
context: Customer is requesting a refund and is frustrated.
25433+
Escalate on behalf of a user:
25434+
value:
25435+
user:
25436+
id: '123456'
25437+
name: John Doe
25438+
email: john.doe@example.com
25439+
message: I need help with my billing issue
2528325440
"/fin/start":
2528425441
post:
2528525442
summary: Start a conversation with Fin
@@ -40606,7 +40763,7 @@ tags:
4060640763

4060740764
 
4060840765

40609-
Orchestrate Fin from your own agent: discover what Fin can do with `/fin/capabilities`, ask a one-shot question with `/fin/ask`, run a specific procedure with `/fin/procedures/{procedure_id}/run`, and continue a conversation with `/fin/reply`. Fin notifies your application of its status and responses through a set of events, delivered via webhooks or Server-Sent Events (SSE).
40766+
Orchestrate Fin from your own agent: discover what Fin can do with `/fin/capabilities`, ask a one-shot question with `/fin/ask`, run a specific procedure with `/fin/procedures/{procedure_id}/run`, continue a conversation with `/fin/reply`, and escalate to a human with `/fin/escalate`. Fin notifies your application of its status and responses through a set of events, delivered via webhooks or Server-Sent Events (SSE).
4061040767

4061140768
 
4061240769

0 commit comments

Comments
 (0)