Open/Closed Sessions Interval

Access the number of open and closed sessions per interval (i.e per day) by executing:

query OpenClosedSessionsInterval(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$intervalInDays: interval
$agentIds: _text
$isTest: Boolean
) {
rows: open_closed_sessions_interval_counts_v2(
args: {
start_time: $startDate
end_time: $endDate
interval_span: $intervalInDays
brain_parent_ids: $brainIds
desk_ids: $deskIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
is_test: $isTest
agent_ids: $agentIds
}
) {
closed_sessions
open_sessions
date: per_interval
}
}

Below are some examples of how OpenClosedSessionsInterval can be called.

{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2022-04-08",
"endDate": "2022-04-17",
"intervalInDays": "1 day"
}

Example Result:

{
"data": {
"rows": [
{
"closed_sessions": 1000,
"open_sessions": 13,
"date": "2022-04-14T00:00:00"
},
{
"closed_sessions": 882,
"open_sessions": 11,
"date": "2022-04-15T00:00:00"
},
{
"closed_sessions": 1042,
"open_sessions": 72,
"date": "2022-04-18T00:00:00"
}
]
}
}
Last updated on