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

# Part 6: Computed fields

> Add the four computed fields (UTM Campaign, Tagged URL, Short URL, and QR Code) that turn a campaign's inputs into a tagged link, a short link, and a QR code.

In this part you add four fields that nobody types: `UTM Campaign`, `Tagged URL`, `Short URL`, and `QR Code`. Each one builds its value from fields you already have. For Acme's Black Friday row, `UTM Campaign` becomes `awareness-us-ca-2026_11_15-black_friday_2026`, and `Tagged URL` becomes `https://shop.acme.example/deals?utm_medium=email&utm_source=newsletter&utm_campaign=awareness-us-ca-2026_11_15-black_friday_2026`. It takes four steps, all on the governance model's **Fields** page.

You need the eight fields from [Part 5: The UTM cascade](/tutorial/05-utm-cascade).

## How it works

A computed field has no input cell on the form. Terminus Hub works out its value from other fields on the same row. It recomputes the value as the user types, which gives them a live preview, and again when the submission is saved. When the submission is approved, the value is stored on the record like any other value. Computed fields are always required, and submitters cannot edit them. The one exception in this part is the Short URL slug, which someone can change before approval.

A computed field can use another computed field as an input. That is how the four fields chain together:

```mermaid theme={null}
flowchart LR
  A[Goal, Country, Region,<br/>Launch Date, Campaign Name] --> B[UTM Campaign]
  C[Destination URL,<br/>UTM Medium, UTM Source] --> D[Tagged URL]
  B --> D
  D --> E[Short URL]
  E --> F[QR Code]
```

You never set an order of evaluation. Terminus Hub fills in each computed field as soon as its inputs are ready, and it rejects a setup in which a field depends on itself. You do create the fields in chain order, because each step picks the field you made in the step before.

For Acme's Black Friday row, the chain produces:

```text theme={null}
Campaign Name = black_friday_2026
UTM Campaign  = awareness-us-ca-2026_11_15-black_friday_2026
Tagged URL    = https://shop.acme.example/deals?utm_medium=email&utm_source=newsletter&utm_campaign=awareness-us-ca-2026_11_15-black_friday_2026
Short URL     = https://go.acme.example/aB3xK9q2
QR Code       = a QR code that points at the Short URL
```

The Short URL is illustrative. Your account has its own shortener domain, and each record gets its own slug.

Each type has its own reference page: [Concatenation](/reference/fields/concatenation), [Tagged URL](/reference/fields/tagged-url), [Short URL](/reference/fields/short-url), and [QR Code](/reference/fields/qr-code). The computed types this tutorial skips (Auto Number, Random, Constant, and Terminus ID) are in the [other computed fields recipe](/recipes/other-computed-fields), and Auto-fill has its own [reference page](/reference/fields/autofill).

## Steps

