Skip to content

Conditional Rules โ€‹

The Visual Rule Builder lets you create logic that dynamically controls field behavior based on what the customer has already selected โ€” no code required.

Pro feature

Conditional Rules are available on the Pro plan only. Upgrade to unlock โ†’

What Are Rules? โ€‹

A rule is an "if/then" statement that runs in real time on the storefront as customers interact with your fields.

Example: "If the customer selects 'Yes' in the 'Add Custom Embroidery?' field, then show the 'Custom Text' and 'Thread Color' fields."

Without rules, all fields are always visible. Rules give you a way to build progressive, context-aware forms โ€” only showing relevant options based on prior selections.

How Rules Work โ€‹

Each rule has:

  1. Conditions โ€” One or more field-value pairs that must be true. You can require all conditions to match (AND logic) or any one of them (OR logic).
  2. Target Field โ€” The field that the rule acts on.
  3. Action โ€” What happens to the target field when conditions are met.

Available Actions โ€‹

ActionEffect
ShowMakes a hidden field visible.
HideHides a visible field (and clears its value).
RequireMakes the field required when conditions are met.
Set OptionsReplaces the field's option list with a new set of values.
Set Price AdjustmentsReplaces the field's price adjustment map dynamically.

Creating a Rule โ€‹

  1. Open the Template Editor and click the Rules tab.
  2. Click + Add Rule.
  3. Under Conditions, select a field and the value it must equal.
  4. Click + Add Condition to add more conditions if needed. Toggle All / Any to control whether conditions are AND'd or OR'd.
  5. Under Then, select the Target Field and the Action.
  6. Click Save Template.

Changes take effect immediately on the storefront โ€” no cache to clear.

Rule Ordering โ€‹

Rules are evaluated in the order they appear. Drag the โ‰ก handle to reorder rules. If two rules target the same field, the last matching rule wins.

Practical Examples โ€‹

Show a text field when an option is selected โ€‹

If "Add Custom Name?" equals "Yes"
Then Show field "Custom Name"

Default state: "Custom Name" is hidden. It only appears when the customer selects "Yes".

Swap dropdown options based on a prior selection โ€‹

If "Garment Type" equals "Youth"
Then Set Options on "Size" = ["YXS", "YS", "YM", "YL", "YXL"]

This replaces the adult size list with youth sizes dynamically.

Require a field conditionally โ€‹

If "Rush Order?" equals "Yes"
Then Require field "Ship-By Date"

The date field becomes required only when the customer opts for rush processing.

Tips & Best Practices โ€‹

  • Hide by default, show on condition is the most common pattern. Start with fields hidden and use "Show" rules to reveal them.
  • Keep conditions simple. Complex multi-condition rules are harder to debug. Break them into multiple simpler rules when possible.
  • Rules run client-side in real time. There is no server round-trip โ€” changes to field visibility are instant.
  • Rules only control field visibility and options. Validation (required fields) is still enforced at add-to-cart time.

SaasyLlama โ€” Niche Apps. Built Different.