Skip to content

Commit 3891eeb

Browse files
Document POST /procedures/{procedure_id}/proactive_trigger (Preview) (#827)
* Document POST /procedures/{procedure_id}/proactive_trigger (Preview) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Match the proactive trigger entry to the developer docs spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 0345b6d commit 3891eeb

1 file changed

Lines changed: 195 additions & 1 deletion

File tree

‎descriptions/0/api.intercom.io.yaml‎

Lines changed: 195 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39760,6 +39760,141 @@ paths:
3976039760
message: This HITL request has already been fulfilled
3976139761
schema:
3976239762
"$ref": "#/components/schemas/error"
39763+
"/procedures/{procedure_id}/proactive_trigger":
39764+
post:
39765+
summary: Trigger a Fin Procedure for a user
39766+
parameters:
39767+
- name: Intercom-Version
39768+
in: header
39769+
schema:
39770+
"$ref": "#/components/schemas/intercom_version"
39771+
- name: procedure_id
39772+
in: path
39773+
required: true
39774+
description: The ID of the procedure to trigger.
39775+
example: '12345'
39776+
schema:
39777+
type: string
39778+
tags:
39779+
- Procedures
39780+
operationId: triggerProcedure
39781+
description: |
39782+
Start a Fin Procedure on a new conversation for an existing user. Fin sends the user the procedure's opening message and the procedure runs from there.
39783+
39784+
The procedure must have an API trigger. Identify the user by the `user_id` you assigned to them in Intercom. The user must already exist; this endpoint does not create users.
39785+
39786+
If you send a `locale` that Fin does not support for your workspace, the conversation uses your workspace's default language.
39787+
requestBody:
39788+
required: true
39789+
content:
39790+
application/json:
39791+
schema:
39792+
"$ref": "#/components/schemas/trigger_procedure_request"
39793+
examples:
39794+
Trigger for a user:
39795+
value:
39796+
user:
39797+
id: user-456
39798+
Trigger with locale and context:
39799+
value:
39800+
user:
39801+
id: user-456
39802+
locale: fr
39803+
context:
39804+
order_id: ord-789
39805+
plan: premium
39806+
responses:
39807+
'200':
39808+
description: The procedure was triggered.
39809+
content:
39810+
application/json:
39811+
examples:
39812+
Successful response:
39813+
value:
39814+
status: triggered
39815+
conversation_id: '192837465'
39816+
procedure_id: '12345'
39817+
schema:
39818+
"$ref": "#/components/schemas/trigger_procedure_response"
39819+
'400':
39820+
description: Bad Request
39821+
content:
39822+
application/json:
39823+
examples:
39824+
Missing user:
39825+
value:
39826+
type: error.list
39827+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39828+
errors:
39829+
- code: bad_request
39830+
message: user parameter is required
39831+
Missing user ID:
39832+
value:
39833+
type: error.list
39834+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39835+
errors:
39836+
- code: bad_request
39837+
message: user.id is required
39838+
Invalid context:
39839+
value:
39840+
type: error.list
39841+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39842+
errors:
39843+
- code: bad_request
39844+
message: context must be an object
39845+
Not available in this API version:
39846+
value:
39847+
type: error.list
39848+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39849+
errors:
39850+
- code: intercom_version_invalid
39851+
message: Requested resource is not available in current API version
39852+
schema:
39853+
"$ref": "#/components/schemas/error"
39854+
'401':
39855+
"$ref": "#/components/responses/Unauthorized"
39856+
'404':
39857+
description: Not Found
39858+
content:
39859+
application/json:
39860+
examples:
39861+
User not found:
39862+
value:
39863+
type: error.list
39864+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39865+
errors:
39866+
- code: not_found
39867+
message: User Not Found
39868+
Procedure not found:
39869+
value:
39870+
type: error.list
39871+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39872+
errors:
39873+
- code: not_found
39874+
message: Procedure not found
39875+
No API trigger:
39876+
value:
39877+
type: error.list
39878+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39879+
errors:
39880+
- code: not_found
39881+
message: Procedure does not have a api trigger
39882+
schema:
39883+
"$ref": "#/components/schemas/error"
39884+
'422':
39885+
description: Unprocessable Entity
39886+
content:
39887+
application/json:
39888+
examples:
39889+
Procedure cannot be triggered:
39890+
value:
39891+
type: error.list
39892+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
39893+
errors:
39894+
- code: unprocessable_entity
39895+
message: Id matches both a procedure and a Fin skill
39896+
schema:
39897+
"$ref": "#/components/schemas/error"
3976339898
components:
3976439899
schemas:
3976539900
office_hours_time_interval:
@@ -44139,6 +44274,65 @@ components:
4413944274
required:
4414044275
- step_id
4414144276
- attribute_values
44277+
trigger_procedure_request:
44278+
title: Trigger Procedure Request
44279+
type: object
44280+
x-tags:
44281+
- Procedures
44282+
description: Request body for triggering a Fin Procedure for a user.
44283+
properties:
44284+
user:
44285+
type: object
44286+
description: The user to start the procedure for.
44287+
properties:
44288+
id:
44289+
type: string
44290+
description: The `user_id` you assigned to the user in Intercom.
44291+
example: user-456
44292+
required:
44293+
- id
44294+
locale:
44295+
type: string
44296+
description: The language for the conversation, such as `fr`. If omitted,
44297+
or if Fin does not support it for your workspace, your workspace's default
44298+
language is used.
44299+
example: fr
44300+
context:
44301+
type: object
44302+
description: Data about why you are triggering the procedure, made available
44303+
to the procedure as it runs. Send an object of any shape.
44304+
additionalProperties: true
44305+
example:
44306+
order_id: ord-789
44307+
plan: premium
44308+
required:
44309+
- user
44310+
trigger_procedure_response:
44311+
title: Trigger Procedure Response
44312+
type: object
44313+
x-tags:
44314+
- Procedures
44315+
description: The result of triggering a Fin Procedure.
44316+
properties:
44317+
status:
44318+
type: string
44319+
description: Always `triggered`.
44320+
enum:
44321+
- triggered
44322+
example: triggered
44323+
conversation_id:
44324+
type: string
44325+
description: The ID of the conversation the procedure runs on.
44326+
example: '192837465'
44327+
procedure_id:
44328+
type: string
44329+
description: The procedure ID from the request path.
44330+
example: '12345'
44331+
fin_skill_id:
44332+
type: string
44333+
description: The ID of the Fin skill that ran. Returned only when the procedure
44334+
ran as a Fin skill.
44335+
example: '67890'
4414244336
company:
4414344337
title: Company
4414444338
type: object
@@ -60219,7 +60413,7 @@ tags:
6021960413
OAuth token with the `read_write_office_hours` scope.
6022060414
- name: Procedures
6022160415
description: |
60222-
Submit human-collected input to Fin Procedures via the HITL (Human in the Loop) API.
60416+
Trigger Fin Procedures for your users, and submit human-collected input to Fin Procedures via the HITL (Human in the Loop) API.
6022360417

6022460418
&nbsp;
6022560419

0 commit comments

Comments
 (0)