Skip to main content

Conversation Configuration

Conversation configurations manage interaction sessions between users and AI agents through various channels (phone, SMS, web chat, email). They track message history, status progression, call metadata, and relationship to deployment configurations.

Source: src/core/conversation/conversation-config.schema.ts


ServiceConversationConfig​

Complete conversation record extending base configuration with conversation-specific identifiers, provider metadata, call direction, recording URLs, and transfer details.

Schema: ServiceConversationConfigSchema

Attributes​

AttributeTypeRequiredDefaultDescription
idstringYes—Unique identifier for this conversation record
organization_idstringYes—ID of the organization that owns this conversation
project_idstringYes—ID of the project this conversation is associated with
channel_idstringYes—ID of the deployment channel
deployment_config_idstringYes—ID of the deployment configuration
channel_identifierstringYes—Communication endpoint (phone number, widget ID, email)
conversation_typeenumYes—Type of conversation channel. One of OTT_CHAT, TELEPHONY_CALL, SMS, EMAIL, or WHATSAPP.
record_idstring | nullNo—External record ID for partner systems
provider_message_idstring | nullNo—Email provider message ID
directionenum | nullNo—Call direction. One of inbound or outbound.
instruction_config_idstring | nullNo—Override instruction configuration ID
partner_user_idstringNo—External partner user identifier
model_idstringNo—AI model ID for this conversation
user_idnumberNo—Internal platform user ID
customer_idstring | nullNo—Customer or contact ID from CRM
statusenum | nullNo—Current operational status. One of ACTIVE, COMPLETED, FAILED, ABANDONED, or TRANSFERRED.
is_campaignbooleanNofalseWhether part of a marketing campaign
durationInSecondsnumberNo15Duration in seconds
stt_model_idstring | nullNo—Speech-to-Text model ID
tts_model_idstring | nullNo—Text-to-Speech model ID
resource_urlstring | nullNo—Call recording URL
messagesarray | nullNo—Array of conversation messages
conversationSummaryConversationSummary | nullNo—AI-generated conversation summary
state_historyarray | nullNo—Audit trail of status changes
call_transferCallTransfer | nullNo—Call transfer details
created_daystringNo—Creation day in YYYY-MM-DD format
created_atnumberNoDate.nowUnix timestamp when created
updated_atnumber | nullNo—Unix timestamp when last updated
deleted_atnumber | nullNo—Unix timestamp when soft-deleted

ConversationSummary​

AI-generated summary capturing the essence of a conversation including key discussion points, follow-up actions, and sentiment analysis.

Schema: ConversationSummarySchema

Attributes​

AttributeTypeRequiredDescription
summarystringYesConcise 1-3 sentence overview of the conversation
key_pointsarray<string>YesImportant discussion topics and decisions
action_itemsarray<string>YesFollow-up tasks and commitments
sentimentenumYesOverall emotional tone. One of POSITIVE, NEGATIVE, NEUTRAL, or MIXED.

Message​

Lightweight message representation used within conversation configurations.

Schema: MessageSchema

Attributes​

AttributeTypeRequiredDefaultDescription
messageIdstringYes—Unique identifier for this message
contentstringYes—Text content of the message
message_typeenumYes—Type of sender. One of user or assistant.
timestampDateYes—When the message was sent
metadataobjectYes—Additional message-specific metadata
idstringNo—Internal database ID
created_atnumberNo—Unix timestamp when created

ConversationStateHistory​

Audit trail recording each status transition throughout a conversation's lifecycle.

Schema: ConversationStateHistorySchema

Attributes​

AttributeTypeRequiredDescription
statusenumYesStatus at this point in the lifecycle. One of ACTIVE, COMPLETED, FAILED, ABANDONED, or TRANSFERRED.
timestampnumberYesUnix timestamp when status was set
reasonstringNoExplanation for the status change
metadataobjectNoAdditional context about the state change

CallTransfer​

Captures metadata about call transfers to human agents including transfer type, timing, destination, and outcome.

Schema: CallTransferSchema

Attributes​

AttributeTypeRequiredDescription
transfer_targetstringYesTarget phone number in E.164 format
transfer_statusenumYesCurrent status. One of pending, completed, failed, or returned.
transfer_typeenum | nullNoTransfer type. One of blind or warm.
transfer_initiated_atnumberNoUnix timestamp when transfer was initiated
transfer_completed_atnumberNoUnix timestamp when transfer completed
transfer_reasonstringNoReason for the transfer

DecommissionConfig​

Request payload for decommissioning and shutting down active conversation services.

Schema: DecommissionConfigSchema

Attributes​

AttributeTypeRequiredDescription
decommission_service_idstringYesService ID of the conversation to decommission

Example​

Service Conversation Config​

{
"id": "conv_abc123",
"organization_id": "org_xyz",
"project_id": "proj_123",
"channel_id": "chan_456",
"deployment_config_id": "deploy_789",
"channel_identifier": "+12125551234",
"conversation_type": "TELEPHONY_CALL",
"direction": "inbound",
"status": "COMPLETED",
"is_campaign": false,
"durationInSeconds": 245,
"stt_model_id": "whisper-v3",
"tts_model_id": "eleven-labs-v2",
"resource_url": "https://storage.example.com/recordings/conv_abc123.mp3",
"conversationSummary": {
"summary": "Customer inquired about product pricing and placed an order.",
"key_points": ["Discussed enterprise pricing", "Confirmed 50-user license"],
"action_items": ["Send invoice by Friday", "Schedule onboarding call"],
"sentiment": "POSITIVE"
},
"state_history": [
{ "status": "ACTIVE", "timestamp": 1709856000000 },
{ "status": "COMPLETED", "timestamp": 1709856245000, "reason": "Issue resolved" }
],
"created_at": 1709856000000,
"updated_at": 1709856245000
}

Call Transfer​

{
"transfer_type": "warm",
"transfer_target": "+12125559876",
"transfer_initiated_at": 1709856120000,
"transfer_completed_at": 1709856135000,
"transfer_status": "completed",
"transfer_reason": "Customer requested billing department"
}