Brain Session Duration
Access the average duration of all, (non) contained and (non) covered Brain sessions.
query BrainSessionDuration(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$channels: _text
$startDate: timestamp
$endDate: timestamp
$tags: _text
$isTest: Boolean
$limit: Int
) {
rows: brain_session_duration(
limit: $limit
args: {
start_time: $startDate
end_time: $endDate
account_id: $accountId
brain_parent_ids: $brainIds
desk_ids: $deskIds
channels: $channels
tags: $tags
is_test: $isTest
}
) {
average_duration
average_duration_contained
average_duration_non_contained
average_duration_covered
average_duration_non_covered
}
}
Below are some examples of how BrainSessionDuration
can be called.
- Account
- Multiple Brains
- Multiple Tags
- Brains & Tags
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2023-04-08",
"endDate": "2023-04-17"
}
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2023-04-08",
"endDate": "2023-04-17"
}
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2023-04-08",
"endDate": "2023-04-17",
"tags": "{vip-user, return-order}"
}
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2023-04-08",
"endDate": "2023-04-17",
"tags": "{vip-user, return-order}",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c}"
}
Example Result:
note
The average duration is returned in minutes
{
"data": {
"rows": [
{
"average_duration": 1.2149619,
"average_duration_contained": 1.2467359,
"average_duration_non_contained": 1.1845384,
"average_duration_covered": 0.8906565,
"average_duration_non_covered": 2.4008675
}
]
}
}