# KPI Monitoring

## General KPI monitoring

Ylem provides an extremely powerful way of calculating various KPIs from commonly known metrics (ARR, MRR, LTV, etc) to custom ones, that you can define on your own.

Metrics can be calculated in the [Query](https://docs.ylem.co/pipelines/tasks-ip/query) itself or using an [Aggregator](https://docs.ylem.co/pipelines/tasks-ip/aggregator).

Typically the result is compared with a certain target and sent as a notification to **Slack** or channels afterward.

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FAfKDyncYC4zNZC5guPFv%2FScreenshot%202022-10-01%20at%2018.23.31.png?alt=media&#x26;token=55e83ca3-b823-465d-8705-69f45fe2acf8" alt=""><figcaption><p>Potential pipeline</p></figcaption></figure>

## AVG, SUM, MIN, MAX, and other aggregated monitoring

The pipeline above can be used for monitoring different KPIs represented by mathematical functions such as average values, number of items, minimal and maximal values, etc.

More information about using them in [Condition](https://docs.ylem.co/pipelines/tasks-ip/condition) and [Aggregator](https://docs.ylem.co/pipelines/tasks-ip/aggregator) tasks can be found on a [special separate page](https://docs.ylem.co/pipelines/mathematical-functions).

## ARR Monitoring

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2F3uzor1E27ayT5x7HpnrC%2FScreenshot%202022-10-01%20at%2018.12.44.png?alt=media&#x26;token=b8fc5a50-356c-4f64-95ce-f9462c84c82f" alt=""><figcaption><p>Potential pipeline</p></figcaption></figure>

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2F4iHWm1EzOkaAq1jiEeLW%2FScreenshot%202022-10-01%20at%2018.13.09.png?alt=media&#x26;token=5724882c-2f98-4b6b-938f-d0a496cc7af3" alt=""><figcaption><p>Potential data extraction</p></figcaption></figure>

## MRR monitoring

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FGPFIKzjvXoDFU2jQ8rNj%2FScreenshot%202022-10-01%20at%2018.28.29.png?alt=media&#x26;token=50d25346-1521-424e-891c-7230c72c748f" alt=""><figcaption><p>Potential pipeline</p></figcaption></figure>

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FLFH9vO7bxGPpHQCMW4nX%2FScreenshot%202022-10-01%20at%2018.28.48.png?alt=media&#x26;token=8a6c3058-8b9c-4a73-81b6-4e62e474bc1c" alt=""><figcaption><p>Potential data extraction</p></figcaption></figure>

## Stream sales or other revenue KPIs

Sales or other Revenue teams are the most KPI-driven in an organization. Ylem allows easy monitoring of their KPIs, comparing with a target, and taking different actions depending on whether it is already achieved or not yet:

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FNmejW81qv934MYgpYSXu%2FScreenshot%202022-10-07%20at%2019.24.59.png?alt=media&#x26;token=6ede0fcc-4d98-4c5d-a231-93ff54fa4253" alt=""><figcaption><p>Pipeline example for Sales KPIs</p></figcaption></figure>

## Monitor average value per customer

Ylem allows easy monitoring of average values (amounts, orders, bank transfers, contract values) per customer. As an example the following pipeline represents the calculation of an average amount per customer and taking actions for different sizes of it:

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FeOP4HzZq5gQep1DWGZMb%2FScreenshot%202022-10-06%20at%2017.21.28.png?alt=media&#x26;token=31ec7a1d-4164-4a0d-ab1f-bcb9fc58ca15" alt=""><figcaption><p>Pipeline example</p></figcaption></figure>

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2F4so8Unb2wCCxqBEorsWC%2FScreenshot%202022-10-06%20at%2017.22.03.png?alt=media&#x26;token=2bbe8814-5b9d-4120-8e8b-70578c8ff648" alt=""><figcaption><p>Possible SQL query</p></figcaption></figure>

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FiPdtcMYwpdBcAoTutlhF%2FScreenshot%202022-10-06%20at%2017.22.19.png?alt=media&#x26;token=d8367681-3d21-42a9-9128-6bc9f9c29bb8" alt=""><figcaption><p>Possible filter task</p></figcaption></figure>


---

# 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.ylem.co/use-cases/functional-use-cases/kpi-monitoring.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.
