Setting Up Conditions

Modified on Tue, 18 Nov at 8:55 AM

Overview

Conditions let you control when options appear to customers. They work like "if-then" rules: "IF this condition is true, THEN show/hide these options." This creates a cleaner, more personalized shopping experience by displaying only relevant choices.

Create dynamic option sets that show or hide based on customer selections, product attributes, or time-based rules.

Why Use Conditions?

  • Reduce option clutter by showing only relevant choices
  • Create product-specific experiences
  • Offer VIP or member-only options
  • Run time-limited promotions
  • Build dependent option flows (e.g., show color only after size is selected)

Before You Start

Make sure you have:

  • Created an option set with at least two options
  • Understanding of which options should be conditional
  • Clear idea of when options should show or hide

Accessing Conditional Logic

  1. Navigate to Option Sets page
  2. Click on the option set you want to add conditions to
  3. Click the Conditional Logic tab at the top
  4. Click Add Condition button

You're now ready to create your first condition!

Creating a Condition

Step 1: Choose Logic Operator

Start by selecting how your rules should work together:

Logic OperatorTypeHow It WorksUse WhenExample
If ANY of the followingORAt least one rule must be trueYou want flexibilityShow option if Day is Saturday OR Sunday
If ALL of the followingANDEvery rule must be trueYou need strict requirementsShow option if Customer is logged in AND has VIP tag

Step 2: Add Conditions

Click Add Condition to create rules. Each rule has three parts:

2.1 Select Field Type

Choose what to base your rule on:

Field TypeCategoryDescription
OptionOption-basedAnother option in this option set
Product TagProduct-basedTags on the product
Product PriceProduct-basedBase price of the product
Product TitleProduct-basedName of the product
Customer TagCustomer-basedTags on the customer
Customer Logged InCustomer-basedWhether customer is logged in
DateTime-basedSpecific dates
Day of WeekTime-basedDays of the week

2.2 Choose Operator

Select how to compare the field and value:

OperatorWorks WithDescriptionExample
isText, Number, DateExact matchSize is "Large"
is_notText, Number, DateDoes not equalColor is not "Red"
containsTextIncludes this textTitle contains "Premium"
does_not_containTextDoes not include textTag does not contain "Sale"
is_emptyTextNo value setCustomer Tag is empty
is_not_emptyTextHas any valueCustomer Tag is not empty
is_more_thanNumberGreater thanPrice is more than 100
is_less_thanNumberLess thanPrice is less than 50
is_beforeDateBefore this dateDate is before "2024-12-31"
is_afterDateAfter this dateDate is after "2024-01-01"

2.3 Enter Value

Specify what to compare against:

Field TypeInput MethodExample
OptionSelect the option and its valueSelect "Size" → "Large"
Product Tag/TitleType the tag or title textType "Premium" or "Summer"
Product PriceEnter the price amountEnter 100 (no currency symbol)
Customer TagType the customer tagType "VIP" or "Wholesale"
DateChoose date in YYYY-MM-DD format2024-12-31
Day of WeekSelect the dayMonday, Tuesday, etc.
Customer Logged InChoose true or falsetrue or false

Add more conditions: Click Add Condition again to add additional rules to this logic group.

Step 3: Add Actions

Click Add Action to define what happens when conditions are met:

3.1 Choose Action Type

ActionDefault StateBehaviorBest Use Case
ShowOption is hiddenAppears when condition is metOptions that only apply sometimes
HideOption is visibleDisappears when condition is metOptions that should disappear in certain cases

3.2 Select Target Option

Choose which option to show or hide when the condition passes.

Add more actions: Click Add Action to affect multiple options with the same logic.

Step 4: Add Another Logic Rule (Optional)

Click Add Logic Rule to create a separate group of conditions.

This creates a new box with:

  1. Its own logic operator (Any/All)
  2. Its own conditions
  3. Its own actions

ALSO label appears between logic rule boxes, meaning both logic groups are evaluated.

Example use case:

  • Logic Rule 1: If ANY of [Saturday, Sunday] THEN Show "Weekend Special"
  • ALSO
  • Logic Rule 2: If ALL of [Customer logged in, Has VIP tag] THEN Show "VIP Discount"

This lets you create complex conditional scenarios with multiple independent logic paths.

To delete a logic rule: Click the bin icon in the top right corner of the logic rule box to remove it.

Step 5: Save Your Conditions

Click Save in the contextual bar to activate all your conditional logic.

Example Walkthroughs

Example 1: Size-Based Gift Wrapping

Goal: Show gift wrapping option only when size Large is selected

  1. Logic: If ALL of the following
  2. Condition:
    • Field: Option → "Size"
    • Operator: is
    • Value: "Large"
  3. Action:
    • Type: Show
    • Target: "Gift Wrapping"
  4. Save

Result: Gift wrapping option appears only when customer selects Large size.

