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

# Managing metadata templates

<div className="article_labels_list" style={{display: 'none'}} dangerouslySetInnerHTML={{__html: "has_image , Admin , Article , Product Utilization , Established , Instruction"}} />

Metadata allows your managed users to define and store custom data associated with their files in Box. As an admin, you can create templates for your managed users and enable them to keep track of custom information such as owners, project names, or release dates. Metadata makes it much easier to organize, understand, and search through all of your Box files. You can reference the [end-user metadata documentation](/en/box-fundamentals/for-users/staying-organized/organizing-and-tracking-content/using-metadata) for more benefits and use cases.

<Note>
  Some features described on this page are only available as part of certain Box packages and add-ons. To upgrade your account, contact your Box account team.
</Note>

Structured metadata templates offer advanced capabilities beyond custom metadata, including:

* Enforcing uniformity across metadata application on files
* Advanced search on specific metadata attribute values
* Creating views and filters in Box Apps
* Driving workflows in Box Automate
* A SQL-like query API that supports logical operators

To enable your managed users to start using metadata in Box, create templates that they can choose from and apply to files.

## Creating metadata templates

1. Go to **Admin Console** > **Metadata**.
2. Select **New**.
3. Fill in the **Template Name** field.
4. Use the toggle to decide if the template should be **Hidden** from managed users.
5. Under **Add your first field to the Template**, select a field type you want to create.
6. Provide a name for the attribute by typing in the **Field Name** input.
7. Use the **Description** field to incorporate additional information about the attribute.
8. Select **Add Field** to add additional attributes.
9. Select **Save**.

There are 5 field types available:

* **Text**: free-form text entry
* **Number**: numeric values
* **Date**: date values
* **Dropdown**: a predefined list of options for users to choose from
* **Taxonomy**: hierarchical metadata values defined through [metadata taxonomies](/en/box-admin-tools/managing-content/metadata/metadata-taxonomies)

You can change the field type by selecting the **Field Type** dropdown.

<Note>
  If you select **Dropdown**, you can determine options for your managed users to choose from. Type an option into the **Options** field and select **Add Option** to add additional options.
</Note>

You must have at least one attribute in the template in order to save your template.

<Note>
  There are limits to the number of templates, attributes, and items you can create when working with metadata templates. Review the [template limits](#template-limits) section below for more information.
</Note>

### Creating templates from Box Extract

Admins and Co-Admins can also create metadata templates directly in Box Extract when creating or configuring a Custom Extract Agent. From the Extract configuration page, you can:

* **Generate a template with Box AI**: Box AI analyzes files in your source folders and generates a template with relevant fields. Generating a template with Box AI is a paid feature that uses premium models. See [Box AI pricing](/en/box-ai/understanding-ai-units-in-box) for details.
* **Create a template manually**: add fields one at a time using the same field types available in the Admin Console (text, number, date, dropdown, taxonomy).
* **Use an existing template**: select from templates already configured in the Admin Console.

For full steps, see [Using Box Extract](/en/box-extract/using-box-extract).

## Editing metadata templates

1. Go to **Admin Console** > **Metadata**. A list of metadata templates displays.
2. Select the template you want to edit.
3. Make any desired changes.
4. Select **Save**.

While editing a saved template, you can still add attributes by selecting **Add Attribute**. You can also hide existing attributes by selecting **Hide template from users**, or delete existing attributes by selecting **Remove**. Within an attribute, you cannot make changes to the field type unless the format is a dropdown list. If you selected **Dropdown** for your format, you can add or delete options.

<Warning>
  If you delete an existing attribute, the attribute is removed from any items that have it. The associated attribute values are deleted and this action cannot be undone. Template modifications affect all existing instances.
</Warning>

<Note>
  If a metadata template or attribute is associated with an active retention policy, you cannot delete the template, attribute, or dropdown option until you have retired the retention policy.
</Note>

## Deleting metadata templates

Admins and Co-Admins cannot delete metadata templates from the Admin Console. To delete a template, use the [Metadata Template Deletion API](https://developer.box.com/reference/delete-metadata-templates-id-id-schema/).

Deleting a template also deletes all metadata instances of that template across your files. This action cannot be undone.

<Note>
  If a metadata template or attribute is associated with an active retention policy, you cannot delete the template, attribute, or dropdown option until you have retired the retention policy.
</Note>

## Hiding metadata templates

If you have templates that you want to hide from users, whether you are still developing a template or want it available only through the API, you can hide them from managed users:

1. Go to **Admin Console** > **Metadata**. A list of metadata templates displays.
2. Select the template you want to hide.
3. Enable the **Hide template from users** switch.

To restore visibility of a template, follow the steps above and toggle the switch off.

## Template limits

Keep these limits in mind when creating metadata templates for your enterprise:

| Limit | Value |
| - | - |
| Maximum number of custom templates per enterprise | 500 |
| Maximum number of fields per template | 250 |
| Maximum number of templates that can be applied to a file or folder | 100 |
| Maximum number of custom metadata attributes (non-templates) | 256 |
| Maximum number of characters for keys and display names of templates and attributes | 255 |
| Maximum metadata instance size | 512KB |

The maximum metadata instance size limit is the combined size of all values in a metadata instance. For user experience purposes, we recommend having a smaller set of metadata attributes and values. By following the architecture guidelines below, you should not hit the 512KB metadata instance size limit.

### Architecture options

**Option 1: Standard metadata**

| Parameter | Recommendation |
| - | - |
| Recommended max metadata attributes per template | 128 |
| Recommended max size of an attribute value | 2048 chars |
| Recommended max number of values in a dropdown | 256 |

**Option 2: Many dropdown options**

| Parameter | Example |
| - | - |
| Example max metadata attributes per template | 5 |
| Example max number of values in dropdown | 800 |
| Example max size of dropdown value | 50 |

**Option 3: Larger field values**

| Parameter | Example |
| - | - |
| Example max metadata attributes per template | 20 |
| Example max size of attribute value | 10,000 chars |

**Option 4: Many fields**

| Parameter | Example |
| - | - |
| Example max metadata attributes per template | 250 |
| Example max size of attribute value | 500 chars |

If you have your own custom configuration, you can roughly compute your maximum metadata size as:

8 \* \[(# chars in metadata attribute key) + (# chars in metadata attribute value)]

## Admin report logging

The creation, update, and deletion of metadata templates and metadata values are available in the [Box User Activity Report](/en/box-admin-tools/reporting-and-insights/user-activity-report). If the metadata template is changed or deleted, only one event is logged noting the template change or deletion. There is no separate event logged for all template values associated with items that are impacted.

You can also report on current metadata values using the files and folders report. Metadata is an optional column you can include in that report.
