Conditional Logic Examples
Example 1: Gift message field appears only when gift wrapping is selected
Scenario: The option set has a Switch element (“Add gift wrapping?”) and a Text Area (“Gift message”). The gift message should only appear when the customer turns on gift wrapping.
Setup:
- Open the Text Area element → Conditions tab
- Set action to Show when
- Add rule:
"Add gift wrapping?"→is on - Save
Result: The “Gift message” textarea is invisible on page load. It appears immediately when the customer enables the “Add gift wrapping?” toggle.
Example 2: Personalization fields only appear for engraved variant
Scenario: You sell a watch that can be ordered plain or engraved. A Dropdown (“Version”) has two values: “Standard” and “Engraved”. Name and message fields should only appear when “Engraved” is selected.
Setup:
-
Open the “Name” Text Input → Conditions tab
-
Action: Show when
-
Rule:
"Version"→is→Engraved -
Open the “Message” Text Area → Conditions tab
-
Same rule:
"Version"→is→Engraved
Result: Both personalization fields are hidden when “Standard” is selected and appear automatically when the customer switches to “Engraved”.
Example 3: Rush order section appears only on certain delivery dates
Scenario: You need to show a “Rush fee” notice and a Contact Number field if the customer picks a delivery date before a specific cutoff.
Setup:
-
Open the Paragraph element (“Rush orders require a contact number”) → Conditions tab
-
Action: Show when
-
Rule:
"Delivery date"→is before→2024-12-20(Note: relative date conditions like “within 4 days of today” are not currently supported — use a fixed date instead.) -
Open the Phone Number element (“Contact number”) → same condition
Result: Both the notice and the phone field are hidden by default. They appear when the customer picks a date before the cutoff date you set.
Example 4: Show different options per color swatch selection
Scenario: A Color Swatch element has “Red”, “Blue”, and “Custom”. When “Custom” is selected, show a Text Input for a hex code.
Setup:
- Open the Text Input (“Custom hex code”) → Conditions tab
- Action: Show when
- Rule:
"Color"→is→Custom
Result: The hex code field only appears when “Custom” is selected.
Example 5: Combining AND conditions
Scenario: Show a “Priority handling” checkbox only when (a) the order type is “Business” AND (b) the customer has indicated a business name.
Setup:
- Open “Priority handling” Checkbox → Conditions tab
- Action: Show when
- Rule 1:
"Order type"→is→Business - Combinator: AND
- Rule 2:
"Order type (Text Input)"→contains→Business
Result: The checkbox only appears when both conditions are true simultaneously.