# 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="https://3618795910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3pP2APLi2ZwqQCorRa5l%2Fuploads%2FVC0IqAOy5H5PPpCoLx5F%2FRun%20if.png?alt=media&#x26;token=445202bc-0296-4906-ae6d-d0ecb17997c7" 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 %}
