Guideskip logicconditional logicquestionnaire testingdata quality

How Do You Validate Questionnaire Branch Logic? Use Truth Tables to Uncover Overlaps, Dead Ends, and Misrouting

Translate natural-language requirements into prioritized Boolean specifications, then verify pages, terminal states, and exports using ten risk-profile test cards. Distinguish between structural inapplicability, refusals, and procedural missingness.

Updated September 2, 2026 34 min read

A renewal study looked perfectly normal in preview: product users would receive experience questions, non-users would be routed to reason questions. After fieldwork, however, the team discovered that respondents who were "enterprise customers and chose 'Don't know'" satisfied both the enterprise branch and fell into the default non-user branch. The system applied first-match rules, rendering one path unreachable. Pages showed no errors and data exported fine, but the two groups' meanings were already conflated.

The standard for correct branch logic is not "I could click through once and submit," but that for every input of research significance or high risk, respondents see the intended content, reach a unique terminal state, and the export yields intended codes. Path diagrams help communicate flow but cannot independently prove mutual exclusivity or completeness of coverage; multi-condition questionnaires require a truth table and a set of test identities with expected outcomes.

Logical Design Starts from Data Requirements, Not Arrows

Start by writing the groups the final analysis needs to distinguish. Suppose the renewal study only needs to compare three groups—"used the new feature in the past 30 days," "aware but did not use," and "unaware of the feature"—and all three groups must answer overall renewal intention. This gives the data specification first:

  • eligible: whether the respondent belongs to the target customer population;
  • feature_state: used, aware_not_used, unaware, unknown;
  • disposition: consent_decline, screenout, quota_full, complete, partial;
  • asked_q12: whether the experience question was actually displayed, distinguishing inapplicability from nonresponse;
  • questionnaire_version: whether pre- and post-logic-change versions can be identified.

Common indicators should remain on the common path where eligible branches reconverge; only those with the relevant experience should see diagnostic questions. If users and non-users each answer entirely different overall outcome batteries, the report cannot determine whether differences stem from population or question. Fields, denominators, and missing rules can be provisioned first in the survey codebook guide.

Display, Routing, Validation, Termination, and Computation Are Distinct Actions

ActionPurposeCommon Misuse
Conditional displayShow a question, option, or instruction in the current flowCopying complex conditions to each question; updating one definition while missing other items
Routing/skipSend respondents into applicable modules, with possible reconvergenceMultiple rules match simultaneously without specified priority
Input validationRestrict format, range, or number of optionsTreating genuine answers that don't match business expectations as "invalid input"
TerminationProduce non-continuable terminal states like refusal, screenout, or quota fullRecording all early terminations as the same "incomplete" category
Computation and flaggingSave eligibility, grouping, randomization arm, or quality flagsOnly computing display values; export lacks stable raw variables

The same business rule can trigger both flagging and routing, but results should be written separately. For example, "did not use in past 30 days" first sets feature_state=aware_not_used and then routes into the non-use reason module; it should not simply read "skip to Q18." Question numbers change; semantic variables are more stable.

Rewrite Verbal Rules into Prioritized Specifications

In the case study, there are six input dimensions: whether consent was given, age status, whether a customer in the last 90 days, whether an employee of the company, feature awareness/use status, and whether the corresponding role quota is full. A simple eligibility expression could be written as:

eligible = consent_yes AND age_18_plus AND customer_90d_yes AND employee_no

But that is not enough, because "Don't know" and refusal are not automatically equal to "No," and quotas should only be checked after eligibility is established. The following execution order is suggested:

  1. If consent is not given: record consent_decline, do not enter study items;
  2. If age is ineligible or project rules cannot confirm adult status: record specific screenout reason;
  3. If not a customer in the last 90 days or an employee subject to exclusion: record respective screenout reasons;
  4. After eligibility is established, check the corresponding analysis-cell quota; if full, record quota_full;
  5. When quota is open, enter mutually exclusive modules by used, aware_not_used, unaware, unknown;
  6. Each module returns to the common outcome questions; only normal submission is recorded as complete.

Priority resolves which condition executes first when multiple are simultaneously true. For example, if an employee is also a customer, customer status must be determined first, then the employee rule screens them out; the enterprise customer quota being open should not allow them into the main survey. Terminal states should be mutually exclusive; every legitimate input should have a destination; a default branch is reserved solely for clearly registered residual states—not as a trash can masking unhandled conditions.

Three-Valued States Are Safer Than Forced Dichotomies

Real answers often include "Yes, No, Unknown/Refused," not just true and false. If the rule says, "if not yes, treat as no," then nonresponse, load failure, "Don't know," and explicit denial get conflated. Designers must decide per question:

  • Whether unknown still allows answering other research questions;
  • Whether refusal affects ethical eligibility to continue;
  • When a question is not displayed, should the field be empty, a dedicated inapplicability code, or a separate display flag;
  • After navigating back and changing earlier answers, whether prior branch answers are retained, cleared, or flagged as invalid.

"Not displayed" is structural missingness due to questionnaire design; "displayed but skipped" is item nonresponse; "Don't know" is a legitimate answer state. If all three collapse to blanks in the export, analysts cannot determine denominators and may mistakenly count non-users as dissatisfied with the feature.

A Truth Table First Exposes Rule Overlaps

ConsentEligibilityQuotaFeature StatusUnique Expected Path/Terminal State
NoNot evaluatedNot checkedNot askedconsent_decline
YesIneligibleNot checkedNot askedscreenout, with reason saved
YesEligibleFullIrrelevantquota_full
YesEligibleOpenusedExperience module → Common outcomes
YesEligibleOpenaware_not_usedAdoption-barrier module → Common outcomes
YesEligibleOpenunawareNeeds module → Common outcomes
YesEligibleOpenunknownMinimal common path, with unknown status retained

