简体   繁体   中英

Surveymonkey API - Assign response instances to authenticated users (and keep track thereof)

I'm developing a user study web application, in which users start by signing up and then have to go through a series of stages and respond a couple surveys along the way. Eventually users might sing out of the application, leaving the study partially complete, and then later on sign in again to resume from where they left off. So, what I would like to accomplish is to programatically ask Surveymonkey's API somehow to create "response instances" (initially empty) of several surveys, and assign them beforehand to the users that are taking my user study. Say, a user signs up to the user study, and then I ask Survemonkey to create 4 response instances of 3 different surveys (because 1 of those surveys has to be taken twice), then Surveymonkey sends me the ids of these responses and I store them in my own database. Thus, when the user eventually gets to a stage during the study where he has to respond a particular survey, I would fetch the survey response that was already assigned to him (using the response id I already saved in my DB, as I said before), load the survey within an iframe embedded in my app and let the user fill out the survey. If a user has partially responded a survey, signs out and later on comes back, using his response id I should be able to retrieve the latest state of his response to the survey and let him keep responding the pending questions.

Does anybody know how to implement this workflow (or anything similar) with SurveyMonkey's API? If SurveyMonkey isn't capable of or well suited for this use case, are there other survey providers out there that would be more appropriate? In the hypothetical worst case scenario of having to implement my own survey system: which technologies would you recommend to accomplish this?

All suggestions are very welcomed.

You can easily create responses for any number of your surveys with the following endpoint ( https://developer.surveymonkey.com/api/v3/#collectors-id-responses ).

The only problem is that the response cannot be created with empty answers, but I would suggest adding a prefilled demographic type question to the first page. Pages are submitted one at a time by the respondent, and the respondent will always start on the first unsubmitted page when continuing, so not that bad of a workaround.

A unique response ID along with a link to continue the survey (edit_url) are provided back from the response creation call.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM