# Run-If Card

Run-IF card allows you to execute a display card or a rules card based on a condition. The condition can be based on a variable, a customer input, a button click, or a time. You can use a Run-IF card to create personalized and relevant customer journeys, such as sending different messages based on the customer’s language, location, or preference.

<details>

<summary><strong>Use Cases for 'Run If' Cards in Fashion E-commerce</strong></summary>

1. **Size and Fit Guidance**: When users have questions about sizing or fit, 'Run If' cards can provide customized recommendations to ensure a perfect fit, reducing returns and enhancing customer satisfaction.
2. **Occasion-Based Suggestions**: By considering upcoming events or occasions, 'Run If' cards can suggest outfits suitable for weddings, parties, or casual outings.
3. **Seasonal Wardrobe Updates**: Chatbots can use 'Run If' cards to inform users about new arrivals, promotions, or discounts specific to the current season.

</details>

## Using Rule-If Card

### Add condition

* You need to create the condition that will determine which message or action you will send to the customer.&#x20;
* You can add a filter based on the attributes of the customer. Attributes are pieces of information that you collect or store about the customer, such as their name, phone number, email, location, etc.&#x20;
* You can use user attributes or custom attributes. User attributes are predefined attributes that are automatically collected by WhatsApp, such as language, country code, etc.&#x20;
* Custom attributes are attributes that you create and assign to the customer, such as gender, age, interests, etc.&#x20;
* You can add one or more attributes to your filter and select the conditional logic that will apply to them.&#x20;
* Conditional logic is the rule that will compare the attribute value with the value that you enter. You can choose from Is, Is not, Contains, or Not Contains.&#x20;

For example, you can create a condition with the filter: Gender (custom attribute) Is Male and Age (custom attribute) Is not 18.

<figure><img src="/files/k9GK5UQ6VrjtW2FmEOKN" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After Run-If card select card to run if added conditions are true. For example, you can select a card that shows the customer a different set of products based on their gender and age.
{% endhint %}

{% hint style="info" %}
The cards **placed after** the **Run-If card** will **run only** if the **attribute name** **matches** the **specified value**.
{% endhint %}


---

# 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.makerobos.com/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/rule-cards/run-if-card.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.
