---
title: tm.customfield
slug: db/tmcustomfield
createdAt: 2023-12-14T14:12:48.287Z
---

Custom fields give you the ability to store custom data in Orders, Contacts and Events. [More info on setting up custom fields](docId\:z5Pal8W0h6EAf8FSmNZ3U)

## Fields

| FIELD          | TYPE                      | DESCRIPTION                                                                                                                                                                                                     |
| -------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id             | `int`                     | Unique ID                                                                                                                                                                                                       |
| typeid         | `int`                     | Type ID                                                                                                                                                                                                         |
| key            | `string`                  | The identifier for the custom field. Should contain only alphanumeric characters and no whitespace, max length is 30 characters. The custom field will be available in the api and the public data model as c\_ |
| caption        | `mlstring`                | Human-readable name for the custom field                                                                                                                                                                        |
| description    | `mlstring`                | Human-readable description for the custom field. Will be visible for end-users when edittype `checkout` is used                                                                                                 |
| fieldtypeid    | `int`                     | Type of the custom field. Links to systemtype category 12xxx<br />**References:** [tm.systemtype](docId\:YVf7OQ_iruf6NpUOHG2XQ)                                                                                 |
| edittypeid     | `int`                     | Type of editing that is allowed for the custom field. Links to systemtype category 22xxx                                                                                                                        |
| requiredtypeid | `int`                     | Indicates where the custom field is required. Links to systemtype category 30xxx                                                                                                                                |
| availability   | `CustomfieldAvailability` | Rules that define in what conditions this custom field is available when edit type is `checkout`                                                                                                                |
| manualsort     | `bool`                    | Indicated whether the field is manually sortable                                                                                                                                                                |
| createdts      | `timestamp`               | Created timestamp                                                                                                                                                                                               |
| lastupdatets   | `timestamp`               | Last updated timestamp                                                                                                                                                                                          |
| isarchived     | `bool`                    | Whether or not this item is archived                                                                                                                                                                            |

