Skip to content
Get started

Get campaign statistics

campaigns.statistics(id) -> 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
class CampaignStatisticsResponse { statistics }
statistics: { campaign, data_extraction, effort, 5 more}
campaign: { id, agent_name, first_activity_at, 7 more}
id: String
agent_name: String
first_activity_at: untyped
has_activity: bool
is_cancelled: bool
last_activity_at: untyped
max_attempts_per_contact: Float
name: String
status: :draft | :running | :paused | :completed
One of the following:
:draft
:running
:paused
:completed
timezone: String
data_extraction: { fields, intro}
fields: Array[String]
intro: String
effort: { calls_total, inbound_calls, outbound_attempts}
calls_total: Float
inbound_calls: Float
outbound_attempts: Float
funnel: { called, hot_leads, reached, real_exchanges}
called: { count, imported_rows}
count: Float
imported_rows: Float
hot_leads: { count, pct_of_reached}
count: Float
pct_of_reached: Float
reached: { count, inbound, outbound, 2 more}
count: Float
inbound: Float
outbound: Float
overlap: Float
pct_of_called: Float
real_exchanges: { count, pct_of_reached}
count: Float
pct_of_reached: Float
hot_lead_outcomes: Array[String]
inbound: { unique_callers}
unique_callers: Float
leads: { hot, warm}
hot: Array[{ attempt_id, call_id, direction, 5 more}]
attempt_id: String
call_id: String
direction: :inbound | :outbound
One of the following:
:inbound
:outbound
email: String
last_activity_at: untyped
name: String
phone: String
summary: String
warm: Array[{ attempt_id, call_id, direction, 5 more}]
attempt_id: String
call_id: String
direction: :inbound | :outbound
One of the following:
:inbound
:outbound
email: String
last_activity_at: untyped
name: String
phone: String
summary: String
outcome_breakdown: Array[{ count, label, outcome}]
count: Float
label: String
outcome: String

Get campaign statistics

require "revox"

revox = Revox::Client.new(api_key: "My API Key")

response = revox.campaigns.statistics("id")

puts(response)
{
  "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"
      }
    ]
  }
}