Feedback answer format

Declare text, quantity, scale, and choice answers for custom feedback forms.

Last reviewed

Use these objects in the answers array of an HTTP source feedback operation. Each answer has a type and value. Include question for quantity, scale, and choice answers; text answers can omit it. Any answer can also include an optional key and description.

[{ "type": "text", "question": "What should we improve?", "value": "Search" },{"type": "quantity","question": "How long did setup take?","value": 1.5,"unit": "hours"},{"type": "scale","question": "How was setup?","value": 4,"min": 1,"max": 5,"labels": { "1": "Hard", "5": "Easy" }},{"type": "choice","question": "What helped?","value": [{ "type": "option", "value": "docs" },{ "type": "text", "value": "A teammate" }],"options": [{ "value": "docs", "label": "Documentation" }],"multiple": true,"allowOther": true}]

Answer types

  • Text: value is a string. question is optional.
  • Quantity: value is a finite number; negative and fractional values are allowed. Optional unit, min, and max describe the value and bounds. The value must be within any supplied bounds, and min cannot exceed max.
  • Scale: value, min, and max are integers, with min ≤ value ≤ max. Optional labels maps scores, written as string keys, to labels.
  • Choice: options lists { "value", "label" } pairs. value is always an array: use { "type": "option", "value": "…" } for a listed option or { "type": "text", "value": "…" } for an Other response. Set multiple to allow several entries and allowOther to allow text entries. Both default to false; option values must match options, and a single-choice answer can contain at most one entry.

For the current server endpoint and authentication setup, see HTTP source. The JavaScript SDK reference describes the client surface and its published availability.