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
idstringYesUnique identifier for this conversation record
organization_idstringYesID of the organization that owns this conversation
project_idstringYesID of the project this conversation is associated with
channel_idstringYesID of the deployment channel
deployment_config_idstringYesID of the deployment configuration
channel_identifierstringYesCommunication endpoint (phone number, widget ID, email)
conversation_typeenumYesType of conversation channel. One of OTT_CHAT, TELEPHONY_CALL, SMS, EMAIL, or WHATSAPP.
record_idstring | nullNoExternal record ID for partner systems
provider_message_idstring | nullNoEmail provider message ID
directionenum | nullNoCall direction. One of inbound or outbound.
instruction_config_idstring | nullNoOverride instruction configuration ID
partner_user_idstringNoExternal partner user identifier
model_idstringNoAI model ID for this conversation
user_idnumberNoInternal platform user ID
customer_idstring | nullNoCustomer or contact ID from CRM
statusenum | nullNoCurrent operational status. One of ACTIVE, COMPLETED, FAILED, ABANDONED, or TRANSFERRED.
is_campaignbooleanNofalseWhether part of a marketing campaign
durationInSecondsnumberNo15Duration in seconds
stt_model_idstring | nullNoSpeech-to-Text model ID
tts_model_idstring | nullNoText-to-Speech model ID
resource_urlstring | nullNoCall recording URL
messagesarray | nullNoArray of conversation messages
conversationSummaryConversationSummary | nullNoAI-generated conversation summary
state_historyarray | nullNoAudit trail of status changes
call_transferCallTransfer | nullNoCall transfer details
created_daystringNoCreation day in YYYY-MM-DD format
created_atnumberNoDate.nowUnix timestamp when created
updated_atnumber | nullNoUnix timestamp when last updated
deleted_atnumber | nullNoUnix 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
messageIdstringYesUnique identifier for this message
contentstringYesText content of the message
message_typeenumYesType of sender. One of user or assistant.
timestampDateYesWhen the message was sent
metadataobjectYesAdditional message-specific metadata
idstringNoInternal database ID
created_atnumberNoUnix 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"
}