# Custom fields

> Your company's own fields on contacts, organisations, deals, cases and quotes, and how AI tools and the API read, write and filter them.

Admins add custom fields in the web app under Settings, Custom fields: a label your people see, and a key (such as `region`) that stays the same when the label changes. A field can be text, a number, a date, yes/no, a picklist or a multi-picklist, and it can be required.

Custom fields exist on contacts, organisations, deals, cases and quotes. Campaigns have none.

## With an AI tool

Talk about the field by its label; the AI finds the field and the option by itself.

- **Reading:** "Which region is the Birchwood deal in?" Values show as the label, with a picklist option's key in parentheses: `Region: North (north)`.
- **Writing:** "Set the Birchwood deal's region to North." A picklist value can be the option's label or its key; the match ignores case and accents but is never a guess. A value that isn't an option is refused, and the AI is told which options exist.
- **Filtering:** "List the deals in the North region." The AI filters the list in one step.
- **What exists:** "Which custom fields do we have on deals?" The AI reads your fields, their options and which are required.

## Required fields

A required field must have a value when a record is created, and can't be emptied later. If you ask the AI to create a record without one, it asks you once. If you don't know the value, it saves your words as a note on the organisation or contact you named and creates nothing, so nothing half-made is left behind.

Example: you say "Create a new deal for Birchwood, 5,000 euros", and Region is required on deals. The AI asks which region. If you answer, the deal is created with it; if you don't, your words go in a note on Birchwood.

Records made before a field became required keep working until someone edits that field.

## Through the API

- Values are in `custom`, keyed by the field's key: `"custom": {"region": "north", "vip": true}`.
- A picklist value can be sent as the option's key or its label. A multi-picklist takes a list.
- Record answers carry `custom_labels`: each value's field label and, for picklists, the option labels, so you don't need another request to show them.
- `null` removes a value.
- A value that isn't an option is refused with [`invalid_option`](/errors/invalid_option.md), which lists the options. A missing required value is refused with [`required_field`](/errors/required_field.md), which names the fields.
- Fields, their types and options: `GET https://staging-api.naruskacrm.com/v1/data-model`.

## Filters

Lists of contacts, organisations, deals and cases filter on custom fields:

| Field type     | Filter                                          | Matches                                    |
| -------------- | ----------------------------------------------- | ------------------------------------------ |
| Picklist       | `custom.region=north,south`                     | any of the options, by key or label        |
| Multi-picklist | `custom.languages=fi,sv`                        | records that have any of them              |
| Yes/no         | `custom.vip=true`                               | `false` also matches records with no value |
| Number, date   | `custom.budget_from=1000&custom.budget_to=5000` | the range, ends included                   |

Text fields can't be filtered. A list answer names the filters it applied, with their labels, in `custom_filters`.

## Not yet supported

Custom fields on quotes aren't supported through AI tools yet, and a quote field can't be made required.
