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

# ms_filter table

> This table contains email filters. These are the filters allowing you to do advanced parsing of incomming emails.

## ms\_filter Table (310)

This table contains email filters. These are the filters allowing you to do advanced parsing of incomming emails.

## Fields

| Name                     | Description                                                                             | Type                                                      | Nullable |
| ------------------------ | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | :------: |
| id                       | The primary key (auto-incremented)                                                      | PK                                                        |    No    |
| priority                 | A number indicating the priority for this filter (0..10).                               | Int                                                       |    No    |
| description              | A description for this filter.                                                          | String(255)                                               |    Yes   |
| search\_string           | The string to search for.                                                               | String(255)                                               |    Yes   |
| search\_string2          | A second string to search for. Only used if not empty.                                  | String(255)                                               |    Yes   |
| search\_location         | Enum indicating where to search.                                                        | search\_location                                          |    No    |
| action                   | A bitmask representing the actions that should be performed if this filter is executed. | Int                                                       |    No    |
| action\_when             | Enum indicating what should trigger this filter.                                        | action\_when                                              |    No    |
| new\_priority            | The id of the priority to set for the ticket if specified by action.                    | FK [ticket\_priority](./ticket-priority.mdx)              |    No    |
| new\_category            | The id of the category to set for the ticket if specified by action.                    | FK [ej\_category](./ej-category.mdx)                      |    No    |
| new\_owner               | The id of the owner to set for the ticket if specified by action.                       | FK [ejuser](./ejuser.mdx)                                 |    No    |
| new\_slevel              | The security level to set for the ticket if specified by action.                        | Int                                                       |    No    |
| reply\_template          | The id of the template to use as the reply template if specified by action.             | FK [reply\_template](./reply-template.mdx)                |    No    |
| reply\_to                | The email address to reply to.                                                          | String(255)                                               |    Yes   |
| reply\_to\_sms           | The SMS number to reply to.                                                             | String(255)                                               |    Yes   |
| body\_template           | The template to use for the body of the message.                                        | FK [reply\_template](./reply-template.mdx)                |    No    |
| forward\_to              | An email address to forward the ticket to.                                              | String(255)                                               |    Yes   |
| autofaq\_reply\_category | The root folder for the auto faq search.                                                | FK [reply\_template\_folder](./reply-template-folder.mdx) |    No    |
| flags                    | Flags                                                                                   | Int                                                       |    Yes   |
| parse\_mode              | If automatic parsing this column indicate mode                                          | Short                                                     |    Yes   |
| ejscript                 | The reference to the ejscript to execute for this filter.                               | FK [ejscript](./ejscript.mdx)                             |    Yes   |
| new\_tags                | The tags to set for tickets modified by this filter                                     | FKArray                                                   |    Yes   |
| new\_ticket\_type        | Tickettype of the ticket                                                                | FK [ticket\_type](./ticket-type.mdx)                      |    Yes   |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/ms_filter.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=9c8b4db1ba6752a658309f7aef380ab8" alt="ms_filter table relationship diagram" width="948" height="771" data-path="media/loc/en/database/tables/ms_filter.png" />

## Indexes

| Fields                   | Types   | Description |
| ------------------------ | ------- | ----------- |
| new\_priority            | FK      | Index       |
| new\_category            | FK      | Index       |
| new\_owner               | FK      | Index       |
| reply\_template          | FK      | Index       |
| body\_template           | FK      | Index       |
| autofaq\_reply\_category | FK      | Index       |
| ejscript                 | FK      | Index       |
| new\_tags                | FKArray | Full text   |

## Relationships

| Table                                              | Description                                                                                                                 |
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [ej\_category](./ej-category)                      | This table contains categories, in which tickets are categorized. The categories are organized in a hierarchial manner.     |
| [ejscript](./ejscript)                             | ejscript                                                                                                                    |
| [ejuser](./ejuser)                                 | This table contains entries for the users of the system.                                                                    |
| [ms\_filter\_mail](./ms-filter-mail)               | This table connects mail filters (ms\_filter) to mailboxes (mail\_in\_filter).                                              |
| [ms\_substitute](./ms-substitute)                  | Regexp for extracting info from emails when they enter they system                                                          |
| [ms\_trashbin](./ms-trashbin)                      | This table contains entries for emails which have been trashed by a filter, waiting for confirmation of deletion or import. |
| [reply\_template](./reply-template)                | Templates for automatic and manual replies to emails/sms organized hierachically                                            |
| [reply\_template\_folder](./reply-template-folder) | This table contains entries for folders for reply templates.                                                                |
| [Tags](./tags)                                     | MDO List of tags for Service entities                                                                                       |
| [ticket\_priority](./ticket-priority)              | This table contains the ticket priorities.                                                                                  |
| [ticket\_type](./ticket-type)                      | A ticket (request) type                                                                                                     |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ms_filter_mail table](/en/database/tables/ms-filter-mail.md)
- [ms_substitute table](/en/database/tables/ms-substitute.md)
- [ms_trashbin table](/en/database/tables/ms-trashbin.md)
- [mail_in_filter table](/en/database/tables/mail-in-filter.md)
- [Tags table](/en/database/tables/tags.md)
- [reply_template_folder table](/en/database/tables/reply-template-folder.md)
