Get Cohort Breakdown
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"path": "client_analysis",
"key": "disposition",
"breakdown": [
{
"value": "interested",
"calls": 120,
"connected": 84,
"connection_rate": 0.7,
"goal_rate": 0.625,
"aht_seconds": 41.2
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort breakdown!"
}Get Cohort Breakdown
Get calls, connection rate, goal rate and average handle time for each value of one analytics field, such as a disposition or a custom argument.
GET
/
analytics
/
v4
/
cohort
/
breakdown
Get Cohort Breakdown
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/cohort/breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"path": "client_analysis",
"key": "disposition",
"breakdown": [
{
"value": "interested",
"calls": 120,
"connected": 84,
"connection_rate": 0.7,
"goal_rate": 0.625,
"aht_seconds": 41.2
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch cohort breakdown!"
}Returns the data behind Cohort analysis in Analytics. Take
path and key from Get cohort dimensions.
Notes
path=custom_argsgroups by a variable you sent when placing calls, for examplekey=city.path=retry_countgroups by retry attempt and ignoreskey.goal_rateuses each call’s own version goal and isnullfor values with no scored calls.
Errors
400: a filter is invalid, such as an unknownchannel, a malformed ID, orsub_workspace_idsent from a workspace that isn’t a primary workspace.401:X-API-KEYis missing or invalid.
Query Parameters
Was this page helpful?