Get campaign statistics
campaigns.statistics(strid) -> CampaignStatisticsResponse
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.
Parameters
id: str
Returns
Get campaign statistics
import os
from revox import Revox
client = Revox(
api_key=os.environ.get("REVOX_API_KEY"), # This is the default and can be omitted
)
response = client.campaigns.statistics(
"id",
)
print(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"
}
]
}
}