Skip to main content
Conditional logic allows you to dynamically change the appearance of any component on your paywall or onboarding screen based on runtime context — device info, selected product, user properties, or custom screen variables. For example, you can highlight a specific product’s price in bold when the user selects it, hide an element on Android, or change the background color for dark mode users.
Make sure your Qonversion SDK is updated to the latest version that supports conditional logic. See the SDK Requirements section below.

How It Works

Each component on your screen has style blocks (Typography, Size, Spacing, Background, etc.). You can attach conditional rules to any style block. Each rule contains:
  1. Conditions — when should this rule apply (e.g., “Platform equals iOS AND Theme equals dark”)
  2. Style overrides — what properties to change when the conditions are met (e.g., set font-size to 24px and color to white)
At runtime, the Qonversion SDK provides the context (device info, user data, product details), and the conditional logic evaluator checks each rule top-to-bottom. The first matching rule wins — its overrides are applied, and subsequent rules are skipped. If no rule matches, the component keeps its default styles.

Step-by-Step Example: Changing Typography for iOS Dark Mode

Let’s walk through a real example. We’ll change the title text style when the user is on iOS in dark mode — applying a different font, size, weight, and color to ensure the text looks great on dark backgrounds.

1. Select the component

Click on the text component you want to add conditional logic to. In this example, we select a title text on the paywall screen.

2. Open the Conditional Rules modal

In the right sidebar, find the Typography style block. Hover over the block header — a lightning bolt icon will appear. Click it to open the Conditional Rules modal.

3. Add a new rule

Click Add Rule at the bottom of the modal. A new empty rule appears with a condition group and a style overrides section.

4. Set the conditions

We need two conditions combined with AND logic: First condition:
  • Variable: select Platform from the Device category
  • Operator: select equals
  • Value: select iOS
Second condition:
  • Variable: select Theme from the Device category
  • Operator: select equals
  • Value: select dark
This means: “Apply this rule when the user is on iOS AND using dark mode.”

5. Set the style overrides

In the Overrides section below the conditions, configure the typography changes:
PropertyValue
Font familySystem UI
Font size22 px
Font weightSemi Bold (600)
Color#f3e5e5 (light warm tone)
Line height20 px
These values will override the component’s default typography when both conditions are met.
Conditional Rules modal with typography overrides

6. Save and preview

Click Apply to save the rules. The lightning bolt on the Typography block now shows a badge with the rule count. To test it, open the Preview Conditions Panel (the test tube icon in the header). You can manually change the Platform and Theme variables to see how the component reacts in real time.

Conditions In Detail

Condition Groups: AND / OR

Conditions within a rule are organized in groups. Each group has a logical operator:
  • AND — all conditions in the group must be true
  • OR — at least one condition must be true
Click the and/or label between conditions to toggle the group operator. Groups can be nested up to 2 levels deep, allowing complex expressions like:
(Platform equals iOS AND OS Version greater_or_equal 16.0)
OR
(Platform equals Android AND OS Version greater_or_equal 13.0)

Available Variables

Device

VariableTypeExample values
PlatformStringiOS, Android
OS VersionVersion16.0, 14.5.1
LanguageStringen, fr, de
LocaleStringen_US, fr_FR
ThemeStringlight, dark
App VersionVersion1.0.0, 2.3.1
CountryStringUS, GB, DE

Products

VariableTypeDescription
Selected ProductStringThe product ID the user currently has selected
Has Any IntroBooleanWhether any product has an introductory offer
Per-product Has IntroBooleanWhether a specific product has an intro offer
Per-product Intro TypeStringfree_trial, pay_as_you_go, or pay_up_front
Product variables are generated dynamically based on the products configured for your screen.

User

VariableTypeDescription
EntitlementsArrayList of user’s active entitlements
Has Any EntitlementBooleanWhether the user has at least one active entitlement
Is First LaunchBooleanWhether this is the user’s first app launch
Days Since InstallNumberNumber of days since the app was installed

Available Operators

OperatorWorks withDescription
equalsAll typesExact match (case-insensitive for strings)
not equalsAll typesInverse of equals
inString, VersionValue is one of a comma-separated list
not inString, VersionValue is not in the list
containsArray, StringArray includes the value, or string contains substring
does not containArray, StringInverse of contains
greater thanNumber, VersionNumeric or semantic version comparison
less thanNumber, VersionNumeric or semantic version comparison
greater or equalNumber, VersionNumeric or semantic version comparison
less or equalNumber, VersionNumeric or semantic version comparison
is emptyArray, StringArray has no elements, or string is empty/null
is not emptyArray, StringArray has elements, or string is non-empty
Version comparisons (for OS Version and App Version) use semantic versioning — each segment is compared numerically. For example, 16.0 is greater than 9.3.6.

