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:
valueis a string.questionis optional. - Quantity:
valueis a finite number; negative and fractional values are allowed. Optionalunit,min, andmaxdescribe the value and bounds. The value must be within any supplied bounds, andmincannot exceedmax. - Scale:
value,min, andmaxare integers, withmin ≤ value ≤ max. Optionallabelsmaps scores, written as string keys, to labels. - Choice:
optionslists{ "value", "label" }pairs.valueis always an array: use{ "type": "option", "value": "…" }for a listed option or{ "type": "text", "value": "…" }for an Other response. Setmultipleto allow several entries andallowOtherto allow text entries. Both default tofalse; option values must matchoptions, 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.