---
title: "Get performance data for flows triggered by your app metrics"
description: "Learn how to get flow-specific performance data related to an app metric."
url: "https://developers.klaviyo.com/en/docs/get_performance_data_for_flows_triggered_by_your_app_metrics"
category: "Partner resources"
lastUpdated: "2026-11-09"
related: ["https://developers.klaviyo.com/en/docs/llms.txt"]
---

# Get performance data for flows triggered by your app metrics

> This is the Markdown version of https://developers.klaviyo.com/en/docs/get_performance_data_for_flows_triggered_by_your_app_metrics

Learn how to get flow-specific performance data related to an app metric.

## Before you begin

Note that in order to fetch performance data for flows that use your app metrics, your app must request the following scopes from users:

* `metrics:read`
* `flows:read`

## You will learn

In this guide, you will learn how to get performance data for flows that have been triggered by your [app metrics](https://developers.klaviyo.com/en/docs/understanding_branded_events.md), or metrics created by your app through OAuth. For example, a customer may be using one of your app’s provided [flow templates](https://developers.klaviyo.com/en/docs/submit_flow_templates_for_your_app.md). In this case, you may want to use our [Reporting API](https://developers.klaviyo.com/en/reference/reporting.md) to monitor how this flow template is performing for the customer. This is an effective way to enable data-driven improvements to your app.

## Get flow performance data with an AI agent

```prompt Get performance data for flows my app's metrics trigger
Add code to this app that finds the flows its app metrics trigger in each Klaviyo account and fetches their performance data with the Reporting API.

First read https://developers.klaviyo.com/en/docs/get_performance_data_for_flows_triggered_by_your_app_metrics.md.

Ask me for these before you change anything, unless I've already given them:
- The app's integration name exactly as it appears in Klaviyo. The filter is case-sensitive and should match the app's brand name.
- Which statistics I want (for example `clicks`, `clicks_unique`, `conversion_uniques`), over what time frame, and whether as totals or broken down by an interval such as `weekly`.
- What the app should do with the results.

Then, following this app's language, framework and conventions:
1. Check that the app already uses OAuth and requests the `metrics:read` and `flows:read` scopes. If not, stop and tell me.
2. Send every request with the account's stored access token as `Authorization: Bearer <access token>`, plus `accept: application/json` and a `revision` header (the guide uses `2024-10-15`).
3. Call `GET https://a.klaviyo.com/api/metrics/` with `filter=equals(integration.name,"<integration name>")` and `fields[metric]=name,integration` to get the app's metric IDs.
4. For each metric, call `GET https://a.klaviyo.com/api/metrics/<metric ID>/relationships/flow-triggers` to get the IDs of flows it triggers.
5. For each flow, call `POST https://a.klaviyo.com/api/flow-values-reports/` (type `flow-values-report`) for totals, or `POST https://a.klaviyo.com/api/flow-series-reports/` (type `flow-series-report`, with an `interval`) for a breakdown. Send a `timeframe` (`start` and `end`, or a `key` such as `last_30_days`), the app metric ID as `conversion_metric_id`, `filter` set to `equals(flow_id,"<flow ID>")`, and the `statistics` list.
6. Read results per `flow_id`, `send_channel` and `flow_message_id`; series results also have `date_times`.

Don't create or change flows, and keep access tokens out of source control and logs.

When you're done, tell me what you changed and how to run it against a test account that has a flow triggered by one of the app's metrics.
```

## Get flows triggered by your metric

To retrieve flow-specific performance data at the account level, we first need to identify which flows are triggered by your app’s metrics within the account. Follow the steps below:

1. Using the stored access token for the account, make a request to [Get Metrics](https://developers.klaviyo.com/en/reference/get_metrics.md) with a filter to fetch app metrics specific to your integration. In the example below, the filter uses the integration name, but you can also fetch metrics by integration category.

```curl Request
curl --request GET \
     --url 'https://a.klaviyo.com/api/metrics/?filter=equals(integration.name,"YourIntegration")&fields%5Bmetric%5D=name,integration' \
     --header 'Authorization: Bearer {access_token}' \
     --header 'accept: application/json' \
     --header 'revision: 2024-10-15'
```
```json Response
{
    "data": [
        {
            "type": "metric",
            "id": "REcTBe",
            "attributes": {
                "name": "YourIntegration: Sent SMS",
                "integration": {
                    "id": "0rG4eQ",
                    "name": "YourIntegration"
                }
            },
            "links": {
                "self": "https://a.klaviyo.com/api/metrics/REcTBe/"
            }
        },
        {
            "type": "metric",
            "id": "RcsmFp",
            "attributes": {
                "name": "YourIntegration: Marked Email as Spam",
                "integration": {
                    "id": "0rG4eQ",
                    "name": "YourIntegration"
                }
            },
            "links": {
                "self": "https://a.klaviyo.com/api/metrics/RcsmFp/"
            }
        },
    ...
}
```

> [!WARNING]
> Filtering by `integration.name` and/or `integration.category` is case-sensitive. The `integration.name` should match your app’s brand name.

2. Of the returned metrics, copy the metric ID(s) that you would like to use to fetch related flows.
3. Call [Get IDs for Flows Triggered by Metric](https://developers.klaviyo.com/en/reference/get_ids_for_flows_triggered_by_metric.md) with the metric ID to fetch IDs for flows triggered by the app metric. The request and response should look like this:

```curl Request
curl --request GET \
     --url https://a.klaviyo.com/api/metrics/REcTBe/relationships/flow-triggers \
     --header 'Authorization: Bearer {access_token}' \
     --header 'accept: application/json' \
     --header 'revision: 2024-10-15'
```
```json Response
{
  "data": [
    {
      "type": "flow",
      "id": "T7K2j8"
    }
  ]
}
```

## Fetch flow-specific performance data

Now that we have an ID for a flow that has been triggered by a specified app metric, we can fetch the performance data on this flow. There are two types of flow reports that you can run:

* Flow values report ([Query Flow Values](https://developers.klaviyo.com/en/reference/query_flow_values.md))

  Returns requested statistics for a given flow over a provided time frame. For example, unique opens for a flow email over the last 12 months.

* Flow series report ([Query Flow Series](https://developers.klaviyo.com/en/reference/query_flow_series.md)).

  Returns requested flow statistics broken down by a specified time interval over a provided time frame. For example, weekly click rates for a flow email over the last 30 days.

In your request to Query Flow Values or Query Flow Series for performance data on a specific flow:

1. Input the app metric ID as the `conversion_metric_id`. This will be used for calculating conversion-based statistics.
2. Use an equals `filter` on the flow ID of the flow you want performance data on. For example, `"equals(flow_id,\"T7K2j8\")".`

The example request below uses the Query Flow Values endpoint to query [statistics](https://developers.klaviyo.com/en/reference/reporting.md) (clicks, unique clicks, and unique conversions) over a custom time frame:

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/flow-values-reports/ \
     --header 'Authorization: Bearer {access_token}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'revision: 2024-10-15' \
     --data '
{
  "data": {
    "type": "flow-values-report",
    "attributes": {
      "timeframe": {
        "start": "2024-05-08T00:00:00+00:00",
        "end": "2024-06-20T00:00:00+00:00"

      },
      "conversion_metric_id": "REcTBe",
      "filter":"equals(flow_id,\"T7K2j8\")",
      "statistics": [
        "clicks",
        "clicks_unique",
        "conversion_uniques"
      ]
    }
  }
}
'
```
```json Response
{
  "data": {
    "type": "flow-values-report",
    "attributes": {
      "results": [
        {
          "groupings": {
            "flow_id": "T7K2j8",
            "send_channel": "email",
            "flow_message_id": "01GMRWDSA0ARTAKE1SFX8JGXAY"
          },
          "statistics": {
            "clicks": 123,
            "clicks_unique": 98,
            "conversion_uniques": 3
          }
        },
        {
          "groupings": {
            "flow_id": "T7K2j8",
            "send_channel": "email",
            "flow_message_id": "01GJTHNWVG93F3KNX71SJ4FDBB"
          },
          "statistics": {
            "clicks": 342,
            "clicks_unique": 208,
            "conversion_uniques": 10
          }
        }
      ]
    },
    "relationships": {
      "flows": {
        "data": [
          {
            "type": "flow",
            "id": "string"
          }
        ],
        "links": {
          "self": "string",
          "related": "string"
        }
      },
      "flow-messages": {
        "data": [
          {
            "type": "flow-message",
            "id": "string"
          }
        ],
        "links": {
          "self": "string",
          "related": "string"
        }
      }
    },
    "links": {
      "self": "string"
    }
  }
}
```

The example request below uses the Query Flow Series endpoint to query statistics for clicks, delivery rate, and open rate on a weekly interval over the last 30 days:

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/flow-series-reports/ \
     --header 'Authorization: Bearer {access_token}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'revision: 2024-10-15' \
     --data '
{
  "data": {
    "type": "flow-series-report",
    "attributes": {
      "timeframe": {
        "key": "last_30_days"
      },
      "interval": "weekly",
      "conversion_metric_id": "REcTBe",
      "filter": "equals(flow_id,\"T7K2j8\")",
      "statistics": [
        "clicks",
        "delivery_rate",
        "open_rate"
      ]
    }
  }
}
'
```
```json Response
{
  "data": {
    "type": "flow-series-report",
    "attributes": {
      "results": [
        {
          "groupings": {
            "flow_id": "T7K2j8",
            "send_channel": "email",
            "flow_message_id": "01GMRWDSA0ARTAKE1SFX8JGXAY"
          },
          "statistics": {
            "clicks": [
              123,
              156,
              144
            ],
      "delivery_rate": [
              1.00,
              0.56,
              0.84
            ],
            "open_rate": [
              0.8253,
              0.8722,
              0.8398
            ]
          }
        },
        {
          "groupings": {
            "flow_id": "T7K2j8",
            "send_channel": "email",
            "flow_message_id": "01GJTHNWVG93F3KNX71SJ4FDBB"
          },
          "statistics": {
             "clicks": [
              123,
              156,
              144
            ],
      "delivery_rate": [
              1.00,
              0.56,
              0.84
            ],
            "open_rate": [
              0.8253,
              0.8722,
              0.8398
            ]
          }
        }
      ],
      "date_times": [
        "2024-01-05T00:00:00+00:00",
        "2024-01-06T00:00:00+00:00",
        "2024-01-07T00:00:00+00:00"
      ]
    },
    "relationships": {
      "flows": {
        "data": [
          {
            "type": "flow",
            "id": "string"
          }
        ],
        "links": {
          "self": "string",
          "related": "string"
        }
      },
      "flow-messages": {
        "data": [
          {
            "type": "flow-message",
            "id": "string"
          }
        ],
        "links": {
          "self": "string",
          "related": "string"
        }
      }
    },
    "links": {
      "self": "string"
    }
  }
}
```

You will now be able to fetch performance data on flows that are triggered by your app metrics. Learn more about how you can analyze your marketing performance with our [Reporting API](https://developers.klaviyo.com/en/reference/reporting.md).

## Additional resources

* [Branding for app metrics](https://developers.klaviyo.com/en/docs/understanding_branded_events.md)
* [Monitor your app](https://developers.klaviyo.com/en/docs/monitor_your_app.md)
* [Submit flow templates for your app](https://developers.klaviyo.com/en/docs/submit_flow_templates_for_your_app.md)
