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

# Dynamic fields

> Computed contact fields derived live from your connected database — any table, joins and aggregates included

## Overview

When your database is connected ([Supabase Connection](https://docs.minimo.it/product/data-sync/supabase.md)), every contact in Minimo can carry **dynamic fields**: values computed from your data, not copied by hand.

Two shapes:

* **Column fields** — mirror a column of your contacts table (`plan`, `last_sign_in_at`, `trial_ends_at`). Created in the mapping wizard, or by an agent with the `minimo_connection_ensure-dynamic-field` MCP tool.
* **Computed fields** — derived from **any other table**, through joins and aggregates. Examples: *number of orders*, *date of the next booked appointment*, *start of the next tournament a player is registered to* (a `MIN` over a junction table). One contact, one value — the aggregate is what turns many rows into the one value a segment or automation can use.

> [!NOTE]
>
> Minimo reads your database directly, in read-only mode. If the data lives in your connected database, it is reachable as a contact field — there is no separate "import" step to keep in sync.

## Create a computed field with Ask Mo

Describe the value in plain language and Mo plans the query against your real schema, shows you its interpretation, and creates the field.

> Create a dynamic field NEXT\_TOURNAMENT\_START (datetime): for each contact, the minimum of `tornei.inizio` across the tournaments in `tornei_iscritti` where the person is registered, with `tornei.stato = 'iscrizioni'` and a start date in the future.

Mo resolves the tables and join path from the schema analysis, asks a clarifying question when the request is ambiguous, and backfills the field for every contact right after creating it.

> [!TIP]
>
> Name the tables with `@` (e.g. `@tornei_iscritti`) to pin where Mo should look first.

## How values stay fresh

A dynamic field is recomputed, per contact, when:

* **The field is created** — an immediate backfill runs over all contacts.
* **Your data changes** — when a computed field is created, Minimo automatically installs change triggers on every table the field reads (the source table and each joined table), so a row change re-resolves the affected contact's value.
* **An automation checks a goal** — goal evaluation refreshes the fields it depends on just in time.

> [!WARNING]
>
> A value that changes with the passage of time alone (like "the NEXT tournament", which changes when a tournament starts even if no row changed) is only recomputed on the events above, not continuously. Anchor automations to data changes (a new registration, a status change) rather than to the field drifting over time.

## Use them everywhere

Dynamic fields behave like any custom field: segment on them, reference them in templates with merge fields, and trigger automations when they change (the **Field updated** trigger).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.