Rule Priority

Rules are evaluated top to bottom within each style block. The first rule whose conditions evaluate to true is applied — all subsequent rules are skipped. This means you should order your rules from most specific to least specific:
Rule 1: Platform = iOS AND Theme = dark    -> white text, large font
Rule 2: Platform = iOS                     -> dark text, large font
Rule 3: (default — no conditions match)    -> keeps default styles
You can drag rules to reorder them in the Conditional Rules modal.

Activating and Deactivating Rules

Each style block has an Active toggle in the Conditional Rules modal header. When toggled off:
  • All rules are preserved (not deleted)
  • Rules are not evaluated at runtime
  • The lightning bolt indicator remains visible but rules have no effect
This is useful for temporarily disabling conditional logic without losing your configuration.

Testing with Preview Panel

You don’t need to publish your screen to test conditional logic. The No-Code Builder has a built-in Preview Conditions Panel that lets you simulate any combination of variables and instantly see how your rules affect the screen — right inside the editor.

How to open the panel

  1. Make sure you have at least one conditional rule configured on any component
  2. Switch to Preview mode using the toggle in the builder header
  3. The Preview Conditions Panel automatically appears on the left side of the screen
The panel lists every variable used in your conditional rules across all components on the current screen.

Testing variables

Each variable has an appropriate input control depending on its type:
  • Dropdowns — for variables with predefined values (Platform, Theme, Selected Product, Intro Type, etc.). Just pick a value from the list
  • Checkboxes — for boolean variables (Has Any Intro, Has Any Entitlement, Is First Launch, etc.). Toggle on or off
  • Text inputs — for string and version variables (OS Version, Language, App Version, Country, etc.). Type any value to simulate
  • Number inputs — for numeric variables (Days Since Install, etc.)
As you change values, the canvas updates in real time — you can see exactly which styles are applied and how the screen looks for any combination of conditions.

Active Rules

The bottom section of the panel shows Active Rules — a live list of which rules are currently matching based on the current variable values. This makes it easy to verify that the right rules fire for the right conditions.
Preview Conditions Panel
Try different combinations of variables to make sure your rules cover all the edge cases — for example, switching between iOS and Android while toggling dark mode, or selecting different products to verify the highlighting works correctly.

Common Use Cases

Highlight the selected product

Condition: Selected Product equals the product ID Typography override: Bold font weight, accent color Use case: Make the currently selected product’s title or price stand out visually.

Platform-specific layout

Condition: Platform equals iOS / Android Spacing or Size override: Adjust padding, margins, or dimensions Use case: Account for platform-specific UI conventions (e.g., larger touch targets on Android).

Dark mode support

Condition: Theme equals dark Typography + Background + Border override: Light text on dark background, adjusted border colors Use case: Ensure your paywall looks great in both light and dark themes.

Show/hide elements by entitlements

Condition: Has Any Entitlement equals true Appearance override: Visibility hidden Use case: Hide the purchase button for users who already have an active subscription.

Free trial badge

Condition: Product Has Intro equals true AND Intro Type equals free_trial Appearance + Typography override: Show a badge, change text color Use case: Visually indicate which products offer a free trial.

First-time user experience

Condition: Is First Launch equals true Any style override: Different layout, larger text, highlighted CTA Use case: Show a more prominent onboarding experience for first-time users.

SDK Requirements

Conditional logic requires the following minimum SDK versions:
PlatformMinimum Version
iOS6.8.0
Android No-Codes SDK1.7.0
FlutterComing soon
React NativeComing soon
UnityComing soon
CordovaComing soon
CapacitorComing soon
The SDK provides runtime context to the paywall via the setContext event. If the SDK version is too old, conditional logic rules will still be present in the published HTML but the context will be empty — meaning no rules will match and default styles will be shown.

Limitations

  • Conditional logic is available for Mobile Paywall and Mobile Onboarding screen types only
  • Condition groups can be nested up to 2 levels deep
  • Each group supports up to 10 conditions
  • A soft warning appears when a style block has 20+ rules (no hard limit)
  • Rules are evaluated client-side in the published HTML — complex rule sets may have a minor performance impact
  • Screen variables are local to the screen and are not persisted across sessions