If you want to use vouchers as incentives, you can manage them under Special Features → Manage Voucher Codes.
The voucher() function retrieves a voucher code from the list and records the person to whom it was issued.
Each voucher code and each retrieval is assigned to a “drawing.” This allows you to issue voucher codes of varying values within a survey project, or to issue multiple voucher codes to the same person across multiple survey waves.
Note This feature has been disabled on the server www.soscisurvey.de. It is available on the Pro server s2survey.net.
Coupon codes can sometimes have considerable monetary value. Please note the following:
Copy and paste the coupon codes into the input field under Special Features → Manage Voucher Codes → Import Voucher Codes.
Below are some examples of valid import formats:
55m5Hj40-FBKYQwLn-tRcBAUJn-5mF8ArS0 0wDcxXUD-myDUR6RD-6Atr9Qse-XJEwRN61 QmmWWJgJ-8A8vuCcX-Llc2a10t-pDCqUSie ANVE251r-pqT5Rerm-oU30Ujzq-BHibeuZA EENIjrr1-35rTXjxr-qsiTa8dk-YPVVx42i PMt5KNjZ-MoN3Fj5Q-Lmgl4Viz-hAQYKXvG
55m5Hj40-FBKYQwLn-tRcBAUJn-5mF8ArS0, 0wDcxXUD-myDUR6RD-6Atr9Qse-XJEwRN61, QmmWWJgJ-8A8vuCcX-Llc2a10t-pDCqUSie, ...
"55m5Hj40-FBKYQwLn-tRcBAUJn-5mF8ArS0", "0wDcxXUD-myDUR6RD-6Atr9Qse-XJEwRN61", "QmmWWJgJ-8A8vuCcX-Llc2a10t-pDCqUSie", "ANVE251r-pqT5Rerm-oU30Ujzq-BHibeuZA", "EENIjrr1-35rTXjxr-qsiTa8dk-YPVVx42i", "PMt5KNjZ-MoN3Fj5Q-Lmgl4Viz-hAQYKXvG"
During import, the raffle with number 1 is preselected. Change the preselection if you want to manage the vouchers separately from other coupon codes.
To select voucher codes, use thevoucher() function.
string|NULL voucher(string person_id, [int draw], [bool new_draw])
true). If set to false and no code has been drawn for the person ID in the drawing, the return value is null.
The voucher() function always returns the same voucher code for a given combination of person ID and raffle. The page containing the voucher code can therefore be displayed multiple times. You can also provide a separate questionnaire where respondents can view the voucher code again.
If no voucher codes are available in the specified raffle, the function returns null.
Note: If you are testing the questionnaire as a project manager, the voucher() function will only return a dummy voucher code (e.g. EXAMPLE-123456-7890). Real voucher codes are used only for interviews (MODE=interview).
The person ID from the address entry in a mass email campaign (SERIAL) or a participation code can be used as the person ID. Both are available via caseSerial().
$person = caseSerial(); $voucher = voucher($person); html('<p>Your Voucher Code is: <strong>'.$voucher.'</strong></p>');
If another voucher is to be issued to the same person in a later survey wave, import voucher codes for drawing No. 2 and specify the number 2 in the voucher() function:
$person = caseSerial(); $voucher = voucher($person, 2); html('<p>Your Voucher Code for Wave 2 is: <strong>'.$voucher.'</strong></p>');
Take into account the possibility that all coupon codes will be used up during the survey.
$person = caseSerial(); $voucher = voucher($person); if ($voucher) { html('<p>Your Voucher Code is: <strong>'.$voucher.'</strong></p>'); } else { html('<p>There are no more Voucher Codes available. Please contact us at ....</p>'); }
In public questionnaires, the case number can also be used as a personal identifier. However, be sure to prevent bots from automatically filling in the form.
// Only use this variant with great care! $person = 'C'.caseNumber(); $voucher = voucher($person); html('<p>Your Voucher Code for this interview is: <strong>'.$voucher.'</strong></p>');
If respondents did not write down the code, you can create an additional questionnaire that displays the coupon code again. To do this, set the third parameter of the voucher() function to false. This ensures that someone who did not complete the original questionnaire — and therefore did not receive a coupon — cannot obtain one through this “shortcut.”
$person = caseSerial(); $voucher = voucher($person, 1, false); html('<p>Your Voucher Code from Wave 1 is still: <strong>'.$voucher.'</strong></p>');