analysis_plan on your agent{
"type": "object",
"properties": {
"sentiment": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"description": "Overall customer sentiment (1=very negative, 10=very positive)"
},
"primary_intent": {
"type": "string",
"enum": ["support", "sales", "complaint", "inquiry", "appointment", "other"],
"description": "Main reason for the call"
},
"topics_discussed": {
"type": "array",
"items": { "type": "string" },
"description": "List of main topics covered in the conversation"
},
"action_items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"task": { "type": "string" },
"assigned_to": { "type": "string", "enum": ["agent", "customer", "other"] }
}
}
},
"customer_satisfied": {
"type": "boolean"
},
"follow_up_needed": {
"type": "boolean"
},
"summary": {
"type": "string",
"description": "Brief summary of the call outcome"
}
}
}messages array defines how the transcript is analyzed. Use placeholders:| Placeholder | Description |
|---|---|
{{schema}} | Your JSON Schema (auto-injected) |
{{transcript}} | Full call transcript |
{{endedReason}} | Why the call ended |
{
"messages": [
{
"role": "system",
"content": "You are a call analyst. Extract structured data from the call transcript according to the provided schema. Return valid JSON only."
},
{
"role": "user",
"content": "Schema: {{schema}}\n\nCall transcript:\n{{transcript}}\n\nThe call ended because: {{endedReason}}"
}
]
}{
"messages": [
{
"role": "system",
"content": "Analyze customer service calls and extract data according to the schema. Guidelines:\n- Sentiment: 1-3 negative, 4-6 neutral, 7-10 positive\n- Only mark resolved=true if the issue was fully addressed\n- Include all mentioned topics, not just the main one"
},
{
"role": "user",
"content": "Schema:\n{{schema}}\n\nTranscript:\n{{transcript}}\n\nCall ended: {{endedReason}}\n\nProvide your analysis as JSON."
}
]
}minMessagesThreshold to skip analysis for very short calls:{
"minMessagesThreshold": 5
}{
"message": {
"type": "end-of-call-report",
"durationSeconds": 84,
"summary": "Klant vroeg naar openingstijden...",
"analysis": {
"sentiment": 8,
"primary_intent": "inquiry",
"topics_discussed": ["openingstijden", "locatie", "parkeren"],
"customer_satisfied": true,
"follow_up_needed": false,
"summary": "Klant kreeg alle gevraagde informatie."
}
}
}{
"schema": {
"type": "object",
"properties": {
"csat_score": { "type": "integer", "minimum": 1, "maximum": 5 },
"would_recommend": { "type": "boolean" },
"pain_points": { "type": "array", "items": { "type": "string" } }
}
}
}{
"schema": {
"type": "object",
"properties": {
"lead_quality": { "type": "string", "enum": ["hot", "warm", "cold"] },
"budget_mentioned": { "type": "boolean" },
"timeline": { "type": "string" },
"decision_maker": { "type": "boolean" },
"products_interested": { "type": "array", "items": { "type": "string" } }
}
}
}{
"schema": {
"type": "object",
"properties": {
"category": { "type": "string", "enum": ["billing", "technical", "account", "product", "other"] },
"priority": { "type": "string", "enum": ["low", "medium", "high", "urgent"] },
"resolution_status": { "type": "string", "enum": ["resolved", "escalated", "pending", "unresolved"] },
"root_cause": { "type": "string" }
}
}
}