Conditional Logic for Fields and Screens

This guide explains how to use conditional logic to dynamically override property and style values based on user answers, experiment groups, location, device, UTM parameters, and other conditions in the quiz editor.

Overview

Conditional values allow you to change property values (for blocks) or style values (for screens and blocks) based on conditions evaluated during quiz execution.

Features

  • Conditional Logic: Set property values based on user properties or experiment groups
  • Multiple Rules: Create multiple override rules with AND/OR logic
  • Flexible Operators: Use various comparison operators including the new in / not in for multi-value matching
  • Smart Property Suggestions: The property field suggests common properties (UTMs, location, language, experiment groups, screen IDs) with autocomplete
  • Smart Value Suggestions: The value field automatically suggests relevant options depending on the selected property (variant names, language codes, country codes, UTM history, etc.)
  • Visual Indicators: Properties with conditional logic show a green slider icon
  • Block and Screen Support: Apply conditions to both block properties and screen properties

How to Access Conditional Logic

For Block Properties

  1. Select a screen from the screens list
  2. Select a content block from the content list
  3. In the Properties tab, find a property that supports conditional logic
  4. Click the slider icon next to the property name
  5. The Conditional Logic modal will open

For Screen Properties

  1. Select a screen from the screens list
  2. In the Screen Properties tab, find a property that supports conditional logic
  3. Click the slider icon next to the property name
  4. The Conditional Logic modal will open

Conditional Logic Structure

Each conditional override consists of:

  • Conditions: Rules that determine when the override applies
  • Value: The value to apply when conditions are met

Condition Types

  • AND: All conditions must be met (default)
  • OR: Any condition must be met

Available Operators

OperatorDescription
existsProperty exists and is not empty
not existsProperty does not exist or is empty
==Property equals value
!=Property does not equal value
>Property is greater than value
<Property is less than value
containsProperty contains value (substring match)
not containsProperty does not contain value
inProperty matches any of the selected values (multi-select)
not inProperty does not match any of the selected values

Available User Properties

The property field provides autocomplete suggestions. You can also type any custom property name.

❗️

Values are case sensitive. If you can't find your value in the dropdown list, input it manually and "select" it from dropdown to apply.

Quiz answers

Screen IDs from the current quiz are listed directly — e.g. screen-abc123. When a user answers a screen, their answer is stored under that screen's ID.

UTM parameters

utm_source, utm_medium, utm_campaign, utm_term, utm_content

The value field for UTM properties automatically loads the historical UTM values recorded for your project.

Language & location

PropertyDescription
user_languageBrowser language code, e.g. en, fr, de
user_location.country_codeISO 2-letter country code, e.g. US, GB
user_location.country_nameFull country name, e.g. United States
user_location.city_nameCity name
user_location.state_nameState / region name
user_location.zipPostal code
user_location.ipUser IP address

Device & viewport

PropertyDescription
user.platformOperating system: iOS, Android, Windows, Mac, Other
viewport.formatmobile or desktop
viewport.widthViewport width in pixels
viewport.heightViewport height in pixels

Subscriptions

PropertyDescription
subscriptions.paywall_idsIDs of paywalls the user has subscribed through
subscriptions.paywall_namesNames of those paywalls
subscriptions.price_idsPrice IDs of active subscriptions
subscriptions.price_external_idsExternal price IDs (Stripe, etc.)
subscriptions.price_external_codesExternal price codes

Experiment groups

exp_<id> — where <id> is the experiment's numeric ID. Holds the variant name the user was assigned to, e.g. Control or Variant A.

The value field for exp_* properties automatically shows the variant names configured for that experiment.


Creating Conditional Overrides

Step 1: Open Conditional Logic Modal

Click the slider icon next to any property that supports conditional logic.

Step 2: Add Override Rule

Click the "Add Override Rule" button in the modal footer.

Step 3: Define Conditions

In the left column, define the conditions:

  1. Select logic type: All of these (AND) or Any of these (OR)
  2. Click Add Condition to add a rule
  3. For each rule:
    • Property field: Type or pick from the dropdown. The dropdown suggests common properties — UTMs, language, location, exp_*, screen IDs, etc.
    • Operator: Choose from the operators table above
    • Value field: Type or pick from the dropdown. Suggestions are shown automatically based on the selected property. For the in / not in operators, you can select multiple values.

Step 4: Set Override Value

In the right column, enter the value that will be applied when conditions are met. The input type matches the property type (text, textarea, select, etc.).

Step 5: Save

Click Save and close to apply the conditional logic. The property will show a green slider icon indicating it has conditional logic.


Examples

Example 1: Conditional Button Text

Change button text based on a user's answer:

  • Condition: screen-abc123 == yes
  • Value: Continue to Payment

When the user answers "yes" on that screen, the button displays "Continue to Payment" instead of the default text.


Example 2: Conditional Title by Country

Change a screen title for users in specific countries:

  • Logic: All of these (AND)
  • Condition: user_location.country_code in US, CA, GB
  • Value: Special offer for your region!

Example 3: Conditional Visibility

Hide a block based on a condition:

  • Condition: screen-xyz == skip
  • Value: hide

Example 4: A/B Test Content Using Experiments

This is the primary use case for intersection experiments. Assign users to multiple experiments simultaneously, then use the exp_* properties to vary content anywhere in the quiz.

Setup

  1. Create an experiment with Allow experiments intersection enabled in the experiment settings. This allows the experiment to run alongside other experiments for the same user.
  2. Define variants, e.g. Control and Variant A.
  3. In the quiz editor, open conditional logic for any property (e.g. a headline's text).

Condition rules

Override rule 1 — Variant A:

  • Condition: exp_42 == Variant A
  • Value: Try our new approach — just 3 steps

Override rule 2 — Control (optional, if you want explicit override):

  • Condition: exp_42 == Control
  • Value: Get started in minutes

Tip: exp_42 is the property key for experiment with ID 42. The value dropdown will suggest your actual variant names automatically when you select this property.

How it works at runtime

When the quiz page loads, the backend evaluates all active intersection experiments for the user and sets window.user_properties.exp_42 = "Variant A" (or "Control"). The conditional logic engine reads this value and applies the matching override.

You can use exp_* properties in conditions anywhere in the quiz — block text, images, styles, screen visibility — giving you full flexibility to A/B test any part of the experience.

Testing multiple experiments at once

Because intersection experiments run simultaneously, a user can have several exp_* properties set at once:

user_properties = {
  exp_42: "Variant A",
  exp_55: "Control",
  exp_61: "Variant B"
}

Each experiment's conditions are evaluated independently, so you can A/B test the headline with experiment 42, a button color with experiment 55, and a screen layout with experiment 61 — all for the same user in the same session.


Example 5: Show Different Content by Language

Display a localised message for specific languages:

  • Condition: user_language in es, pt, pt-BR
  • Value: ¡Bienvenido!

Example 6: Mobile vs Desktop Layout

Apply a different style on mobile:

  • Condition: viewport.format == mobile
  • Value: column (for a flex-direction property)