Skip to main content

customerReports

Requires permission customers:customer:read.

Returns report data for the customers the signed-in user may see, optionally filtered. Needs the customers read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query CustomerReports {
customerReports {
cohortAnalysis {
cohort
customersCount
retentionRates
revenueByPeriod
}
}
}

Response:

{
"data": {
"customerReports": {
"cohortAnalysis": [
{
"cohort": "string",
"customersCount": 0,
"retentionRates": [
0
],
"revenueByPeriod": [
0
]
}
]
}
}
}
customerReports(
filters: CustomerReportFiltersInput
): CustomerReportsData!

Arguments​

customerReports.filters ● CustomerReportFiltersInput input​

Optional filters that narrow the report.

Type​

CustomerReportsData object​

The customer reports.