Requires Decipher Cloud & Server Admin
With a Decipher Cloud server, you can replace or modify the participant sources available for your company within the Survey Editor. You can also append new participant sources if desired.
1: Modifying Participant Sources
Modifying a company's participant sources requires overwriting its existing sampleProviders
variable, which is a list of dictionaries. This process differs depending on whether you are replacing the default participant sources, editing the existing specifications, or appending additional participant sources.
1.1: Replacing Participant Sources
To replace the default sample providers for your company, you will need to replace the default sampleProviders
variable with one of your own. To replace the sampleProviders
variable, modify the following template to reflect the new participant sources' names, variables, exit links, etc.:
sampleProviders = [ { 'index' : 200, 'setupSampleSource': 'yes', 'sampleName' : 'NEW PARTICIPANT SOURCE NAME', 'unique' : 'yes', 'sourceName' : 'RESP_UNIQUE_ID_VAR', 'extraVariables': ['EXTRAVAR'], 'requireUnique' : True, 'invalidText' : 'You are missing information in the URL. Please verify the URL with the original invite.', 'completedText' : 'It seems you have already entered this survey.', 'qual' : 'link', 'msgQualified' : 'Thank you for taking our survey. Your efforts are greatly appreciated!', 'linkQualified' : 'http://sample.source.com?status=qual&id=${id}', 'term' : 'link', 'msgTerminated' : 'Thank you for taking our survey.', 'linkTerminated': 'http://sample.source.com?status=term&id=${id}', 'over' : 'message', 'msgOver' : 'Thank you for taking our survey.', 'linkOver' : '', 'xsapi' : 'UNIQUE-SAMPLE-SOURCE-DATA-API-KEY' } ]
Note: The xsapi
argument only needs to be added if the sample provider is configured with the API system. Learn more.
Once you have created your new participant sources, add it to the sampleproviders.py
file located in the data/
directory of your company server (i.e., using data/sampleproviders.py
).
For example, a file with multiple new participant sources may look like this:
sampleProviders = [ { 'index' : 200, 'setupSampleSource': 'yes', 'sampleName' : 'Awesome Opossum Sample', 'unique' : 'yes', 'sourceName' : 'opID', ... ... }, { 'index' : 201, 'setupSampleSource': 'yes', 'sampleName' : 'Other Sample Co.', 'unique' : 'yes', 'sourceName' : 'respID', ... ... } ]
The new participant sources will overwrite the defaults and be available within the Participant Sources tab in the Survey Editor.
1.2: Editing Participant Source Specifications
To edit the existing participant source specifications for your company, first download the following file:
Make any necessary adjustments to the information included within this file, and then save the file under the same name. Once you are satisfied with your changes, upload your updated sampleproviders.py
file into the data/
directory of your Decipher server.
1.3: Appending Participant Sources
To append additional participant sources to the available defaults, modify the following template to reflect the new participant sources' names, variables, exit links, etc.:
newSampleProviders = [ { 'index' : 200, 'setupSampleSource': 'yes', 'sampleName' : 'NEW PARTICIPANT SOURCE NAME', 'unique' : 'yes', 'sourceName' : 'RESP_UNIQUE_ID_VAR', 'extraVariables': ['EXTRAVAR'], 'requireUnique' : True, 'invalidText' : 'You are missing information in the URL. Please verify the URL with the original invite.', 'completedText' : 'It seems you have already entered this survey.', 'qual' : 'link', 'msgQualified' : 'Thank you for taking our survey. Your efforts are greatly appreciated!', 'linkQualified' : 'http://sample.source.com?status=qual&id=${id}', 'term' : 'link', 'msgTerminated' : 'Thank you for taking our survey.', 'linkTerminated': 'http://sample.source.com?status=term&id=${id}', 'over' : 'message', 'msgOver' : 'Thank you for taking our survey.', 'linkOver' : '', 'xsapi' : 'UNIQUE-SAMPLE-SOURCE-DATA-API-KEY' } ] sampleProviders.extend(newSampleProviders)
Once you have created your new participant sources, add them to the sampleproviders.py
file located in the data/
directory of your company server (i.e., using data/sampleproviders.py
).
The new participant sources will appear alongside the defaults and be available within the Participant Sources tab in the Survey Editor.