Use the productsWithPerformance query to retrieve products with their individual performance metrics and trends. Supports filtering, sorting, and Relay-spec pagination.
query ProductsWithPerformance {
productsWithPerformance(first: 10) {
pageInfo { hasNextPage count }
edges {
node {
attributes {
productId
productName
}
performanceMetrics {
metrics {
totalRevenue
productViews
productPurchases
}
trends {
totalRevenue
productViews
}
}
}
}
}
}Filtering and sorting
Supports filtering on product fields (e.g. name, productId, custom attributes) and on performance metrics (e.g. totalRevenue). Logical operators (AND/OR) supported. MongoDB Atlas Search is used for productName queries.
Date ranges
Date range inputs are optional. If omitted, the query defaults to the last 30 days. Max range: 60 days, no future dates, start and end must be supplied together. See Get product performance summary for the full date range model.
Authentication
This API uses API Key authentication. See Using the Connect API for instructions on how to get and use your API key.
