Skip to Content
Conditional logicSetup

Set up conditional logic

Conditional logic lets an option appear only after the customer makes a particular choice — show a “Message” field only when “Gift wrap” is ticked, show a font picker only when engraving is turned on. You set this up with a visibility rule on the option you want to reveal.

How rules work

A rule lives on the option that should be shown, and points at one or more controlling options. Rules are show-if only: the option is hidden until its rule is satisfied, then it appears. There’s no “hide when” — you describe the conditions under which the option should show.

Only options the customer picks from a fixed list can control visibility — checkboxes, dropdown, radio, buttons, color swatches, and image swatches. Free-text, number, and file-upload options can’t be controllers (there’s no fixed value to match on). They can still be controlled — i.e. revealed by a rule.

Rules can only respond to other OptionWise options in the same option set. They can’t be based on the product’s native Shopify variants (such as size or color) — there’s no way to show or hide an option depending on the variant the customer has selected.

Add a rule

  1. Open the option you want to reveal, and click Show advanced settings.
  2. Open the Visibility panel. It starts on Always visible.
  3. Switch to Only visible when….
  4. A condition row appears: choose the controlling option, then the value it must be set to (“is set to”).
  5. Save the option set.

That option is now hidden on the storefront until the customer makes the matching choice. Here a Gift message field is set to show only when Gift wrapping is “Yes, please”:

The Visibility panel in the OptionWise option editor, set to 'Only visible when…' with a condition reading 'Gift wrapping is set to Yes, please'.

Multiple conditions

Add more conditions with Add condition. How they combine depends on whether they point at the same controlling option or different ones:

  • Same option → or. Two conditions on the same option (e.g. “Material is Oak” and “Material is Walnut”) mean either value — the option shows when the customer picks Oak or Walnut.
  • Different options → and. Conditions on different options must all hold — e.g. “Material is Oak” and “Add engraving is Yes” shows the option only when both are true.

You can combine the two: list several values for one option (any of which will do) while still requiring a second option to match as well.

Good to know

  • Rules track options and values by their identity, not their text — so renaming an option or a value later doesn’t break the rule.
  • OptionWise prevents loops: an option can’t depend on something that ultimately depends back on it. Such options won’t appear in the controller dropdown.
  • The in-editor preview and your live storefront apply rules the same way, so what you see in the preview is what customers get.