# Filters

Filters are a way to ensure actions get performed only on the items you want.\
With filters, you set a specific condition and the Automation will only continue if it meets that condition. Filters are an optional part of setting up an Automation, but they're a great way to make sure Automation only continue for certain items.

#### Before you start <a href="#before-you-start" id="before-you-start"></a>

* You should have a partner login.
* You should have your app extensions configured.

#### **How it works** <a href="#how-it-works" id="how-it-works"></a>

1. In the Automation editor, click the **+ icon** to add a new step.
2. Select **Filter.**
3. Click **Continue**.
4. Customize your filter rules
   1. In the first dropdown menu, select the field that you want the filter to check. This dropdown will include all the fields from the previous steps. (Triggers, Filters, Formatters or search actions)
   2. In the second dropdown menu, select the condition (or logic) that you want to use based on the data type of field selected in previous step. There are five types of filter rules:
      1. Text Filters:
         * **Contains:** Checks if the field contains a value. This is **not** case-sensitive.
         * **Does not contain:** The opposite of *Contains*, this checks that the field does not contain a value. This is **not** case-sensitive.
         * **Exactly matches:** Checks if the field matches a value letter-for-letter. This is case-sensitive.
         * **Does not exactly match:** Checks if the field does not match a value letter-for-letter. This is case-sensitive.
         * **Is in:** Checks if a field is in a list of values. This is **not** case-sensitive.
         * **Is not in:** Checks if a field is not in a list of values. This is **not** case-sensitive.
         * **Starts with:** Checks if a field begins with a certain value. This is **not** case-sensitive.
         * **Does not start with:** Checks if a field does not begin with a certain value. This is **not** case-sensitive.
         * **Ends with:** Checks if a field ends with a certain value. This is **not** case-sensitive.
         * **Does not end with:** Checks if a field doesn’t end with a certain value. This is **not** case-sensitive.
      2. Number filters
         * **Greater than:** Checks if a field is greater than a certain number.
         * **Less than:** Checks if a field is less than a certain number.
      3. Date/time filters
         * **After:** Checks if a date is after a certain date.
         * **Before:** Checks if a date is before a certain date.
         * **Equals:** Checks if two dates are identical.
      4. Boolean filters
         * **Is true:** Checks is a boolean value is true.
         * **Is false:** Checks if a boolean value is false.
      5. Generic filters
         * **Exists:** Checks if a value exists (can be used with any type of field).
         * **Does not exist:** Checks if a value doesn’t exist (can be used with any type of field).
5. In the text field, define the value that you want to compare the field to.
6. Click **Continue**.
7. Test your filter:
   1. If the sample data you’re testing would have passed the filter, you’ll see a confirmation message that your Automation would have continued.
   2. But if the sample data would not have passed the filter, you’ll see a message that your Automation would not have continued.\
      Even when the test doesn’t pass, you can continue to set up your Automation.

Your filter can have multiple criteria, and these criteria can be added using either “And” or “Or” logic. If you only want the filter to pass if both things are true, add a new filter using the *And* button. But if you want a filter to pass if either thing is true, add a new filter using the Or button.

After you’ve created your filter, you will need to set up action steps. These actions will only happen if the filter passes. Once you’ve done that, you can turn on your Automation.
