# How to set up Conditional logics?

## 🎯 Objective

Conditional Logic allows you to show or hide product options dynamically based on your customer’s selections. The goal is to create a clean, intuitive, and user-friendly product configuration experience ✨

#### Example 1: Text vs. Image for Embroidery

Imagine selling a custom T-shirt where customers choose between adding Text or an Image for embroidery.

✅ If they choose Text, they’ll see a textbox to type in.

✅ If they choose Image, they’ll get a file upload option instead.

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1tvcyfr.png" alt=""><figcaption></figcaption></figure>

#### Here’s how to set it up <a href="#id-3-heres-how-to-set-it-up" id="id-3-heres-how-to-set-it-up"></a>

1️⃣ Create a radio button with “Text” and “Image” options.

2️⃣ Add a textbox for text input.

3️⃣ Add a file upload for images.

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1eekr6u.png" alt=""><figcaption></figcaption></figure>

4️⃣ Use Conditional Logic to show only the relevant option based on their selection.

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1i8qkdw.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_mrhe5z.png" alt=""><figcaption></figcaption></figure>

Now, customers only see what they need—keeping things clean and intuitive!

#### Example 2: Number of People & Textboxes

Let’s say you offer a T-shirt where customers can add names based on how many people they select.

✅ If they pick 1 person, they get 1 textbox.

✅ If they pick 2 people, they get 2 textboxes.

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1jggp6e.png" alt=""><figcaption></figcaption></figure>

#### Here’s how to set it up <a href="#id-3-heres-how-to-set-it-up" id="id-3-heres-how-to-set-it-up"></a>

1️⃣ Create an option with “1 person” and “2 people.”

2️⃣ Add two textboxes for name input.

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1a6rjpy.png" alt=""><figcaption></figcaption></figure>

3️⃣ Use Conditional Logic to:

* Show Textbox 1 for both choices - because this textbox 1 will appear on both choices

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_dqi0lw.png" alt=""><figcaption></figcaption></figure>

* Show Textbox 2 only when "2 people" is selected - Because the textbox 2 will only appear for option "2 people"

<figure><img src="https://storage.crisp.chat/users/helpdesk/website/22429817467a0000/image_1w2zlou.png" alt=""><figcaption></figcaption></figure>

Now, the form updates dynamically, keeping it simple and user-friendly!

And that’s it! Conditional Logic ensures customers only see what’s relevant - making their shopping experience smoother. Try it out and let us know how it works for you!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optis.me/product-options/getting-started/other-popular-features/how-to-set-up-conditional-logics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
