Inclivio sends metadata to your survey in the form of survey parameters that allow you to control the flow of your survey and track completion over time. You can send additional survey parameters at the participant level to track data unique to each participant and control what they see in their surveys. For example, you might send information to your survey indicating the between-subjects experimental condition of which each participant belongs, then show them different survey content accordingly.
Inclivio's custom survey parameters API can be used to add, change, and remove survey parameters dynamically. This is useful in situations where you want to control the flow of your surveys based on a participant's previous response (e.g., present a questionnaire after participants indicate engaging in a certain behavior). You can also use this API to dynamically present content to participants based on previous responses.
POST request with pingid = {pingid}
and survey-parameter = {key=value} in the body of the API call. If the key does not yet
exist for that participant, it will be added as a new custom survey parameter. If the key already exists for that
participant, the value will be updated. If the value is missing from the right hand
side of the API call (e.g., survey-parameter = parameterName=). All changes will be reflected in subsequent pings sent to that participant.
The following example shows you how to achieve this using the web service feature in Qualtrics®.
-
Capture the
pingidsurvey parameter as embedded data (refer to the Survey Parameters documentation for more information)
-
Add Below > Web Service
-
Add the following information:
- Method:
POST - URL:
https://incliv.io/surveyCallback
- Method:
-
Select 'Add a body parameter to send to web service'
-
Set the parameter as
pingidand the value as${e://Field/pingid}(this is equivalent to Insert Piped Text > Embedded Data Field > pingid).
-
Add a second body parameter by pressing the button. Add your project's API key (found in Project > Settings > Project API Key). Set the parameter as
api-keyand the value as your project's API key.
-
Add another parameter called
survey-parameterand the value as thekey/valuepair of the survey parameter you want to add. For example, if you want to add the custom survey parameterusedSubstancewith a value ofalcoholyou would make the following API call from Qualtrics®. You can also change an existing custom survey parameter using the same method.
To remove the custom survey parameterusedSubstancefrom a participant's future pings, leave the right hand side blank:
You can include a participant's response as the value of your parameter by inserting piped text into the API call (Insert Piped Text > Survey Question).
To capture this data in future surveys, includeusedSubstanceas embedded data and then pipe this into your question text: