Sessions Counts
Access the number of sessions
query SessionsCounts(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$brainVersions: _int4
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isContained: Boolean
$isCovered: Boolean
$isTest: Boolean
$minNumUserMessages: Int
$agentIds: _text
$tags: _text
$events: _text
) {
rows: sessions_counts(
args: {
account_id: $accountId
start_time: $startDate
end_time: $endDate
brain_parent_ids: $brainIds
desk_ids: $deskIds
integration_ids: $integrationIds
brain_versions: $brainVersions
channels: $channels
is_contained: $isContained
is_covered: $isCovered
is_test: $isTest
min_num_user_messages: $minNumUserMessages
agent_ids: $agentIds
tags: $tags
events: $events
}
) {
counts
}
}
Below are some examples of how SessionsCounts
can be called.
- Account
- Multiple Brains
- Multiple Tags
- Multiple Brains & Tags
- Multiple Brains & Not Contained
- Not Covered
{
"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}"
}
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"brainIds": "{a2wv9283-9b53-4d7b-b77d-2650f3a1a99c, 99xx33p9-dfab-44e5-9303-9b2bf13f1c94}",
"isContained": "false",
"startDate": "2023-04-08",
"endDate": "2023-04-17"
}
{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2023-04-08",
"endDate": "2023-04-17",
"isCovered": "false"
}
Example Result:
{
"data": {
"rows": [
{
"counts": 15000
}
]
}
}