Skip to main content

salesPerformanceAnalytics

Requires permission analytics:sales:read.

Sales performance analytics over a date range, limited to what your role may see: sales reps see their own records, admins see everything by default, and other staff see their team.. Needs the sales analytics 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 SalesPerformanceAnalytics($range: AnalyticsRangeInput!) {
salesPerformanceAnalytics(range: $range) {
teamSize
leaderboard {
repName
commissionEarned
commissionPending
orders
quotes
repId
}
}
}

Variables:

{
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}

Response:

{
"data": {
"salesPerformanceAnalytics": {
"teamSize": 0,
"leaderboard": [
{
"repName": "string",
"commissionEarned": 0,
"commissionPending": 0,
"orders": 0,
"quotes": 0,
"repId": "string"
}
]
}
}
}
salesPerformanceAnalytics(
range: AnalyticsRangeInput!
): SalesPerformanceAnalytics!

Arguments​

salesPerformanceAnalytics.range ● AnalyticsRangeInput! non-null input​

The date range and, optionally, the visibility scope.

Type​

SalesPerformanceAnalytics object​

Sales results by rep.