# Filtering xAPI Statements

You can define two **xAPI Statement Filters** on the Setup page of xAPI Actions.

<figure><img src="https://1749012385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcTyQ05dv9UTW8n6ypeAM%2Fuploads%2F3JaGkp1jlhsT4P7tHlUT%2Fimage.png?alt=media&#x26;token=de7ebe26-5fb0-4a71-b465-5974639b2795" alt="" width="563"><figcaption></figcaption></figure>

The filters are used to tell xAPI Actions which statements you want to pass to yout xAPI Flow Handler.  If you don't define any filters, all xAPI statements will invoke you handler.

If you add two filters, the inbound statement must match both conditions to be passed to your xAPI Flow Handler.

### Example Filter

* The **Statement Path:** for example `verb.display.en-GB`
* The **Operator**: for example "Equal to"
* The **Value:** for example `attended`

<figure><img src="https://1749012385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcTyQ05dv9UTW8n6ypeAM%2Fuploads%2FWfMlqTeJ78lPK46xU9Sy%2FScreenshot%202024-08-29%20at%2015.22.05.png?alt=media&#x26;token=f3e14ab3-d7ff-4723-8ec1-4cecca08f615" alt="" width="375"><figcaption></figcaption></figure>

In this xAPI statement filter example, you define specific criteria to filter xAPI statements based on a path, operator, and value. The **Statement Path** is expressed in dot-notation format, such as `verb.display.en-GB`, which points to the exact element within the xAPI statement that you want to filter. The **Operator** allows you to set the condition for filtering, with options like "Equal to," "Not equal to," "Greater than," or "Less than," depending on your needs. Finally, the **Value** represents the target value you want to match, such as `attended`, ensuring that only statements meeting this criteria are included in the filtered results.

On completion **Save the setup** to apply the filter configuration. Remember that the 3 required fields for each filter must contain a valid entry or a general error will be returned on save.

{% hint style="danger" %}
To **remove a filter** you will need to manually delete any entered data from the 2 required input fields and reset the "Operator" dropdown selection to the default value of "Select". You will then need to Save the setup to apply the change.
{% endhint %}

{% hint style="success" %}
**Why are filters useful?**

By carefully selecting which xAPI statements to include, you can enhance the quality, relevance, and also manage your Salesforce governor limits better.
{% endhint %}
