osmTalk Docs
Agents

Post-Call Analysis

Automatic structured-field extraction, summary, and sentiment after every call.

Post-call analysis runs an LLM against the call transcript right after each call ends and writes structured JSON back to the call record. Useful for lead qualification, sentiment tracking, and automated CRM updates.

What it produces

For each call where analysis is enabled, the agent's chosen analyzer model extracts:

FieldWhen emitted
Your declared schema fields (see below)Always
summaryWhen enableSummary: true (default on) — 2-3 sentence outcome summary
sentimentWhen enableSentiment: true (default on) — positive / neutral / negative
successWhen enableSuccessEvaluation: true — boolean against your successCriteria

Result is stored on calls.analysis as JSON, accessible via the dashboard call-details page or GET /api/calls/:id.

Configure

In the agent config, under Advanced → Post-Call Analysis, or via API:

{
  "postCallAnalysis": {
    "enabled": true,
    "schema": [
      {
        "name": "lead_qualified",
        "type": "boolean",
        "description": "Did the caller express interest in our product?",
        "required": true
      },
      {
        "name": "budget_inr",
        "type": "number",
        "description": "Stated annual budget in Indian Rupees, or null if not stated"
      },
      {
        "name": "next_action",
        "type": "enum",
        "enumValues": ["book_demo", "send_pricing", "callback_later", "not_interested"],
        "description": "What's the next step?",
        "required": true
      },
      {
        "name": "company_name",
        "type": "string",
        "description": "Caller's company name"
      }
    ],
    "summaryPrompt": "Summarize the call in 2-3 sentences focused on what was promised and what happens next.",
    "enableSummary": true,
    "enableSentiment": true,
    "enableSuccessEvaluation": true,
    "successCriteria": "The caller agreed to a demo or provided their email for follow-up",
    "analyzerModel": "gpt-4o-mini"
  }
}

Field types

typeNotes
stringFree text
numberNumeric value (integer or decimal)
booleantrue / false
enumMust also provide enumValues: string[] — analyzer picks one

Set required: true to fail the analysis when a field can't be extracted (the call gets analysisStatus: "failed" in that case).

Analyzer model

By default the analyzer uses the same provider and model as the agent's main LLM. Override via analyzerModel:

  • gpt-4o-mini — cheapest, fast (~₹0.05/call for typical transcripts)
  • gpt-4o — better field-level accuracy
  • claude-haiku-4-5-20251001 — fast, multilingual
  • claude-opus-4-7 — most accurate, expensive

For lead-gen workloads at scale, gpt-4o-mini hits the right cost/accuracy balance.

Sample result

For a 90-second call where the caller agreed to a Friday demo:

{
  "lead_qualified": true,
  "budget_inr": 250000,
  "next_action": "book_demo",
  "company_name": "Acme India",
  "summary": "Caller expressed strong interest in the Pro tier for their 12-person sales team. Confirmed a budget of ₹2.5L/yr. Agreed to a demo at 3pm IST Friday with stakeholder Priya. Will receive a calendar invite within the hour.",
  "sentiment": "positive",
  "success": true
}

Webhook delivery

When the analyzer completes, osmTalk fires an analysis_completed event to your default webhook URL (set under Settings → Webhooks):

{
  "event": "call.analysis_completed",
  "timestamp": "2026-05-06T07:34:21.245Z",
  "call": {
    "id": "call_xxx",
    "agentId": "agent_xxx",
    "agentVersion": 7,
    "organizationId": "org_xxx",
    "channel": "phone",
    "durationSeconds": 92,
    "callerPhone": "+919876543210",
    "recordingUrl": "https://storage.osmtalk.com/...",
    "recordingMultiChannelUrl": null,
    "dynamicVariables": { "first_name": "Arjun" },
    "metadata": { "campaign_id": "..." },
    "campaignId": null,
    "campaignLeadId": null
  },
  "analysis": { /* same shape as above */ }
}

If a webhook secret is configured, requests are signed with X-OsmTalk-Signature: sha256=<hex> over the raw body — verify with HMAC-SHA256.

Pricing impact

Every analyzed call charges the analyzer model's per-token rate against your credit balance. Disable by setting postCallAnalysis.enabled: false if you don't need it.

When to use vs. inline tools

Use post-call analysisUse an HTTP tool inside the call
Extracting data once at the endCapturing fields as they're stated
Sentiment / summary neededReal-time CRM updates
Asynchronous processing OKBot needs the result to decide what to say next
Many fields, complex schemaOne or two values