Skip to content

support_survey_stats

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest.

Tool

support_survey_stats

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest.

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest. For the FIRST nps question it also returns promoters (9-10), passives (7-8), detractors (0-6) and the NPS score: percentage of promoters minus percentage of detractors over everyone who answered, rounded once. The window defaults to the last 30 days — omitting from does not mean "since the beginning"

Behavior

HTTP
GET /support/surveys/:id/stats

Arguments

Name
Type
Required
Description
id
string
•
Survey id
to
string
—
End of the window, ISO-8601, inclusive. Defaults to now
from
string
—
Start of the window, ISO-8601, inclusive. Defaults to 30 days ago — omitting it means "recently", never "since the beginning"

Response

Field
Type
Always
Description
to
string
•
ISO-8601 end of the window that was actually applied
nps
object
•
The NPS block, or null when the survey asks no nps question
from
string
•
ISO-8601 start of the window that was actually applied
surveyId
string
•
The survey these numbers describe
questions
array
•
Every question of the survey, answered or not
responses
object
•
The response counts over the window

Try it

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest.

When to use

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest. For the FIRST nps question it also returns promoters (9-10), passives (7-8), detractors (0-6) and the NPS score: percentage of promoters minus percentage of detractors over everyone who answered, rounded once. The window defaults to the last 30 days — omitting from does not mean "since the beginning"

Example

Ask your agent something like this:

Aggregate one survey’s responses over a time window: how many came in and how many reached the end, then per question — option counts for radio and checkbox, mean and distribution for rating and nps, an answered count for the rest.

The agent will invoke support_survey_stats with these arguments:

{
  "id": "<id>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select