Outcome Breakdown
curl --request GET \
--url https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"outcomes": [
{}
],
"total": 123
}
}Metrics
Outcome Breakdown
Get detailed breakdown of interaction outcomes
GET
/
api
/
v1
/
metrics
/
outcomes
Outcome Breakdown
curl --request GET \
--url https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdoppel.ai/api/v1/api/v1/metrics/outcomes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"outcomes": [
{}
],
"total": 123
}
}Outcome Breakdown
Returns a detailed breakdown of interaction outcomes, showing how many interactions resulted in each outcome type. Use this to understand your conversion rates and identify opportunities for improvement.Request
GET https://api.getdoppel.ai/api/v1/metrics/outcomes
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
date_from | string | 30 days ago | Start date (ISO 8601) |
date_to | string | Today | End date (ISO 8601) |
clinic_id | string | - | Filter by clinic UUID |
channel | string | - | Filter by channel: voice or whatsapp |
type | string | - | Filter by interaction type |
Response
boolean
Whether the request was successful
object
Outcome Object
| Field | Type | Description |
|---|---|---|
outcome | string | Outcome identifier |
label | string | Human-readable outcome name |
count | integer | Number of interactions with this outcome |
percentage | number | Percentage of total (0-100) |
Common Outcomes
Outcome values are UPPERCASE. Use these exact values when filtering interactions.
| Outcome | Description |
|---|---|
APPOINTMENT_BOOKED | New appointment was scheduled |
APPOINTMENT_MODIFIED | Existing appointment was rescheduled |
APPOINTMENT_CANCELLED | Appointment was cancelled |
NO_ANSWER | Call was not answered |
VOICEMAIL_REACHED | Call went to voicemail |
CALLBACK_REQUESTED | Patient requested a callback |
DECISION_PENDING | Patient needs more time to decide |
OPT_OUT | Patient opted out of communications |
UNREACHABLE | Unable to reach patient |
Examples
Basic Request
curl -X GET "https://api.getdoppel.ai/api/v1/metrics/outcomes" \
-H "Authorization: Bearer dpl_live_YOUR_API_KEY"
const response = await fetch('https://api.getdoppel.ai/api/v1/metrics/outcomes', {
headers: {
'Authorization': 'Bearer dpl_live_YOUR_API_KEY'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.getdoppel.ai/api/v1/metrics/outcomes',
headers={'Authorization': 'Bearer dpl_live_YOUR_API_KEY'}
)
data = response.json()
Filter by Channel
Get outcome breakdown for voice calls only:curl -X GET "https://api.getdoppel.ai/api/v1/metrics/outcomes?channel=voice" \
-H "Authorization: Bearer dpl_live_YOUR_API_KEY"
const response = await fetch(
'https://api.getdoppel.ai/api/v1/metrics/outcomes?channel=voice',
{
headers: {
'Authorization': 'Bearer dpl_live_YOUR_API_KEY'
}
}
);
import requests
response = requests.get(
'https://api.getdoppel.ai/api/v1/metrics/outcomes',
params={'channel': 'voice'},
headers={'Authorization': 'Bearer dpl_live_YOUR_API_KEY'}
)
Filter by Interaction Type
Get outcomes for campaign outbound calls:curl -X GET "https://api.getdoppel.ai/api/v1/metrics/outcomes?channel=voice&type=CAMPAIGN_OUTBOUND" \
-H "Authorization: Bearer dpl_live_YOUR_API_KEY"
const response = await fetch(
'https://api.getdoppel.ai/api/v1/metrics/outcomes?channel=voice&type=CAMPAIGN_OUTBOUND',
{
headers: {
'Authorization': 'Bearer dpl_live_YOUR_API_KEY'
}
}
);
import requests
response = requests.get(
'https://api.getdoppel.ai/api/v1/metrics/outcomes',
params={
'channel': 'voice',
'type': 'CAMPAIGN_OUTBOUND'
},
headers={'Authorization': 'Bearer dpl_live_YOUR_API_KEY'}
)
Response Example
{
"success": true,
"data": {
"outcomes": [
{
"outcome": "APPOINTMENT_BOOKED",
"label": "Appointment Booked",
"count": 320,
"percentage": 25.6
},
{
"outcome": "NO_ANSWER",
"label": "No Answer",
"count": 280,
"percentage": 22.4
},
{
"outcome": "APPOINTMENT_MODIFIED",
"label": "Appointment Modified",
"count": 200,
"percentage": 16.0
},
{
"outcome": "VOICEMAIL_REACHED",
"label": "Voicemail Reached",
"count": 150,
"percentage": 12.0
},
{
"outcome": "CALLBACK_REQUESTED",
"label": "Callback Requested",
"count": 100,
"percentage": 8.0
},
{
"outcome": "DECISION_PENDING",
"label": "Decision Pending",
"count": 80,
"percentage": 6.4
},
{
"outcome": "OPT_OUT",
"label": "Opt Out",
"count": 70,
"percentage": 5.6
},
{
"outcome": "UNREACHABLE",
"label": "Unreachable",
"count": 50,
"percentage": 4.0
}
],
"total": 1250
},
"request_id": "req_abc123xyz",
"timestamp": "2024-01-15T10:30:00.000Z"
}
Use Cases
Conversion Funnel Analysis
Calculate conversion rates from your outcomes:async function getConversionMetrics(apiKey, dateFrom, dateTo) {
const response = await fetch(
`https://api.getdoppel.ai/api/v1/metrics/outcomes?date_from=${dateFrom}&date_to=${dateTo}`,
{
headers: { 'Authorization': `Bearer ${apiKey}` }
}
);
const { data } = await response.json();
const outcomes = Object.fromEntries(
data.outcomes.map(o => [o.outcome, o.count])
);
const contacted = data.total - (outcomes.NO_ANSWER || 0) - (outcomes.VOICEMAIL_REACHED || 0);
const converted = outcomes.APPOINTMENT_BOOKED || 0;
return {
totalAttempts: data.total,
contactRate: ((contacted / data.total) * 100).toFixed(1),
conversionRate: ((converted / data.total) * 100).toFixed(1),
contactToConversion: ((converted / contacted) * 100).toFixed(1)
};
}
Compare Channels
Compare outcome performance between voice and WhatsApp:import requests
def compare_channel_outcomes(api_key):
channels = ['voice', 'whatsapp']
results = {}
for channel in channels:
response = requests.get(
'https://api.getdoppel.ai/api/v1/metrics/outcomes',
params={'channel': channel},
headers={'Authorization': f'Bearer {api_key}'}
)
data = response.json()['data']
# Find APPOINTMENT_BOOKED outcome
scheduled = next(
(o for o in data['outcomes'] if o['outcome'] == 'APPOINTMENT_BOOKED'),
{'percentage': 0}
)
results[channel] = {
'total': data['total'],
'conversion_rate': scheduled['percentage']
}
return results
# Usage
comparison = compare_channel_outcomes('dpl_live_YOUR_API_KEY')
print(f"Voice conversion: {comparison['voice']['conversion_rate']}%")
print(f"WhatsApp conversion: {comparison['whatsapp']['conversion_rate']}%")
Related Endpoints
Metrics Summary
Get high-level KPIs and totals.
Daily Metrics
Track outcomes over time with daily data.