Schedule Activation API
You may want to activate and deactivate schedules dynamically,
based on participants' responses. This is most useful for dynamic
schedule types, where you wish to assess individuals contingent
on the occurrence of a certain event. For example, if a participant
indicates that they are currently consuming alcohol, you can activate
a dynamic schedule to ping them every 10 minutes for the next 2 hours
to study sequelae of alcohol use. You can activate and deactivate all
schedule types (EMA/ESM, longitudinal, dynamic, and participant initiated).
Activating vs. De-activating vs. Re-activating
-
Activating a schedule adds the schedule to participant receiving
the ping with the
pingid
you specify in the API call. This action is identical to applying a schedule on the participant's page. -
De-activating a schedule removes the schedule for the participant receiving
the ping with the
pingid
you specify in the API call. This action is identical to removing a schedule on the participant's page. - Re-activating a schedule re-starts the participant on a given schedule. For example, if a participant is midway through a dynamic schedule and indicates engaging in another behavior that indicates activating a schedule (e.g., has another alcoholic drink), you may wish to restart the dynamic assessments they are currently receiving. To do so, turn a schedule off and on in the same API call.
How to set up your survey to interact with Inclivio's Schedule Activation API
The following example shows you how to achieve this using the web service feature in Qualtrics®.
-
Capture the
pingid
survey parameter as embedded data (refer to the Survey Parameters documentation for more information) -
Add a New Element Here > Web Service
-
Add the following information:
- Method:
POST
- URL: https://https://incliv.io/surveyCallback
- Method:
-
Select 'Add a body parameter to send to web service'
-
Set the parameter as
pingid
and 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-key
and the value as your project's API key. -
Add another body parameter to indicate whether you want to activate, deactivate, or re-activate a schedule.To ACTIVATE a schedule, set the parameter as
schedule-on
and add the schedule ID of the schedule you wish to activate (Note: the schedule ID can be found at the top of the schedule page).To DEACTIVATE a schedule, set the parameter asschedule-off
and add the schedule ID of the schedule you wish to activate .To RE-ACTIVATE a schedule, set two parameters:schedule-on
andschedule-off
. Add the schedule ID of the schedule you wish to re-activate as the value for each.