How to Auto-Cancel an Interview by Quality Control Flags


When running an interview, in some cases you would like to cancel the interview due to certain quality control flags rather than waiting for the result to be collected and reviewed in the office.

Imagine the following scenario: Surveyors are sent to a remote location for the weekend to conduct interviews and have to meet certain quotas.

The back office is closed on weekends and so surveyors complete their work and return home. In the following week, as part of the quality control process, it is discovered that a portion of the interviews are disqualified due to certain quality control flags. In such scenarios, you will at times be required to send your surveyors back to the field which may come with a high cost. 

With this feature, you can now automatically disqualify interviews if certain quality control flags appear, so quotas won't be affected and your surveyors can complete their work while in the field.

Using the “OnSurveyQCFlagChanged” callback function

To use the OnSurveyQCFlagChanged callback you need to add it to your survey's “Advanced scripts”. It receives an input of inFlags. This variable contains a Boolean value for each quality control flag indicating whether it is on or not.

See the following example code, wherein we wish to cancel the interview if we see that the mid survey flag ByFakeGPS is on:

function OnSurveyQCFlagChanged(inFlags)

The above will cause the interview to be canceled at the moment a fake GPS location is captured and identified.

Please Note: The quality control flags are not updated at the same point in time across the interview. The flags are divided into four categories by the manner in which they are updated:

  1. Survey Start - those that are set right at the start of the interview
  2. Mid Survey - those that are set immediately when they are violated
  3. Survey Save - those that are set when the interview is saved (either by auto-save, script, or manually)
  4. Survey End - those set after the interview is completed, and so do not trigger the callback unless the subject is re-entered after submitting.

In the following table you can see the division of flags by their categories:

Category Type

Survey Start

  • ByGPSServicesOff

Mid Survey

  • ByScript
  • ByRuntimeScriptError
  • ByClockChange
  • ByFakeGPS
  • ByGPSTimeDifferenceDate
  • ByGPSTimeDifferenceStale

Survey Save

  • ByQuestionTakingTooLong
  • StraightLining
  • ShortOpenEnededAnswer
  • ByAnswerCode
  • FlaggedByPartialRacing

Survey End

  • ByNoGps
  • ByBacktracking
  • ByGPSCapturedAtEnd
  • TooManySessions
  • OddHours
  • ByDuration
  • ByNoSilentRecordings
  • ByDeviceRooted
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.