Skip to content

Support

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

NameTypeRequiredDescription
idstringSurvey id
tostringEnd of the window, ISO-8601, inclusive. Defaults to now
fromstringStart of the window, ISO-8601, inclusive. Defaults to 30 days ago — omitting it means "recently", never "since the beginning"

Response

FieldTypeAlwaysDescription
tostringISO-8601 end of the window that was actually applied
npsobjectThe NPS block, or null when the survey asks no nps question
fromstringISO-8601 start of the window that was actually applied
surveyIdstringThe survey these numbers describe
questionsarrayEvery question of the survey, answered or not
responsesobjectThe 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.

navigateselect