Order Value Average
In this example we show you how to return the average order value
less than a minute
What you’ll learn
- How to return the average order value for a given date range.
The Query
query {
invoiceSummary(
where: {
invoicePaidAt: { gt: "2020-10-10", lt: "2022-10-10" }
sellerAccountType: { eq: retailer }
}
) {
invoiceValueAvg
}
}
The Response
{
"data": {
"invoiceSummary": [
{
"invoiceValueAvg": 87.68337722323238
}
]
}
}