Example 2: Weekend Special

Goal: Show weekend discount on Saturdays and Sundays

  1. Logic: If ANY of the following
  2. Conditions:
    • Condition 1: Day of Week is "Saturday"
    • Condition 2: Day of Week is "Sunday"
  3. Action:
    • Type: Show
    • Target: "Weekend Special Price"
  4. Save

Result: Weekend option shows on Saturday OR Sunday.

Example 3: VIP Customer Benefits

Goal: Show premium options for logged-in VIP customers

  1. Logic: If ALL of the following
  2. Conditions:
    • Condition 1: Customer Logged In is "true"
    • Condition 2: Customer Tag contains "VIP"
  3. Action:
    • Type: Show
    • Target: "Premium Options"
  4. Save

Result: Premium options appear only when BOTH conditions are met.

Example 4: Seasonal Products

Goal: Hide holiday options after December 31, 2024

  1. Logic: If ALL of the following
  2. Condition:
    • Field: Date
    • Operator: is_after
    • Value: "2024-12-31"
  3. Action:
    • Type: Hide
    • Target: "Holiday Gift Wrapping"
  4. Save

Result: Holiday option disappears after the date.

Example 5: High-Value Products

Goal: Show white glove delivery for products over $100

  1. Logic: If ALL of the following
  2. Condition:
    • Field: Product Price
    • Operator: is_more_than
    • Value: "100"
  3. Action:
    • Type: Show
    • Target: "White Glove Delivery"
  4. Save

Result: Premium delivery shows for expensive products only.

Managing Conditions

Editing a Condition

  1. Go to the Conditional Logic tab in your option set
  2. Click on the condition you want to edit
  3. Make your changes to rules, logic, or actions
  4. Click Save in the contextual bar

Deleting Conditions

You can delete at different levels:

Delete an individual condition:

  1. Click the X icon in the condition's row (e.g., remove "Day of week is Tuesday")
  2. The condition is removed from the logic rule

Delete an individual action:

  1. Click the X icon in the action's row (e.g., remove "Show Gift Wrapping")
  2. The action is removed from the logic rule

Delete an entire logic rule box:

  1. Click the bin icon in the top right corner of the logic rule box
  2. The entire logic rule (all conditions and actions) is removed

When you delete logic rules or actions, affected options return to their default visibility.

Testing Your Conditions

In Preview Mode

Some conditions work in preview, others don't:

Condition CategoryWorks in Preview?Condition Types
Option-based✅ YesOption
Time-based✅ YesDate, Day of Week
Product-based❌ NoProduct Tag, Product Price, Product Title
Customer-based❌ NoCustomer Tag, Customer Logged In

Test on Live Store

Product and customer conditions automatically return true in preview mode. Always test these on your live storefront with real products and customer accounts.

Testing Checklist

Test all scenarios:

  • ✅ Condition activates when rules are met
  • ✅ Condition doesn't activate when rules aren't met
  • ✅ Multiple conditions work together correctly
  • ✅ Show/Hide actions work as expected
  • ✅ Options appear in cart and checkout correctly

Common Patterns

Progressive Disclosure

Show options step-by-step based on previous selections:

  1. Customer selects "Add Engraving" checkbox
  2. Then show "Engraving Text" input field
  3. Then show "Engraving Font" dropdown

Mutually Exclusive Options

Hide conflicting options:

  • If "Express Shipping" is selected → Hide "Standard Shipping"
  • If "Gift Wrap" is selected → Hide "No Wrapping"

Time-Limited Offers

Control availability by date:

  • Show "Holiday Special" before December 31st
  • Hide "Summer Collection" after September 1st

Customer Segmentation

Different options for different customers:

  • Show "Wholesale Pricing" for B2B customers
  • Hide "Trade Discount" for retail customers

Best Practices

Start Simple

  • Begin with one or two simple conditions
  • Test thoroughly before adding complexity
  • Add more conditions as you understand the system

Keep Logic Organized

  • Start with simple conditions before complex ones
  • Group related conditions together
  • Document what each condition does if complex

Test Thoroughly

  • Test all rule combinations
  • Try edge cases (what if price is exactly $100?)
  • Verify on live store for product/customer conditions

Document Complex Logic

For intricate condition setups:

  • Keep notes on why conditions were created
  • Document expected behavior
  • Share with team members who manage the store

Monitor Performance

  • Check if conditions reduce customer confusion
  • Watch for unexpected behaviors
  • Adjust based on customer feedback

Advanced Tips

Combining Show and Hide

Remember: Hide always wins if both conditions pass.

Multiple Actions Per Condition

One condition can affect multiple options. Use this to show/hide related options together.

Layered Conditions

Create sophisticated flows by stacking conditions:

  • Condition A shows Option B
  • Condition B (based on Option B) shows Option C
  • And so on...

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article