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

# Train ID template

> How Train ID templating works and which variables are supported.

### What this is

Use a simple template to automatically build your Train IDs. Type your pattern and put any “fill-in” parts inside double braces like `{{ THIS }}`. When the job runs, we replace those parts with real values from the job and date/time.

### How to write a template

* Write placeholders like `{{ JOB_NAME }}` or `{{ YYYY }}`.
* If we can’t find a value for a placeholder, we leave it as-is (you’ll see `{{ UNKNOWN }}` in the result).

### Common variables

Date and time (based on the job’s scheduled date/time):

| Placeholder | Meaning                        | Example     |
| ----------- | ------------------------------ | ----------- |
| `HH`        | Hour (24‑hour, zero‑padded)    | `05`        |
| `D`         | Day of month (no leading zero) | `7`         |
| `DD`        | Day of month (zero‑padded)     | `07`        |
| `M`         | Month number (no leading zero) | `9`         |
| `MM`        | Month number (zero‑padded)     | `09`        |
| `MMM`       | Abbreviated month name         | `Sep`       |
| `MMMM`      | Full month name                | `September` |
| `YY`        | Two‑digit year                 | `25`        |
| `YYYY`      | Four‑digit year                | `2025`      |

From the job:

| Placeholder      | Meaning                  | When it appears                  | Example    |
| ---------------- | ------------------------ | -------------------------------- | ---------- |
| `JOB_NAME`       | The job’s name           | Always                           | `DayShift` |
| `BLUEPRINT_NAME` | The job’s blueprint name | Only if the job uses a blueprint | `MainYard` |

### Custom train attributes

You can reference your own train attributes (and other job fields) by name. Just put the name in braces, for example `{{ DepartureTime }}` or `{{ departure_time }}`.

* If the attribute is a dropdown/choice, we insert the selected option’s text.
* For everything else, we insert the attribute’s value as text.

### Copy‑paste examples

* Make a daily ID with the job name and hour:

  * Template: `Train-{{ JOB_NAME }}-{{ YYYY }}{{ MM }}{{ DD }}-{{ HH }}`
  * Example result: `Train-DayShift-20250907-05`

* Use month name plus your own field:
  * Template: `{{ MMM }} {{ YYYY }} - Line {{ line }}`
  * Example result: `Sep 2025 - Line S1`

### Troubleshooting

* A placeholder didn’t change? Check the spelling. Different styles like `JobName`, `job_name`, or `job name` are okay, but the words must match the field’s name.
* Not using a blueprint? `{{ BLUEPRINT_NAME }}` won’t be filled.
