Zu Hauptinhalten wechseln

FV Decipher Unterstützung

Alle Themen, Ressourcen für FV Decipher benötigt.


Adding Gift Code Incentives to Your Survey

1.  Overview

The following article describes how to implement prepaid gift code file in your survey to distribute 1 gift code per qualified respondent.  This method can be used with Amazon gift codes as well as many other providers. The following article utilizes the Decipher Database function to assign a random code to respondents.

2.  Preparing the Gift Code File

The file must be a single flat file with 1 code per line.  Name the file giftcodes.dat and upload it to the “System File (root)” using the project’s File Manager.  An example file can be downloaded here for reference.



3.  Add an Email Question (Optional)

Tip: It is recommended you add an email address question so you can contact this user in the event they have an issue with the supplied code. 

To set this up, add a Standard > Text question and apply the appropriate email verifier.  In this example, we will use the label “Qemail” for the email question.


4.  Storing the Respondent's Gift Code in the Data

At the end of your survey, add a Standard > Text survey element to store the gift code assigned.  Add the “where” setting from “More Options” and enter “report” in the box. This question will be hidden to respondents. In this example, we will use the label “Gift_Code” for the gift code question.

5.  Adding the Gift Code Assignment Code

Add a Structural > Exec survey element at the end of your survey. Enter the below in the text box and change the “When” setting to “init”.

giftcodes = Database("giftcodes.dat", lower=False)


Add another Structural > Exec survey element again at the end of your survey (after the Exec element just mad). Enter the below in the text box and change the “When” setting to “finished”.

if hasMarker("qualified"):
        Gift_Code.val = giftcodes.assignRandom()
    except RuntimeError:


6.  Providing the Gift Code to the Respondent

We recommends sending the codes via Campaign Manager after the respondent has completed.  For example, 1 week after you've launched, you can pull a qualified data set and use that for your recipient list.  

If you wish to provide the code instantly (not recommended), you can modify the “Qualified Respondents” message in Sample Sources.  Some sample text is supplied below. This message along with the gift code assigned will display for the respondent when they complete the survey.

Thanks for completing the survey! As promised, below is a $XX Gift Code you can redeem on millions of items sold by (STORE).

Gift Code: [pipe: Gift_Code]

Please print out this page prior to closing your browser.


Now when respondents complete the survey and are considered "qualified", they will get a code displayed to them on the end page. 

By instantly displaying codes, there is a chance respondents will try to automate your survey to obtain all gift codes. Please see survey recommendations section below to prevent this.

7.  Gift Code Survey Recommendations

  • Lock the survey down by a URL variable and a designated id list.
  • Turn on "Verify Unique Respondents".  This will prevent dupes to a certain extent.
  • Consider using a ReCaptcha to ensure there are no bots taking your survey.
  • Consider not instantly displaying the gift code.  Use our Campaign Manager to distribute codes.
  • Always have a reliable way of verifying the respondent's identity as you'll likely get some support request stating they didn't print their code out or they lost the code.  In our example above, we collect the email address and the gift code so we can easily identify what the code assigned was.
  • Buy extra codes (5%-10%) for your study in case issues appear. It will cost a little more but will save you from having to re-order more codes.
  • Set a quota to collect exactly the amount of respondents you have codes for. This will prevent overages from occurring.  See note about buying extra codes.
  • Set up an alert element when codes run out.  Set up an alert element as you would normally and set a raw condition to "not Gift_Code.val".

8.  Gift Code Q&A

  • What happens if codes run out and respondents are still going through the survey?  
    • There is code built-in to show no code to the respondent and allow completion still.  It is recommended you prevent this from occurring by following the "Gift Code Survey Recommendations" above.  Worse case, you'll have their email and you will have to correct the issue via email.
  • How are codes assigned and will this protect against duplicated codes being assigned?  
    • Codes from the file are assigned randomly and only 1 code can be assigned per qualified respondent. Once the code is assigned, it is removed from the available pool to prevent duplicate codes from being assigned.
      • Note: If the respondent refreshes the end page, another code will not be randomly assigned for that respondent. Our system will actually log this as a duplicate and show the "Terminated" message.
      • Note:  If respondents somehow are able to re-enter the survey legitimately and complete the survey again, they are eligible for another code.
  • How many gift code files are supported?
  • How many codes can I load?
    • We've seen files with 50,000-100,000 codes with no problems.  
  • Will codes assigned while testing be reset when I launch my project?
    • Yes, all codes assigned will be reset and available for use again by live respondents.
  • Can I load more codes during field?