If each of six dimensions has two to three values, unconstrained combinations can reach hundreds. Not all impossible combinations need manual submission, but you must first exclude logically invalid ones, then cover each terminal state, boundary, and high-risk interaction. Path diagrams are good for seeing "is there an exit?" while truth tables reveal "does the same input hit two rules?" and "is there a gap that no rule catches?"

Ten Identity Cards Turn Specifications into Repeatable Tests

CardKey InputsAssertions to Verify
T01 Refusalconsent = NoNo study items; terminal state is consent_decline; cannot go back to bypass consent
T02 Age lower bound17 years, 364 daysscreenout_age; main questionnaire fields not displayed
T03 Age boundaryExactly 18, otherwise eligibleAllowed to continue, proving "≥18" is used
T04 Employee-customerCustomer in last 90 days and employeescreenout_employee; no consumption of customer quota
T05 UsedEligible, quota open, usedOnly sees experience module and common outcomes; feature_state = used
T06 Aware, not usedEligible, aware_not_usedDoes not see experience evaluation; enters barrier module; asked_q12 = 0
T07 UnawareEligible, unawareEnters needs module; does not treat unknown brand experience as a low score
T08 Don't knowEligible, unknownDoes not fall into "not used"; retains unknown code
T09 Quota boundaryLast available slot and first session after quota fullFirst enters, second gets quota_full; no over-recruitment or misclassification under concurrency
T10 Back-and-changeSelect used and answer, then change to aware_not_usedOld experience answers invalidated per defined rules; export does not simultaneously claim two states

Each card saves the candidate version, device, test session, actual pages visited, final state, and export row. On test failure, fix the rule and rerun affected cards plus neighboring boundaries. A single page screenshot is insufficient to prove passage—the page may look right while the terminal state or fields are wrong.

When Combinations Multiply, Cover by Risk First, Then Pairwise

NIST's combinatorial testing research notes that many software faults are triggered by interactions among few parameters; pairwise coverage catches many interaction issues but does not guarantee catching faults requiring three or more conditions simultaneously. For questionnaires, list all factors and values, then apply three tiers of testing:

  1. Every terminal state, every main branch, and every numeric/date boundary must be covered;
  2. For ordinary conditions, cover pairwise combinations where feasible—for example, language × device, customer type × feature state;
  3. For high-risk business rules, manually include combinations of three or more—for example, "employee × enterprise customer × quota full"—never omit these just because pairwise coverage passed.

Combinatorial testing is merely a method for generating inputs; expected results still must come from research and program specifications. If the team cannot articulate where a given combination should go, that is a requirements deficiency, not a test gap that more clicking will fix.

Automated Rules Also Require Pretesting with Target Respondents

The U.S. Census Bureau's Quality Standard A2 requires pretesting to verify that question order and skip logic are logically clear and to retain tool specifications, final test inputs, and results. Its questionnaire testing methods appendix further notes that when skip logic is extensive, the test sample must be sufficient to observe different paths; automated questionnaires also need to check navigation and error correction.

Program testing proves that "after selecting X, the system goes to Y," but it does not prove that respondents know they should select X. For example, "Are you an active customer?" without a defined observation window may be interpreted differently—by login, payment, or subjective relationship. Semantics of screening questions must be reviewed before and after logic development; when necessary, use cognitive interviewing methods to observe how target populations understand and answer.

Public Questionnaire Specifications Show How to Write Clear Programming Instructions

Pew Research Center's 2025 NPORS Online and Telephone Questionnaire publishes eligibility, whether an item is required, prompts after skipping, answer codes, continue-or-terminate conditions, termination wording, and whether going back is allowed. Its value lies not in copying its rules, but in showing that an executable questionnaire should not consist solely of screen text: programming notes are part of research tools.

Your own specifications can use five statement types: "ASK IF / SET / GO TO / TERMINATE / EXPORT," with each rule pointing to stable variables. Natural language should still be precise enough that testers who did not attend design meetings can independently determine expected outcomes from the same input.

Production Monitoring Watches for Impossible Events, Not Just Completion Rates

After release validation and small-scale soft launch, full fieldwork should still be monitored by version:

  • Whether an expected main path is continuously zero;
  • Whether mutually exclusive groups are simultaneously true or all empty;
  • Whether screenouts, quota full, refusals, and break-offs are incorrectly merged;
  • Whether answers appear for questions that should not be displayed, or key displayed questions are structurally all blank;
  • Whether a particular source, language, or device all fall into the same anomalous terminal state;
  • Whether path length and break-off positions change abruptly compared to the soft launch.

If misrouting or data contamination is found, pause, save affected sessions with timestamps, generate a new version, and rerun test cards. Do not overwrite production rules and then unconditionally merge pre/post data; when eligibility, question meaning, or branching changes, the two batches may represent different measurement processes.

Before Configuring Logic in SurveyPie, Prepare the Acceptance Package

Teams can configure display, skip, and termination conditions in SurveyPie according to frozen specifications, then validate different paths through preview and test responses. The platform executes configured rules; the research team is responsible for proving those rules are complete. Every added condition should trigger updates to the truth table, identity cards, codebook, and version summary.

When logic reaches release readiness, the team should be able to deliver not merely "all paths clicked through successfully," but four artifacts: a mutually exclusive and exhaustive condition table, ten risk identity cards with expected results, evidence that pages and exports align, and production monitoring for impossible events. Missing any one of these, a beautiful path diagram remains a design intention, not a validated questionnaire system.

References for Skip Specifications and Combinatorial Testing