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:

  1. Open the Text Area element → Conditions tab
  2. Set action to Show when
  3. Add rule: "Add gift wrapping?"is on
  4. 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:

  1. Open the “Name” Text Input → Conditions tab

  2. Action: Show when

  3. Rule: "Version"isEngraved

  4. Open the “Message” Text Area → Conditions tab

  5. Same rule: "Version"isEngraved

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:

  1. Open the Paragraph element (“Rush orders require a contact number”) → Conditions tab

  2. Action: Show when

  3. Rule: "Delivery date"is before2024-12-20 (Note: relative date conditions like “within 4 days of today” are not currently supported — use a fixed date instead.)

  4. 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:

  1. Open the Text Input (“Custom hex code”) → Conditions tab
  2. Action: Show when
  3. Rule: "Color"isCustom

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:

  1. Open “Priority handling” Checkbox → Conditions tab
  2. Action: Show when
  3. Rule 1: "Order type"isBusiness
  4. Combinator: AND
  5. Rule 2: "Order type (Text Input)"containsBusiness

Result: The checkbox only appears when both conditions are true simultaneously.