Ratings per interval
Access aggregate statistics about ratings per interval (i.e per day) by executing:
query RatingsInterval(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$startDate: timestamp
$endDate: timestamp
$intervalInDays: interval
$agentIds: _text
$isTest: Boolean
) {
rows: ratings_interval_counts(
args: {
start_time: $startDate
end_time: $endDate
interval_span: $intervalInDays
brain_parent_ids: $brainIds
desk_ids: $deskIds
integration_ids: $integrationIds
brain_versions: $brainVersions
is_test: $isTest
agent_ids: $agentIds
}
) {
date: per_interval
avg_rating
median_rating
num_more_than_3
num_ratings
}
}
Below are some examples of how RatingsInterval
can be called.
- Single Desk
- Multiple Desks
- Multiple Brains
- Specific Agents
- Remove Test Sessions
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c, 51ff88a7-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"agentIds": "{1b28b8ba-c9de-42ac-94ad-564e0c6858c9, 1e47963e-ae46-4821-ae61-10773d1141a2}"
}
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}
Example Result:
{
"data": {
"rows": [
{
"date": "2022-04-16T00:00:00",
"avg_rating": 3.5,
"median_rating": 3,
"num_more_than_3": 130,
"num_ratings": 140
}
{
"date": "2022-04-17T00:00:00",
"avg_rating": 4.2,
"median_rating": 3,
"num_more_than_3": 100,
"num_ratings": 132
}
{
"date": "2022-04-18T00:00:00",
"avg_rating": 4.99,
"median_rating": 4.99,
"num_more_than_3": 98,
"num_ratings": 99
}
]
}
}