I have a use case where we’re trying to measure unique count of emails received (metric name: “recevied email”) on a flow, via the metric-aggregates API. The issue is the following:
The largest interval (bucket) is currently “month”, which means if a user receives an email on a flow on the last day of the month, and the following day in the next month, they are counted twice in the “unique” bucket since it is per interval. Since the goal is to see total unique count of emails on a flow - this metric pull is unreliable. For “orders” and purchases/sales, it’s fine since one can just reduce the bucket counts.
Is it on the roadmap to do a interval size “all”?
{
"data": {
"type": "metric-aggregate",
"attributes": {
"measurements": [
"count",
"unique"
],
"by": [
"$flow"
],
"filter": [ // filter spans >1 month
"greater-or-equal(datetime,2024-01-01T00:00:00.000Z)",
"less-than(datetime,2024-02-29T00:00:00.000Z)"
],
"return_fields":[
"name"
],
"metric_id": "K4eLyK", // K4eLyK = recevied email
"interval": "month", // <-- this would be great as "all"
"timezone": "UTC"
}
}
}
> "detail": "'interval' must be one of: day, hour, month, week (got all)",
Curious if this is on the roadmap - seems like a “one” on interval would simplify things and might even be less resource-intensive on the server side.