Brain Session Number Messages
Access the average number of messages of all, (non) contained and (non) covered Brain sessions.
query BrainSessionNumberMessages(
$accountId: uuid
$deskIds: _uuid
$brainIds: _uuid
$channels: _text
$startDate: timestamp
$endDate: timestamp
$tags: _text
$isTest: Boolean
) {
rows: brain_number_messages(
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_num_messages
average_num_messages_contained
average_num_messages_non_contained
average_num_messages_covered
average_num_messages_non_covered
}
}
Below are some examples of how BrainSessionNumberMessages
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:
{
"data": {
"rows": [
{
"average_num_messages": 3.5872104,
"average_num_messages_contained": 3.4760861,
"average_num_messages_non_contained": 3.7152338,
"average_num_messages_covered": 3.2450407,
"average_num_messages_non_covered": 5.1086917
}
]
}
}