The question object represents a question in your Question Stream. The question's type
, customer_type
, frequency
, and published_at
properties determine whether or not the question is presented to the customer when displaying the Question Stream.
Attributes
-
allow_other
boolean -
If
true
, the question allows a free-text responses as an alternative to the provided list of responses. -
customer_type
string -
One of
everyone
,new
, orreturning
. Indicates which customers should be asked this question. -
frequency_type
string -
Either
always
oronce
. Indicates how often this question should be asked. -
id
number - The unique identifier of the question.
-
inserted_at
string - ISO 8601 timestamp of the time the question was created.
-
max_responses
number -
If the question
type
ismulti_response
, this is the maximum number of responses that can be provided for this question per customer. -
other_placeholder
string - If the question allows free text responses ("Other"), this is the placeholder text that displays in the text input in the question form.
-
prompt
string - The text value of the question that is presented to customers.
-
published_at
string -
ISO 8601 timestamp of the time the question was published. If it has not
been pbulished, this will be
null
. -
randomize_responses
boolean -
If this is
true
the order of the responses will be randomized every time the question is displayed to prevent bias in the collected responses. -
responses
array -
For
single_response
ormulti_response
question types, a list of response objects. -
submit_text
string -
The text that is displayed on the
button
that submits the question form. -
type
string -
One of
single_response
,multi_response
, oropen_ended
. Thesingle_response
question type limits the customer to providing one response to the question. Themulti_response
type allows a customer to provide many responses, up to the limit of themax_responses
value. Theopen_ended
type allows customers to respond with free form text. -
updated_at
string - ISO 8601 timestamp of the time the question was last updated.
The response object
The response object represents a valid response option for a question. When the question is presented to the customer, the response objects in the question's responses
property list are used to provide the customer with a list of options.
Attributes
-
clarification_question
object -
If the type of the question associated with this response is
single_response
, then the response can have follow up clarification question object. A clarification question provides a mechanism to add more detail to the response. -
id
number - The unique identifier of the response.
-
value
string - The text value of the response that is presented to the customer.
The clarification question object
The clarification question object represents a question that will be asked after a customer has chosen the response associated with the clarification question. It provides a way to provide more detail on particular response. In an example scenario, if the question were How did you hear about us? and one of the responses were Podcast, you may want to "clarify" the response Podcast by asking the customer Which podcast? with a list of podcasts where you advertise. You would then be able to see an additional layer of analytics that breaks down your Podcast responses by individual podcast names.
Attributes
-
allow other
boolean -
If
true
, the question allows a free-text responses as an alternative to the provided list of responses. -
id
number - The unique identifier of the question.
-
max_responses
number -
If the question
type
ismulti_response
, this is the maximum number of responses that can be provided for this question per customer. -
other_placeholder
string - If the question allows free text responses ("Other"), this is the placeholder text that displays in the text input in the question form.
-
prompt
string - The text value of the question that is presented to customers.
-
randomize_responses
boolean -
If this is
true
the order of the responses will be randomized every time the question is displayed to prevent bias in the collected responses. -
responses
array -
For
single_response
ormulti_response
question types, a list of response objects. The difference between a response object on a question and a response object on a clarification question is that response objects on a clarification question *cannot* have aclarification_question
attribute. -
submit_text
string -
The text that is displayed on the
button
that submits the question form. -
type
string -
One of
single_response
,multi_response
, oropen_ended
. Thesingle_response
question type limits the customer to providing one response to the question. Themulti_response
type allows a customer to provide many responses, up to the limit of themax_responses
value. Theopen_ended
type allows customers to respond with free form text.
Example
{
"allow_other": true,
"customer_type": "new",
"frequency_type": "always",
"id": 13,
"inserted_at": "2021-05-14T15:52:48+00:00",
"other_placeholder": "Other",
"prompt": "How did you hear about us?",
"published_at": "2022-03-18T17:11:12+00:00",
"randomize_responses": true,
"responses": [
{
"clarification_question": null,
"id": 29199,
"value": "TV"
},
{
"clarification_question": {
"allow_other": true,
"id": 15979,
"other_placeholder": null,
"prompt": "Which podcast?",
"randomize_responses": true,
"responses": [
{
"id": 30084,
"value": "The Morning View"
},
{
"id": 30085,
"value": "Top Talkers"
},
{
"id": 30087,
"value": "Commute Community"
},
{
"id": 30089,
"value": "Daily Zen"
}
],
"type": "single_response"
},
"id": 29202,
"value": "Podcast"
},
{
"clarification_question": null,
"id": 29203,
"value": "From a friend"
},
{
"clarification_question": null,
"id": 29599,
"value": "Billboard"
},
],
"submit_text": "Submit",
"type": "single_response",
"updated_at": "2022-03-18T17:11:12+00:00"
}