<Steps>
  <Step title="Create UTM Campaign (Concatenation)">
    With the `Marketing` governance model open, click **Fields** in the sidebar. Click **Create new** and pick **Concatenation**. A Concatenation field joins other fields' values with a separator.

    Set **Name** to `UTM Campaign`.

    Under **Field parts**, click **Add field**, then pick `Goal` in the new **Select field...** box. Do the same for `Country`, `Region`, `Launch Date`, and `Campaign Name`, in that order. The parts appear in the output in the order you add them.

    Set **Separator** to `-`. Leave **Remove extra separators** off. Click **Save to draft**. `UTM Campaign` appears in the field list. Click it to reopen it. On a wide screen, the **Preview** card beside the settings shows `UTM Campaign` with a placeholder such as `{Goal}-{Country}-...` for each input that has no value yet. Click **Fields** to go back.

    Every part of this campaign name is a required field, so no part is ever empty, and the five parts always sit in the same positions. **Remove extra separators** and **Empty field replacement** matter only for parts that can be blank; see the [Concatenation reference](/reference/fields/concatenation).

    <Warning>
      Settle the part order before anyone creates records. Reordering the parts later changes only new records. If you swap `Country` and `Region` after records are approved, those records keep `awareness-us-ca-2026_11_15-black_friday_2026`. Nothing recomputes them.
    </Warning>
  </Step>

  <Step title="Create Tagged URL (Tagged URL)">
    Click **Create new** and pick **Tagged URL**. A Tagged URL field takes a base URL and appends query parameters whose values come from other fields.

    Set **Name** to `Tagged URL`. Set **Base URL field** to `Destination URL`.

    Under **URL parameters**, add three parameters. For each one, click **Add parameter**, type the **Key**, and pick the **Value field**:

    | Key | Value field |
    | - | - |
    | `utm_medium` | `UTM Medium` |
    | `utm_source` | `UTM Source` |
    | `utm_campaign` | `UTM Campaign` |

    The key is what appears in the query string, and the value field supplies its value. Values are percent-encoded by default (the **Encode** checkbox). Click **Save to draft**.

    <Warning>
      A new parameter's **Value field** starts as **Set per taxonomy**. Pick the field on every row. A parameter left on **Set per taxonomy** must be given a source in each taxonomy that uses `Tagged URL`. Until it is, publishing fails with a message like "utm\_source has no source in Email Campaigns. Bind a field or mark it not used."
    </Warning>

    `Tagged URL` needs its base. On a row where `Destination URL` is blank, `Tagged URL` has nothing to attach the parameters to, and its preview stays empty until someone enters a URL.
  </Step>

  <Step title="Create Short URL (Short URL)">
    Click **Create new** and pick **Short URL**. A Short URL field creates a short link that redirects to a destination URL.

    Set **Name** to `Short URL`. Set **Destination URL field** to `Tagged URL`, the field you made in the last step. Leave **Shortener domain** on the default Terminus Hub shortener domain. Set **Slug mode** to **Auto-generated, editable** and **Slug size** to `8`. Click **Save to draft**.

    With **Auto-generated, editable**, Terminus Hub picks a random slug for every new record. Someone editing the submission can replace it with a memorable one before approval. **Slug size** defaults to `10`; the tutorial uses `8` to match the example output. The [short URL slug modes recipe](/recipes/short-url-slug-modes) covers the other two modes, **Auto-generated, read-only** and **Entered manually**.

    The short link goes live at approval. Until then, the slug is reserved on the row and shows in the preview, but the redirect does not work yet, and neither does a QR code taken from an unapproved submission. See the [submission pipeline](/concepts/submission-pipeline) for how a draft becomes a record.
  </Step>

  <Step title="Create QR Code (QR Code)">
    Click **Create new** one last time and pick **QR Code**. Set **Name** to `QR Code`. Set **Source field** to `Short URL`. Click **Save to draft**. The field list now shows all four fields from this part.

    Because the source is a Short URL, the QR code encodes the short link's redirect address, with a `qr` marker added so scans can be told apart from clicks. If the short link's destination ever changes, every QR code already printed still works.

    **Source field** accepts most field types, including URL and Tagged URL fields, so check that it says `Short URL`. A QR code made from `Tagged URL` would bake the whole query string into the image and would not follow the short link when its destination changes.
  </Step>
</Steps>

## Check your work

* The `Marketing` governance model has four new computed fields: `UTM Campaign`, `Tagged URL`, `Short URL`, and `QR Code`. It now has twelve fields in all: the eight user-input fields from Parts 2 to 5, plus these four.
* Reopen `UTM Campaign` from the field list. On a wide screen, a **Preview** card beside the settings shows the field under its input fields. At first each input with no value appears as a placeholder, such as `{Goal}`. Pick or type sample values, and `UTM Campaign` updates. The preview covers one step of the chain. When an input is itself computed (as `Tagged URL` is for `Short URL`), the preview shows a stand-in value for it. You see the whole chain resolve in Part 8.
* None of the fields is on a taxonomy yet. That happens in Part 7.

## Next up

The `Marketing` governance model now holds the full computed chain. In [Part 7: Build the taxonomies and publish](/tutorial/07-taxonomies), you create the three taxonomies, publish the model, and assign them to a workspace. For tagged URLs on their own, see the [tagged URL recipe](/recipes/tagged-url-utm).


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