Skip to main content

Basically title. I am trying to pull the sum value of revenue using Query Metric Aggregates but instead of using the standard Shopify placed order metric, we want to use a custom metric we made that excludes some orders. It has a very long metric ID (different format than the others) and it doesn’t show up in get_metrics endpoint. I am not able to make this work. When I use the reporting endpoints, it does work, however, I don’t have any way to see total revenue through the reporting endpoints. Is there any solution?

Hi, all metric IDs are six characters. It’s in the URL when you go to the metric in the metrics page.

EDIT: see Kim’s comment below, about custom metrics you can define.


Hey @MoneyJ2k, custom metric IDs aren’t supported yet on the Query Metric Aggregates endpoint. Tracking this as a feature request on our side 


Is there any other way to pull the revenue for a store via API then?


@MoneyJ2k, there isn’t a way to pull the aggregated value for a custom metric via the API at this time but it is an enhancement we’re considering for the future. I’m curious how you would plan to leverage this via API if it were available in the future.

This data should be retrieve-able via a custom report in the interim. Maybe scheduling a custom report can help you to accomplish your use case here — getting revenue data exported from Klaviyo on a regular cadence?