# Base filters

#### Base filters

Contains an array of objects where each object is a base filter.

| Key              | Type   | Description                                                 |
| ---------------- | ------ | ----------------------------------------------------------- |
| id               | number | A unique identifier number                                  |
| text             | string | The display name                                            |
| filters          | object | Defines filter for the base filter                          |
| services         | array  | An array of objects containing filter for services          |
| services.text    | string | The display name for the service filter                     |
| services.values  | array  | An array of strings with the service unique name in Wire OC |
| freeTexts        | string | An array of objects containing filter for free text         |
| freeTexts.text   | string | The display name for the free text filter                   |
| freeTexts.values | array  | An array of strings with free text's to filter on           |

Example:

```
[
    {
        "id": 1,
        "text": "The display name"
        "filters": {
            "services": [
                {
                    "text": "Example service filter",
                    "values": [
                        "a service to filter on",
                        "another service to filter on"
                    ]
                }
            ],
            "freeTexts": [
                {
                    "text": "Example free text filter",
                    "values": [
                        "the free text`s to filter on",
                        "another"
                    ]
                }
            ]
        }
    },
    {
        ...
    }
]
```

Example from a customer setup:

```json
        {
                "id": 1,
                "filters": {
                        "services": [
                                {
                                        "text": "All",
                                        "values": []
                                }
                        ],
                        "freeTexts": []
                },
                "text": "All"
        },
        {
                "id": 2,
                "filters": {
                        "services": [
                                {
                                        "text": "AAP",
                                        "values": [
                                                "AAP"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "AAP"
        },
        {
                "id": 3,
                "filters": {
                        "services": [
                                {
                                        "text": "AP",
                                        "values": [
                                                "AP"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "AP"
        },
        {
                "id": 4,
                "filters": {
                        "services": [
                                {
                                        "text": "WAPO",
                                        "values": [
                                                "WP"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "WP"
        },
        {
                "id": 5,
                "filters": {
                        "services": [
                                {
                                        "text": "BLOOMBERG",
                                        "values": [
                                                "BLOOMBERG"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "BL"
        },
        {
                "id": 6,
                "filters": {
                        "services": [
                                {
                                        "text": "COMPLEX",
                                        "values": [
                                                "COMPLEX"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "COMP"
        },
        {
                "id": 7,
                "filters": {
                        "services": [
                                {
                                        "text": "RNZ",
                                        "values": [
                                                "RNZ"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "RNZ"
        },
        {
                "id": 8,
                "filters": {
                        "services": [
                                {
                                        "text": "BRAVO",
                                        "values": [
                                                "BRAVO"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "BRAVO"
        },
        {
                "id": 9,
                "filters": {
                        "services": [
                                {
                                        "text": "CNBC",
                                        "values": [
                                                "CNBC"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "CNBC"
        },
        {
                "id": 10,
                "filters": {
                        "services": [
                                {
                                        "text": "TJN",
                                        "values": [
                                                "TJN"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "TJN"
        },
        {
                "id": 11,
                "filters": {
                        "services": [
                                {
                                        "text": "TELEGRAPH",
                                        "values": [
                                                "The-Telegraph"
                                        ]
                                }
                        ],
                        "freeTexts": []
                },
                "text": "TELE"
        }
]
```

And how this configuration appears in Dashboard:

<figure><img src="https://content.gitbook.com/content/aV0KHDMRSOc9TKb03R2c/blobs/K0LJfPjeqe5GytAKxqRw/Screenshot%202023-08-28%20at%2013.51.37.png" alt=""><figcaption><p>The names of the filters are shown in the right sidebar. These filters are named by the "text" key in the Base Filters configuration.</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/aV0KHDMRSOc9TKb03R2c/blobs/cimDSBhIJ4950JsnCF8F/Screenshot%202023-08-28%20at%2013.53.59.png" alt=""><figcaption><p>When a user selects a filter, the service is identified at the top of the Wire Dashboard by the "services.text" key in the Base Filters configuration.</p></figcaption></figure>
