Post-conversation
An Exchange records a conversation with an Assistant. Read its transcript, events, resources, and extracted data through the API, or use Hooks to trigger workflows after completion.
Overview
At call startup, the system registers an Exchange with status: "inProgress". After the conversation ends, it updates the Exchange to status: "completed" with its messages, events, duration, and any recording or extracted data. Entity changes can trigger automated workflows.
Note
Integration API keys can query and read Exchanges but cannot create, update, or delete them. If registration at call startup fails, the system attempts to create the completed record at the end.
The Exchange entity
A running conversation has status: "inProgress". Final conversation data becomes available when the Exchange has status: "completed".
Field descriptions
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) for the Exchange |
status | string | Conversation status: "inProgress" or "completed" |
type | string | Conversation type (e.g., "voice") |
messages | array | Conversation messages - see Messages |
events | array | Timeline of conversation events - see Events |
resources | array | Configuration metadata and media references - see Resources |
data | object or null | Structured data extracted after the conversation |
projectId | string | Reference to the parent Project |
organizationId | string | Reference to the parent Organisation |
createdAt | Date | Timestamp when the Exchange was created |
updatedAt | Date | Timestamp of the last update |
Exchange example
This response excerpt records a technical support call:
Code
Post-conversation processing with the Hook service
The Hook Service triggers Processes registered for conversational.exchange and the matching entity event. A normal call produces a CREATE event at startup and an UPDATE event on completion. For post-conversation processing, register UPDATE and have the Process check that status is "completed" before running its actions.
How it works
- The system updates the Exchange with final conversation data.
- The Hook Service finds Hooks registered for
conversational.exchangeand theUPDATEevent. - Matching Processes run in parallel with the Exchange data as context. Add a Rule to each Process that checks for
status: "completed"before running further steps.
The Process entity
A Process contains the workflow steps the Hook Service executes:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) for the Process |
name | string | Human-readable name for the Process |
description | string | Description of what the Process does |
steps | array | Array of workflow steps to execute |
projectId | string | Reference to the parent Project |
organizationId | string | Reference to the parent Organisation |
Registering a Process for post-conversation processing
To trigger a Process when a conversation ends, create a Hook that links the Process to the conversational.exchange entity and the UPDATE event:
Code
When the completed Exchange is saved, the Hook Service executes the linked Process with the Exchange data as context. To also handle the fallback where startup registration failed and the completed record is created at the end, subscribe to both CREATE and UPDATE and keep the completed-status check in the Process.
See Workflows for the available step types and execution instructions.
Reading Exchanges via API
Query the Exchange API to retrieve conversation history, analyse patterns, or export data.
Common query patterns
Get all Exchanges for a Project:
Code
Get Exchanges by status:
Code
Get a specific Exchange by ID:
Code