osmTalk Docs
Campaigns

Analytics & Export

Post-campaign report fields and how to export results.

Every campaign produces a structured report you can read live and export when it's done.

Report endpoint

curl https://api.osmtalk.com/api/campaigns/{id}/report

Returns:

{
  "campaign": {
    "id": "cmp_xxx",
    "name": "Q2 Renewals — Mumbai",
    "status": "completed",
    "totalLeads": 5000,
    "completedLeads": 4985,
    "qualifiedLeads": 612,
    "failedLeads": 15,
    "dncBlockedLeads": 38,
    "startedAt": "...",
    "completedAt": "...",
    "createdBy": "...",
    /* full campaign config */
  },
  "counts": {
    "byStatus": {
      "completed": 4490,
      "voicemail": 380,
      "no_answer": 117,
      "dnc_blocked": 38,
      "failed": 15
    },
    "byDisposition": {
      "qualified": 612,
      "callback": 240,
      "not_interested": 3450,
      "completed": 188
    }
  }
}

Per-lead drill-down

curl "https://api.osmtalk.com/api/campaigns/{id}/leads?limit=1000"

Each row includes:

  • phoneNumber — who was dialed
  • variables — the CSV row's per-call data
  • status — terminal state
  • disposition — business outcome
  • attempts — how many dials were used
  • lastCallId — link to the call record (recording + transcript + analysis)
  • outcome — the post-call analysis JSON (when enabled)

Pair lastCallId with /api/calls/{callId} to fetch the recording URL, transcript, and full analysis.

Funnel calculation

CSV uploaded         → totalLeads
First dial placed    → totalLeads − pending
Caller picked up     → completedLeads + voicemail
Bot reached caller   → completedLeads (excludes voicemail)
Qualified            → qualifiedLeads

Typical metrics teams care about:

KPICalculation
Connect ratecompletedLeads / totalLeads
Pickup rate(completedLeads + voicemail) / totalLeads
Qualification ratequalifiedLeads / completedLeads
Cost per qualified leadtotal ₹ billed for campaign / qualifiedLeads
DNC hit ratedncBlockedLeads / totalLeads (high = clean your list pre-upload)

CSV export

curl "https://api.osmtalk.com/api/campaigns/{id}/leads?limit=50000" \
  | jq -r '.[] | [
      .phoneNumber,
      (.variables.first_name // ""),
      (.variables.company // ""),
      .status,
      .disposition,
      .attempts,
      .lastCallId,
      (.outcome.summary // "")
    ] | @csv' \
  > campaign-results.csv

For larger campaigns, paginate using offset to avoid loading everything in memory.

Recordings + transcripts

For deeper review, fetch each call individually:

curl https://api.osmtalk.com/api/calls/{callId}

You'll get:

  • recordingUrl — 7-day presigned WAV
  • recordingMultiChannelUrl — stereo version if your org enabled multi-channel recording
  • transcript — full conversation as a JSON array
  • analysis — extracted fields + summary + sentiment

Recordings live for recordingRetentionDays (org-level, default 90 days). Export anything you need to keep longer.

Cohort comparisons

Compare per-agent-version performance by running two campaigns side-by-side, each targeting a different agentVersion. Use the qualification rates to pick the winner.

Future: dashboard analytics

Aggregate charts (per-hour pickup, per-day funnel, per-agent-version comparison) are planned for the dashboard. Until then, the report endpoint + per-lead export gives you everything you need to build your own visualizations in Looker / Metabase / Grafana.