Multi-mode: How to block an AskiaWeb contact when it has been switched in CATI
The article explain how to block a web respondent in case of multi-mode survey
|Written for||Scripters and Data Processors|
script; askiascript; multi-mode; webprod;switch
If you're running a multi-mode survey, you may need to block a contact on the web side, when you have switched it back to CATI.
The first thing you need to know is that WebProd has it own survey data database (named WebInterviews) where interview data is stored for each survey. Here how it works:
Web survey only
Web interview data is sent in real time from WebProd (WebInterviews) to CCA (Surveys).
Interview started in CATI, then a link to the web survey is sent from CATI
CATI Interview data is sent from CCA (Surveys) to WebProd (WebInterviews) and the contact is blocked on CATI side.
Interview started in Web and switched back to CATI
Web Interview data is sent to CCA (Surveys). But the link to the web survey is still available.
Here how to deal with case 3. For that, you need to get two pieces of information:
- The SQL link to the WebInterviews database.
- The name of the WebInterviews table for your survey.
Then, in AskiaDesign, you need to:
1 - Import the Guid
The Guid is the unique identifier across all data collection modes. This Guid is used in various places in our databases.
Create a "Guid" open ended question. And, with a routing at the very start of the survey, specify the Interview.GUID in it. There is a small subtlety as the Guid value specified is surrounded with brackets, while, on AskiaField tables, that's not the case:
In your specified value, you will nee to remove these brackets with the following syntax:
Now you have a value that can be used in SQL queries.
2 - Update the WebInterviews survey table
Add a Start SQL Query at the end of your survey.
DSN is your SQL link to WebInterviews table:
Provider=sqloledb;Data Source=[YourSQLServer];Initial Catalog=[YourWebInterviewsDatabase];Trusted_Connection=no;User Id=[YourSQLLogin];Password=[YourSQLPassword]
Update [YourWebInterviewSurveyTable] Set IsCompleted=1, IsSentToCca=1 where Guid='??[YourGuidQuestion]??'
With the IsCompleted tag in Webinterview set as True, the respondent can no longer use the DoPanel link. He/she will get an "already completed" final page.