Adding a custom value to survey monkey API response - surveymonkey

I am building an application that pulls data for certain surveys from survey monkey. In my application, each survey is connected to an organisation. One organisation can have multiple surveys and each survey has only one organisation.
When I pull the data for a survey (GET request on /surveys/{id}/details) I would like to be able to add the organisation id to the survey monkey response, so that I would know to which organisation is that survey connected. Is there a way to add a custom variable of this type on survey monkey ?
If adding a variable of this type is not possible, what is the best way to solve this problem ?

There isn't a good way to tag surveys in the API right now. Survey folders may be supported in the future which will allow you to move a Survey into a folder for each organisation.
In the meantime, you can add custom variables (URL GET parameters) to a response (assuming you're using a weblink collector) which would let you know which organisation that response belongs to. You need to add the custom variables on the Survey, then when sending out the weblink add the parameter, something like:
https://www.surveymonkey.com/r/2Q3RXZB?organization_id=<org_id>
Or if you're using an email collector you can put extra fields on the recipient (or custom fields on the contact, if the contact is always in that one organisation) that let you know which organisation they belong to.
Another option (which may not be very great) is setting a nickname on the Survey which could be checked against when fetching the associated survey, see the Survey API docs.

Related

Can survey monkey handle a websites "forms"?

The API makes it sound like survey monkey is only good if I'm making an app.
My usecase is that I have a research project and I want to just shoot participants over to fill out a form, then use a webhook to know when they complete it. Like on my end I know my UserId, so I want to send user X to survey monkey to a SPECIFIC form, then when they complete it, I would like to know so I can log a complete entry in my DB.
Is this possible?
Yes, this is possible. Sounds like you want to create a private app (https://developer.surveymonkey.com/build-a-private-app/). In regards to the UserId tracking, use survey custom variables if you are using weblink collectors, or recipient custom fields if you are using email collectors.

How do I associated custom metadata with a SurveyMonkey survey?

I would like to configure my SurveyMonkey account so that when I create a new survey I am required to assign the new survey to one of an editable (by me) list of 'groups'. I would then like to aggregate reports based on survey 'group'.
SurveyMonkey seems to have a fixed list of 'categories', respondent 'metadata', and per-response 'custom variables', but I'm not seeing any kind of mixed metadata or custom variables at the level of a survey.
Does such a thing exist or is there a common workaround to achieve this?
There isn't currently a way to tag surveys. That would be a nice feature to have.
One possible workaround (although not ideal) is to set the Survey nickname or put an ID in the Survey title you can filter by when searching for surveys.
Another one is to set a custom variable on the Survey. Although these are normally meant as GET parameters when taking the Survey, you can use it to categorize Surveys as well.
One last thing is to add a question and use advanced branching if necessary to make sure it's always hidden to the user, and categorize based on that.
I do agree that a way to tag surveys directly, and then filter surveys based on a tag would be very useful but there is no current way to do that (as far as I'm aware)..

Can you change the questions asked based on the delivery mechanism

I am building a survey using Survey Monkey that may be sent out via email as well as other channels such as a link in a web page or community or a Tweet. One of the questions asks if the responded would like us to follow up with them in more detail so we need to capture their contact info. That's easy enough if we email it to them as the survey will automatically capture their email address. However, if they have followed a link instead of responded from the email that won't happen. So, I want to be able to recognize that the survey responses come from a source other than email and then ask for contact info. If it's a response to the email survey I don't want to bother the respondent with asking them that info.
So, can I configure the survey to not display the page asking for contact info if the survey is sent via email.
No, the survey design cannot be impacted by the collection method. You would need to create two separate surveys and merge the results outside of SurveyMonkey.

Send surveymonkey web links via sms, enable respondent tracking

We're trying to put together a survey solution which allows us to send links to our surveys to users via SMS. I know we could simply take the surveymonkey survey url and send it, but we want the same unique respondent tracking that you get via email, so we can break down responses by respondent group. So to achieve that, every respondent would need a custom, trackable url for each survey.
I see that when you send the survey via email, you get a unique link along the lines of https://www.surveymonkey.com/s.aspx?sm=cun03M8_2br9IdNcpt0CqL9A_3d_3d
I also see in the api documentation for get_respondent_list that there's a field "recipient_id" which is described as "ID generated for recipients of survey invitations via email collectors". It's not obvious from the unique email link if the link includes the survey id and the recipient id, or if it's just a "tracking code" which gets converted to an id later. So I'm just wondering if there's a way to programmatically generate the unique link for a given respondent?
You can't use the tracking via the email collector because those must be sent via email from the Survey Monkey system. Additionally, the recipient_id that you mention is actually just an internal Survey Monkey id, and not relevant to tracking. A respondent who does two surveys would have two respondent ids.
In your case, I would use many weblink collectors, one for each survey respondent.
For each survey:
Using the API, create a survey with no collector.
For each respondent:
Create one weblink collector. At this point, it's anonymous.
Pass the weblink through a URL shortening API. For example, the bit.ly API can provide the (optional) svy.mk domain.
The bit.ly API also allows you to track metrics, so you can see who has clicked the survey link. Then you can map those to the response from the Survey Monkey API.
Repeat (with code, of course) for each respondent.
Also check out SurveySignal (www.surveysignal.com) that simplifies this capability with existing integration with Survey Monkey

what is the standard for creating a web REST API for adding new items

i have a order catalogue web site and i want to create a REST API so people can create their own apps and Add an Order or Update an existing order:
Lets say an order has:
OrderId
Product
Quantity
ShippingType
So i need some API to allow someone to send in a new order (orderid would be blank as that would be in the response).
How do you deal with passing in items like Product or Shipping type. These are tables in my db and are keyed off their own specific primary key id. Should the NewOrder API ask for a string name for these fields, should it ask for the id. If it asked for the ID, that would assume they would have to call the GiveMeProductList() method upfront (which gives you the name and id of all product as a dataset).
What is the standard for dealing with this?
Martin Fowler has a good post about the steps toward the glory of REST that you might find useful to come up with REST API.
The media type that I use for sending this information to the server can handle both scenarios, Id and Code/Name. If the user enters the product code manually then I send up the code, if the user asks to pick from a list then I provide the list and send back the Id.

Resources