Skip to main content
Solved

Discrepancy in "Placed Order" Revenue: API vs. Dashboard (Timezone/Aggregation Issue)

  • December 30, 2025
  • 3 replies
  • 33 views

What I want to create:
I am building a Google Apps Script integration to pull total revenue values into a Google Sheet for specific timelines: Last 7 DaysMonth to Date, and Last 30 Days.

The Issue:
I have successfully connected to the metric-aggregates endpoint and I am retrieving data, but the totals are consistently lower than what I see on my Klaviyo Dashboard.

  • Dashboard (Australia/Sydney): ~$255k AUD

  • API Response: ~$250k AUD

It looks like the API is cutting off a specific chunk of time (likely due to the timezone offset), missing either the start or the end of the window.

My Setup:

  • Account Timezone: Australia/Sydney

  • Metric: "Placed Order"

  • Endpoint: https://a.klaviyo.com/api/metric-aggregates (Revision 2024-10-15)

What I’ve Tried:
I am using Google Apps Script to fetch the data. I have tried forcing the dates to align with Sydney Midnight (00:00:00) and converting them to ISO strings with the timezone offset (+11:00), but the discrepancy persists.

 

Here is the JSON payload logic I am currently using:

 

{
  "data": {
    "type": "metric-aggregate",
    "attributes": {
      "metric_id": "MY_METRIC_ID",
      "measurements": ["sum_value"],
      "interval": "day",
      "filter": [
        "greater-or-equal(datetime,2025-12-23T00:00:00+11:00)", 
        "less-than(datetime,2025-12-31T00:00:00+11:00)"
      ],
      "timezone": "Australia/Sydney"
    }
  }
}

 

Here is a polished, professional post tailored for the Klaviyo Community Developer Forum. It follows the structure of the sample you provided but includes the technical details necessary for a developer to actually solve your problem.

Subject:
Discrepancy in "Placed Order" Revenue: API vs. Dashboard (Timezone/Aggregation Issue)

Body:

What I want to create:
I am building a Google Apps Script integration to pull total revenue values into a Google Sheet for specific timelines: Last 7 DaysMonth to Date, and Last 30 Days.

The Issue:
I have successfully connected to the metric-aggregates endpoint and I am retrieving data, but the totals are consistently lower than what I see on my Klaviyo Dashboard.

  • Dashboard (Australia/Sydney): ~$255k AUD

  • API Response: ~$250k AUD

It looks like the API is cutting off a specific chunk of time (likely due to the timezone offset), missing either the start or the end of the window.

My Setup:

  • Account Timezone: Australia/Sydney

  • Metric: "Placed Order"

  • Endpoint: https://a.klaviyo.com/api/metric-aggregates (Revision 2024-10-15)

What I’ve Tried:
I am using Google Apps Script to fetch the data. I have tried forcing the dates to align with Sydney Midnight (00:00:00) and converting them to ISO strings with the timezone offset (+11:00), but the discrepancy persists.

Here is the JSON payload logic I am currently using:

JSON code

{
"data": {
"type": "metric-aggregate",
"attributes": {
"metric_id": "MY_METRIC_ID",
"measurements": ["sum_value"],
"interval": "day",
"filter": [
"greater-or-equal(datetime,2025-12-23T00:00:00+11:00)",
"less-than(datetime,2025-12-31T00:00:00+11:00)"
],
"timezone": "Australia/Sydney"
}
}
}

The Question:
Does anyone know exactly how the Klaviyo Dashboard calculates "Last 7 Days"?

  1. Does it strictly use the Account Timezone (Sydney) for the midnight cutoff?

  2. When passing the filter in the API, should I be converting the time to UTC (Z) or keeping the offset (+11:00)?

  3. Is there a specific "Anchor" time I should use to ensure I match the Dashboard numbers exactly?

I suspect the API is interpreting my "Sydney Midnight" as "UTC Midnight" somewhere in the chain, causing me to lose ~11 hours of data per request.

Any help on aligning these timestamps would be appreciated

Best answer by Byrne C

Hi ​@SolomonB,

Welcome to the Klaviyo Community! It actually is expected that the values you’ll see when calling the Query Metric Aggregates endpoint will be different from what you see in the Klaviyo UI. This is because Query Metric Aggregates pulls data based on the time an event occurred, while performance in the Klaviyo UI is based on the send date the the attributed campaign or flow. Our Reporting API overview here goes a bit more into this. If you’d like the data you pull via API to match what you see in the UI, based on specific dates, you’ll want to use reporting endpoints like Query Campaign Values or Query Flow Values instead.

3 replies

Byrne C
Community Manager
Forum|alt.badge.img+28
  • Community Manager
  • Answer
  • January 5, 2026

Hi ​@SolomonB,

Welcome to the Klaviyo Community! It actually is expected that the values you’ll see when calling the Query Metric Aggregates endpoint will be different from what you see in the Klaviyo UI. This is because Query Metric Aggregates pulls data based on the time an event occurred, while performance in the Klaviyo UI is based on the send date the the attributed campaign or flow. Our Reporting API overview here goes a bit more into this. If you’d like the data you pull via API to match what you see in the UI, based on specific dates, you’ll want to use reporting endpoints like Query Campaign Values or Query Flow Values instead.


Forum|alt.badge.img
  • Contributor I
  • January 9, 2026

hi ​@SolomonB ​@Byrne C 
 

Hi, I’m seeing the same kind of discrepancy and wanted to check if you found a solution.

In my case, I’m comparing Metric Aggregates API vs Reporting API for the “Placed Order” metric. The Reporting API matches the Klaviyo dashboard, but Metric Aggregates consistently returns lower values, even with the same date range and timezone.

I’ve:

  • Verified account timezone (Europe/London)

  • Passed the timezone explicitly in the Metric Aggregates request

  • Tried both UTC and account timezone cutoffs

Nothing has aligned the Metric Aggregates data with dashboard totals so far.

Did you manage to make Metric Aggregates match the dashboard, or is this an expected limitation of that endpoint?

Thanks


Byrne C
Community Manager
Forum|alt.badge.img+28
  • Community Manager
  • January 12, 2026

Hi ​@Ayesha,

Looks like Cadence answered your question in this thread here:

If you have any follow-up questions, don’t hesitate to ask, though! In short, it is expected that data from Query Metric Aggregates will not match the Reporting APIs, since they’re taking the measurements in a different way.