# Pre-aggregated indicators

## Introduction

The metrics query provides aggregated performance indicators based on conversations handled on the iAdvize platform.

It is ideal for tracking trends, performance, and outcomes over defined timeframes. This endpoint is not designed for real-time data retrieval, but rather to extract historical KPI summaries for reporting purposes.

Here is the [link](https://graphql.iadvize.dev/queries/metrics) to the publicly available schema.

## What data is available

You can request metrics such as:

* Number of conversations
* Message count (sent, received)
* First response time (reactivity)
* Resolution time/Handling duration
* Conversion info\*
* And many other KPIs related to chat performance (see below)\\

Metrics can be grouped and segmented to give contextual meaning (e.g., per agent, per engagement campaign, routing group etc.).

{% hint style="info" %}
\*make sure you read the info available [here](https://docs.iadvize.dev/use-cases/data-and-analytics/retrieve-messages-exchanged-within-a-conversation-1/understand-transaction-data) regarding transaction
{% endhint %}

## Available filters

You can filter your data using the following criteria :

{% hint style="info" %}
NB: each indicator has its specific filters - please refer to our documentation to know which filter can be applied for each indicator\\
{% endhint %}

* `interval` (required): start and end timestamps
  * from: “insert date format [ISO8601](https://en.wikipedia.org/wiki/ISO_8601)” (ex: “2025-03-01T00:00:00Z”)
  * to: “insert date format [ISO8601](https://en.wikipedia.org/wiki/ISO_8601)”
* `userGroupIds`: filter by group
* `userIds`: filter by specific agent(s) - including bots
* `channels`: filter by campaign
* `routingRuleIds`: filter by routing rules
* `routingGroupIds`: filter by routing groups
* `projectIds`: filter by project\\

You can also use the interval argument to aggregate results over:\\

* `hour`
* `day`
* `week`
* `month`\\

## Good to know

* This query is optimized for reporting.
* The platform already provides real-time dashboards, so this query is best used for periodic exports and historical analysis.
* Channels include: CHAT, ….

\
List of available metrics
-------------------------

### **agentAvailabilityMetric**

Filters available listed [here](https://graphql.iadvize.dev/types/MetricAgentAvailabilityFiltersInput).

List of metrics available on this resource:

| Indicator                                             | Description                                                                                                                    | Channels availability\* |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| CONTACT\_PER\_HOUR\_NUMBER                            | Average number of contacts processed by all agents for an hour of production.                                                  | All                     |
| MAX\_AND\_PARTIAL\_OCCUPATION\_DURATION               | Period during which an agent is connected to the panel and is occupied partially or to the maximum.                            | All                     |
| <p>MAX\_AND\_PARTIAL\_OCCUPATION\_RATE</p><p><br></p> | Part of production time during which an agent is connected to the panel and is occupied partially or to the maximum.           | All                     |
| MAX\_OCCUPATION\_DURATION                             | Period during which an agent is connected to the panel and is occupied to maximum capacity.                                    | All                     |
| MAX\_OCCUPATION\_RATE                                 | Part of production time during which an agent is connected to the panel and is occupied to a maximum.                          | All                     |
| NON\_OCCUPATION\_DURATION                             | <p>Period of time during which an agent is connected to the panel and is simultaneously available and not busy.</p><p><br></p> | All                     |
| NON\_OCCUPATION\_RATE                                 | Part of production time during which an agent is connected to the panel and is simultaneously available and not busy.          | All                     |
| NON\_PRODUCTION\_DURATION                             | Period during which an agent is connected to the panel, unavailable and yet not busy.                                          | All                     |
| NON\_PRODUCTION\_RATE                                 | Proportion of connection time during which an agent is connected to the panel, unavailable and yet not busy.                   | All                     |
| OCCUPATION\_DURATION                                  | Period during which an agent is connected to the panel, unavailable and yet not busy.                                          | All                     |
| OCCUPATION\_RATE                                      | Part of production time during which an agent is connected to the panel and is partially busy.                                 | All                     |
| PRESENCE\_DURATION                                    | Total period during which the agents were connected to the desk.                                                               | All                     |
| PRODUCTION\_DURATION                                  | Period during which an agent is connected to the panel and is available or busy.                                               | All                     |
| <p>PRODUCTION\_RATE</p><p><br></p>                    | Proportion of connection time during which an agent is connected to the panel and is available or busy.                        | All                     |
| TRANSACTION\_AFTER\_CONTACT\_AMOUNT\_PER\_HOUR        | Average turnover generated by an agent after a contact on an hourly basis                                                      | All                     |

## <sub>agentGroupAvailability</sub>

Filters available listed [here](https://graphql.iadvize.dev/types/MetricAgentGroupAvailabilityFiltersInput).

| Indicator                                             | Description                                                                                                              | Channels availability |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| <p>AGENT\_MAX\_NUMBER</p><p><br></p>                  | Maximum number of agents connected simultaneously to the desk. Computed for a group over a minimum period of one hour.   | All                   |
| <p>CONTACT\_PER\_HOUR\_AVERAGE\_NUMBER</p><p><br></p> | Average number of contacts processed by all agents for an hour of production.                                            | All                   |
| <p>NON\_PRESENTATION\_DURATION</p><p><br><br></p>     | Period during which buttons are not displayable. Length of the time slot covered with no agent available.                | All                   |
| NON\_PRESENTATION\_RATE                               | Part of period smoothed duration during which buttons are not displayable                                                | All                   |
| <p>PRESENCE\_SMOOTHED\_DURATION</p><p><br></p>        | Period during which operators were connected. Length of the time slot covered with at least one agent present.           | All                   |
| PRESENTATION\_DURATION                                | Period during which buttons are displayable. Length of the time slot covered with at least one agent available.          | All                   |
| PRESENTATION\_RATE                                    | Part of period smoothed duration during which buttons are displayable                                                    | All                   |
| PRODUCTION\_SMOOTHED\_DURATION                        | Period during which operators were in production. Length of the time slot covered with at least one agent in production. | CHAT, CALL, VIDEO     |

## <sub>contactOpportunitiesMetric</sub>

Filters available listed [here](https://graphql.iadvize.dev/types/MetricContactOpportunitiesFiltersInput).

| Indicator                                                         | Description                                                                                                              | Channels availability |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| <p>CONTACT\_MISSED\_NUMBER</p><p><br></p>                         | Estimated number of missed contact opportunities because the agents were totally busy, offline or not in production.     | CHAT, VIDEO, CALL     |
| <p>CONTACT\_MISSED\_WITH\_BUSY\_AGENTS\_NUMBER</p><p><br><br></p> | Estimated number of missed contact opportunities due to agents being totally busy.                                       | CHAT, VIDEO, CALL     |
| <p>CONTACT\_MISSED\_WITH\_NO\_AGENTS\_NUMBER</p><p><br><br></p>   | <p>Estimated number of contacts missed because the agents were either not connected or not in production.</p><p><br></p> | CHAT, VIDEO, CALL     |

## <sub>contactsMetric</sub>

Filters available listed [here](https://graphql.iadvize.dev/types/MetricContactsFiltersInput).

| Indicator                                                                 | Description                                                                                                                                              | Channels availability                                                                                                                  |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| <p>CONTACT\_ANSWERED\_AFTER\_FIRST\_MESSAGE\_DURATION</p><p><br><br></p>  | Average response time between conversation push event (assignation to an agent or expert) and the first agent's answer.                                  | <p>CHAT,<br>FACEBOOK, FACEBOOK\_BUSINESS\_ON\_MESSENGER,<br>APPLE\_BUSINESS\_CHAT,<br>SMS, GOOGLE\_BUSINESS\_MESSAGES,<br>WHATSAPP</p> |
| <p>CONTACT\_ANSWERED\_DURATION</p><p><br></p>                             | Average response time between a customer's request and the agent's response.                                                                             | <p>CHAT,<br>FACEBOOK, FACEBOOK\_BUSINESS\_ON\_MESSENGER,<br>APPLE\_BUSINESS\_CHAT,<br>SMS, GOOGLE\_BUSINESS\_MESSAGES,<br>WHATSAPP</p> |
| <p>CONTACT\_CLOSED\_AFTER\_LAST\_MESSAGE\_DURATION</p><p><br><br><br></p> | <p>Average amount of time between the visitor's last message and the closing of the chat discussion on the panel.</p><p><br></p>                         | <p>CHAT,<br>FACEBOOK, FACEBOOK\_BUSINESS\_ON\_MESSENGER,<br>APPLE\_BUSINESS\_CHAT,<br>SMS, GOOGLE\_BUSINESS\_MESSAGES,<br>WHATSAPP</p> |
| CONTACT\_DURATION                                                         | <p>Average length of all contacts, the length of a contact being defined as the difference between the end time (closure) and start time.</p><p><br></p> | All                                                                                                                                    |
| <p>CONTACT\_NUMBER</p><p><br></p>                                         | Number of contacts initiated during the selected period.                                                                                                 | All                                                                                                                                    |
| <p>CONTACT\_RECEIVED\_MESSAGE\_NUMBER</p><p><br></p>                      | Total number of messages within a conversation received by the agents.                                                                                   | All                                                                                                                                    |
| CONTACT\_SENT\_MESSAGE\_NUMBER                                            | <p>Total number of messages within a conversation sent by the agents.</p><p><br></p>                                                                     | All                                                                                                                                    |
| CONTACT\_UNANSWERED\_NUMBER                                               | <p>Number of contacts initiated by a visitor with no response from an agent.</p><p><br></p>                                                              | All                                                                                                                                    |
| TRANSACTION\_AMOUNT\_PER\_CONTACT                                         | <p>Average turnover generated for each conversation done</p><p><br><br></p>                                                                              | All                                                                                                                                    |

## <sub>targetingRulesMetric</sub>

Filters available listed [here](https://graphql.iadvize.dev/types/MetricTargetingRulesFiltersInput).

| Indicator                                               | Description                                                                                                   | Channels availability |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------- |
| <p>TARGETING\_RULE\_CONTACT\_RATE</p><p><br></p>        | Proportion of displays having generated a contact.                                                            | CHAT, VIDEO, CALL     |
| <p>TARGETING\_RULE\_DISPLAY\_NUMBER</p><p><br><br></p>  | <p>Number of chat/call displays generated on the website during the period.</p><p><br><br></p>                | CHAT, VIDEO, CALL     |
| <p>TARGETING\_RULE\_</p><p>TRIGGERED</p><p><br><br></p> | Number of times a targeting rule has been triggered, as a consequence of visitors meeting the right criteria. | CHAT, VIDEO, CALL     |

## <sub>transactionsMetric</sub>

Filters available listed [here](https://graphql.iadvize.dev/queries/conversions).

| Indicator                                                 | Description                                                                                                      | Channels availability |
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------- |
| <p>CART\_AFTER\_CONTACT\_AMOUNT</p><p><br></p>            | Average order value following a contact.                                                                         | All                   |
| <p></p><p>CART\_GLOBAL\_AMOUNT</p><p></p><p><br><br></p>  | <p>Average Order Value, all visitor categories.</p><p><br><br></p>                                               | All                   |
| <p>TRANSACTION\_AFTER\_CONTACT\_AMOUNT</p><p><br><br></p> | Total turnover from visitors who dialogued and completed a transaction after a contact.                          | All                   |
| TRANSACTION\_AFTER\_CONTACT\_DURATION                     | Average time between the first exchange and the transaction following a contact.                                 | All                   |
| TRANSACTION\_AFTER\_CONTACT\_NUMBER                       | Total number of transactions from visitors who dialogued and then completed a transaction following the contact. | All                   |
| TRANSACTION\_TOTAL\_AMOUNT                                | Total turnover, all visitor categories.                                                                          | All                   |
| TRANSACTION\_TOTAL\_NUMBER                                | Total number of transactions (all categories).                                                                   | All                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iadvize.dev/use-cases/data-and-analytics/retrieve-messages-exchanged-within-a-conversation-1/pre-aggregated-indicators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
