Skip to main content

FV Decipher Support

All the topics, resources needed for FV Decipher.

 
FocusVision Knowledge Base

Managing Server-Specific Sample Sources

  Requires Decipher Cloud & Server Admin

Overview

With a Decipher Cloud server, you can replace or modify the sample sources available for your company within the survey editor. You can also append new sample sources if desired.

1: Modifying Sample Sources

Modifying a company's sample sources requires overwriting its existing sampleProviders variable, which is a list of dictionaries. This process differs depending on whether you are replacing the default sample sources, editing the existing specifications, or appending additional sample sources.

1.1: Replacing Sample 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 sample sources' names, variables, exit links, etc.:

sampleProviders = [
 {
     'index'         : 200,
     'setupSampleSource': 'yes',
     'sampleName'    : 'NEW SAMPLE 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'
 }
]

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 sample 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 sample 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 sample sources will overwrite the defaults and be available within the Sample Sources tab in the survey editor:

1.2: Editing Sample Source Specifications

To edit the existing sample source specifications for your company, first download the following file:

sampleproviders.py

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 Sample Sources

To append additional sample sources to the available defaults, modify the following template to reflect the new sample sources' names, variables, exit links, etc.:

newSampleProviders = [
 {
     'index'         : 200,
     'setupSampleSource': 'yes',
     'sampleName'    : 'NEW SAMPLE 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.append(newSampleProviders)

Once you have created your new sample 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 sample sources will appear alongside the defaults and be available within the Sample Sources tab in the survey editor.

  • Was this article helpful?