Skip to content
Get started

Get campaign statistics

client.campaigns.statistics(stringid, RequestOptionsoptions?): CampaignStatisticsResponse { statistics }
GET/campaigns/{id}/statistics

Retrieve the "Statistiques" report for a campaign: the four-tile cascade funnel (appelés → eus en ligne → réels échanges → leads chauds), two secondary tiles, the distribution of exchanges by outcome, the list of hot leads, and data-extraction coverage. All counts are over distinct E.164-normalized phone numbers, and the outcome-based categories derive exclusively from calls.outcome. Cascade percentages are null when their denominator is zero.

ParametersExpand Collapse
id: string
ReturnsExpand Collapse
CampaignStatisticsResponse { statistics }
statistics: Statistics { campaign, data_extraction, effort, 5 more }
campaign: Campaign { id, agent_name, first_activity_at, 7 more }
id: string
agent_name: string | null
first_activity_at: unknown
has_activity: boolean
is_cancelled: boolean
last_activity_at: unknown
max_attempts_per_contact: number | null
name: string
status: "draft" | "running" | "paused" | "completed"
One of the following:
"draft"
"running"
"paused"
"completed"
timezone: string
data_extraction: DataExtraction | null
fields: Array<string>
intro: string
effort: Effort { calls_total, inbound_calls, outbound_attempts }
calls_total: number
inbound_calls: number
outbound_attempts: number
funnel: Funnel { called, hot_leads, reached, real_exchanges }
called: Called { count, imported_rows }
count: number
imported_rows: number
hot_leads: HotLeads { count, pct_of_reached }
count: number
pct_of_reached: number | null
reached: Reached { count, inbound, outbound, 2 more }
count: number
inbound: number
outbound: number
overlap: number
pct_of_called: number | null
real_exchanges: RealExchanges { count, pct_of_reached }
count: number
pct_of_reached: number | null
hot_lead_outcomes: Array<string>
inbound: Inbound { unique_callers }
unique_callers: number
leads: Leads { hot, warm }
hot: Array<Hot>
attempt_id: string | null
call_id: string
direction: "inbound" | "outbound"
One of the following:
"inbound"
"outbound"
email: string | null
last_activity_at: unknown
name: string
phone: string
summary: string | null
warm: Array<Warm>
attempt_id: string | null
call_id: string
direction: "inbound" | "outbound"
One of the following:
"inbound"
"outbound"
email: string | null
last_activity_at: unknown
name: string
phone: string
summary: string | null
outcome_breakdown: Array<OutcomeBreakdown>
count: number
label: string
outcome: string

Get campaign statistics

import Revox from '@revoxai/sdk';

const client = new Revox({
  apiKey: process.env['REVOX_API_KEY'], // This is the default and can be omitted
});

const response = await client.campaigns.statistics('id');

console.log(response.statistics);
{
  "statistics": {
    "campaign": {
      "id": "id",
      "agent_name": "agent_name",
      "first_activity_at": {},
      "has_activity": true,
      "is_cancelled": true,
      "last_activity_at": {},
      "max_attempts_per_contact": 0,
      "name": "name",
      "status": "draft",
      "timezone": "timezone"
    },
    "data_extraction": {
      "fields": [
        "string"
      ],
      "intro": "intro"
    },
    "effort": {
      "calls_total": 0,
      "inbound_calls": 0,
      "outbound_attempts": 0
    },
    "funnel": {
      "called": {
        "count": 0,
        "imported_rows": 0
      },
      "hot_leads": {
        "count": 0,
        "pct_of_reached": 0
      },
      "reached": {
        "count": 0,
        "inbound": 0,
        "outbound": 0,
        "overlap": 0,
        "pct_of_called": 0
      },
      "real_exchanges": {
        "count": 0,
        "pct_of_reached": 0
      }
    },
    "hot_lead_outcomes": [
      "string"
    ],
    "inbound": {
      "unique_callers": 0
    },
    "leads": {
      "hot": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ],
      "warm": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ]
    },
    "outcome_breakdown": [
      {
        "count": 0,
        "label": "label",
        "outcome": "outcome"
      }
    ]
  }
}
Returns Examples
{
  "statistics": {
    "campaign": {
      "id": "id",
      "agent_name": "agent_name",
      "first_activity_at": {},
      "has_activity": true,
      "is_cancelled": true,
      "last_activity_at": {},
      "max_attempts_per_contact": 0,
      "name": "name",
      "status": "draft",
      "timezone": "timezone"
    },
    "data_extraction": {
      "fields": [
        "string"
      ],
      "intro": "intro"
    },
    "effort": {
      "calls_total": 0,
      "inbound_calls": 0,
      "outbound_attempts": 0
    },
    "funnel": {
      "called": {
        "count": 0,
        "imported_rows": 0
      },
      "hot_leads": {
        "count": 0,
        "pct_of_reached": 0
      },
      "reached": {
        "count": 0,
        "inbound": 0,
        "outbound": 0,
        "overlap": 0,
        "pct_of_called": 0
      },
      "real_exchanges": {
        "count": 0,
        "pct_of_reached": 0
      }
    },
    "hot_lead_outcomes": [
      "string"
    ],
    "inbound": {
      "unique_callers": 0
    },
    "leads": {
      "hot": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ],
      "warm": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ]
    },
    "outcome_breakdown": [
      {
        "count": 0,
        "label": "label",
        "outcome": "outcome"
      }
    ]
  }
}