# Custom Data

Custom Data Types allow the definition of custom types. The data of such a type is stored as JSON by FYLR.

All custom data is stored in its own table in FYLR, each record is stored only once per `_uuid`. The `_uuid` can be provided or will be auto-generated by FYLR based on the data which was sent. If that data changes a new UUID is generated and a new record is stored. The old record is kept in the database as long as it is references by any object (including historical versions).

## Providing UUID

Custom data can contain a `_uuid` at the top level of the data. With such an id FYLR is not generating one.

> Record uniqueness is determined soley on the provided UUID. So sending different data with the same UUID will not update the stored data. To update the stored data, a new UUID must be provided.

## Search

Custom Data Types support search mappings. The search mapping is defined in the `manifest.yml` of the plugin which defines the Custom Data Type.

## Updates

Custom Data Types can be updated by a background service provided by FYLR. This background service collects all expired custom data and asks a script of the plugin to provide any updates on that data as needed. The updates happen periodically and the Custom Data Type can provide an expiration date for each record.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fylr.io/for-developers/customdata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
