> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hotglue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Filters

> Filter which records get synced per stream using custom filter conditions

## Overview

Custom Filters let you control exactly which records get synced for a given stream. Instead of syncing all records, you can define conditions, such as filtering bills by status or vendor, so that only matching records are returned when a job runs.

<Note>
  Custom Filters is a **beta feature** currently supported on **Coupa** and **NetSuite** connectors on select streams only. To enable custom filters for other connectors or streams, contact [hotglue support](mailto:hello@hotglue.xyz).
</Note>

## Prerequisites

To enable custom filters for a connector, add **`"capabilities": ["customFilters"]`** to the connector's root-level configuration in the available entity's JSON.

```json theme={null}
{
  "tap": "netsuite",
  "label": "NetSuite",
  "capabilities": [
    "customFilters"
  ]
}
```

Once this is done, the **Filter source streams** option becomes visible in the Configuration tab.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Filter_Source_Streams.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=cfad193b3c64b27f17ecac0f56e56cde" alt="Filter Source Streams" width="2940" height="1324" data-path="key-concepts/jobs/images/Custom_filter-Filter_Source_Streams.png" />

<Warning>
  This field must be added at the root level of the connector configuration, not inside `options` or `config`.
</Warning>

## Setting up custom filters

### Step 1: Link NetSuite

Create a flow and link NetSuite as your source connector. Once linked, navigate to the **Configuration** tab of the NetSuite source.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Netsuite_Source_connector.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=9b28c2a5a934d4c6952c5003cea9c4a1" alt="Netsuite Source Connector" width="2448" height="734" data-path="key-concepts/jobs/images/Custom_filter-Netsuite_Source_connector.png" />

### Step 2: Select one or more streams

Click **Customize field map** and select the streams you want to sync e.g., **Bills**. Save your selection before proceeding.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Select_tables.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=6da06d9c8a0b7f278059bc486d6f7b22" alt="Select tables in field map" width="1152" height="784" data-path="key-concepts/jobs/images/Custom_filter-Select_tables.png" />

### Step 3: Open Filter Source Streams

Once streams are selected and saved, click **Filter source streams** to open the filter panel.

You will see the stream or a list of the streams. Only streams that have been selected in your field map will appear here.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Filters_panel.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=cf891343489ed94435c4d936dd78d005" alt="Filters panel" width="1136" height="312" data-path="key-concepts/jobs/images/Custom_filter-Filters_panel.png" />

### Step 4: Build and Apply a filter

Click on a stream e.g., **bills**, to open the filter builder.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Filter_builder.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=b19d807e1962e30c50dc1c6110924a5d" alt="Filters builder" width="1134" height="738" data-path="key-concepts/jobs/images/Custom_filter-Filter_builder.png" />

In the filter builder, you can define one or more filter conditions:

* **Field**: The property to filter on (e.g., Bill Vendor ID, Bill Vendor Name)

* **Operator**: How to match the value:
  * `IN`: matches any value in a list
  * `EQ`: equals a single value

* **Value**: The value(s) to match against

To add multiple conditions, click **+ Add condition**. Use the **AND / OR** toggle between conditions to control how they combine:

* **AND**: Both conditions must be true (narrows results)
* **OR**: Either condition can be true (broadens results)

For more complex logic, use **+ Add group** to nest conditions together.

The filters below returns only bills that are Open **and** belong to vendor Golden Eagle Ventures. Once your conditions are defined, click **Apply Filters**.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Build_Apply_filters.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=6d4f75f4174e6b145794332b84c26a9e" alt="Build_Apply_filters" width="1138" height="1546" data-path="key-concepts/jobs/images/Custom_filter-Build_Apply_filters.png" />

### Step 5: Save the filter

You will be taken back to the stream list, which will now show the number of active conditions next to the stream name (e.g., bills · 2 conditions).

Click **Save Changes** and wait for the confirmation message before proceeding.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter_Filter_panel_save_changes.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=bc464da1f3149db90a1b935e19b7a6bf" alt="Filter panel save changes.png" width="2940" height="1546" data-path="key-concepts/jobs/images/Custom_filter_Filter_panel_save_changes.png" />

The confirmation message will show up for the saved filters.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Filter_Successfully_Saved.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=190d6bbb87388f42d4631a021fd8de58" alt="Filter Successfully saved" width="1154" height="420" data-path="key-concepts/jobs/images/Custom_filter-Filter_Successfully_Saved.png" />

### Step 6: Run a job

Navigate to the **Jobs** tab and run a new job with NetSuite as the source.

<img src="https://mintcdn.com/hotglue/JQ0AYzVpVNPI0Iov/key-concepts/jobs/images/Custom_filter-Job_created.png?fit=max&auto=format&n=JQ0AYzVpVNPI0Iov&q=85&s=a3d938c63c2836aad1d029c48052b6c9" alt="Job created" width="2940" height="1574" data-path="key-concepts/jobs/images/Custom_filter-Job_created.png" />

Once the job completes, the output will contain only the records that match your filter conditions.

## Notes

* Filters are saved **per stream** and persist across future job runs until changed or removed.
* Filters only apply to streams that have been selected in the field map. If a stream is not selected, it will not appear in the filter panel.
* To clear all filters for a stream, open the filter builder and click **Clear all**.
