# Template Variables

## Case Report Variables

These variables represent data contained within a report instance of a case.

{% hint style="info" %}
Currently, the summary and analysis variables do not include any rich text formatting like bold, bullets, or underline.  Pasted images are also not included in the template when generated.
{% endhint %}

<table><thead><tr><th width="446">Variable Name</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ report.summary }}</code></td><td>This is the report summary data that was entered into the summary tab of a Monolith case report.</td></tr><tr><td><code>{{ report.analysis }}</code></td><td>This is the analysis data that was entered into the analysis tab of a Monolith case report.</td></tr><tr><td><code>{{ report.name }}</code></td><td>This is the name of your report instance.</td></tr></tbody></table>

## Organization Variables

These are template variables that reference your organization information entered into Monolith.

| Variable Name       | Description                                    |
| ------------------- | ---------------------------------------------- |
| `{{ org.name }}`    | Name of your agency, company, or organization. |
| `{{ org.address }}` | Street address of organization.                |
| `{{ org.city }}`    | City location of your organization.            |
| `{{ org.state }}`   | State or province of your organization         |
| `{{ org.zipcode }}` | Postal code of your organization               |
| `{{ org.email }}`   | Email set for your organization.               |
| `{{ org.website }}` | Website URL set for your organization.         |

## Current User Variables

These are variables that reference the currently logged in Monolith user.

<table><thead><tr><th width="296">Variable Name</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ user.first_name }}</code></td><td>First Name of user. (Jane)</td></tr><tr><td><code>{{ user.last_name }}</code></td><td>Last name of user. (Doe)</td></tr><tr><td><code>{{ user.full_name }}</code></td><td>First name and last name combined. (Jane Doe)</td></tr><tr><td><code>{{ user.email }}</code></td><td>User email address.</td></tr><tr><td><code>{{ user.title }}</code></td><td>User title set in Monolith.</td></tr><tr><td><code>{{ user.office }}</code></td><td>Office location that the user is assigned to.</td></tr><tr><td><code>{{ user.user_id  }}</code></td><td>Integer based user id stored by Monolith.</td></tr></tbody></table>

## Case Variables

These are variables that contain data related to the current case you are generated a report for.

<table><thead><tr><th width="368">Variable Name</th><th width="131">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ case.case_id }}</code></td><td>Number</td><td>Integer based, unique id set by Monolith for the case.</td></tr><tr><td><code>{{ case.uuid }}</code></td><td>String</td><td>String based, unique id set by Monolith for the case.</td></tr><tr><td><code>{{ case.case_number }}</code></td><td>String</td><td>Case number for the case.</td></tr><tr><td><code>{{ case.case_name }}</code></td><td>String</td><td>Case name/reference set for the case.</td></tr><tr><td><code>{{ case.case_open_date }}</code></td><td>Date</td><td>Case open date in the format "YYYY-MM-DD".</td></tr><tr><td><code>{{ case.case_closed_date }}</code></td><td>Date</td><td>Case closed date in the format "YYYY-MM-DD".</td></tr><tr><td><code>{{ case.last_activity_date }}</code></td><td>Date</td><td>Case last activity date in the format "YYYY-MM-DD".</td></tr><tr><td><code>{{ case.case_status }}</code></td><td>String</td><td>Current status of case.</td></tr><tr><td><code>{{ case.case_type }}</code></td><td>String</td><td>Current case type.</td></tr><tr><td><code>{{ case.case_progress }}</code></td><td>String</td><td>Current progress status of case.</td></tr><tr><td><code>{{ case.description }}</code></td><td>String</td><td>Description of the current case.</td></tr><tr><td><code>{{ case.case_lead }}</code></td><td>{user_id, first_name, last_name, full_name, email, title}</td><td>Properties related to the user assigned as a case lead.</td></tr><tr><td><code>{{ case.custom_field_id }}</code></td><td>{name, value}</td><td>Case custom field value - replace 'id' with custom field id number.</td></tr></tbody></table>

## Evidence Variables

These are variables that contain data related to evidence items within a case.

Remember - the evidence object within a template is a list of evidence items.  To use this data in a template, The values must be inside a loop:

```
Example:
{% for item in evidence %}
{{ item.evidence_id }}
{% endfor %}
```

{% hint style="info" %}
Evidence photos are stored in an array/list and must be referenced within for loop syntax.
{% endhint %}

<table><thead><tr><th width="336">Variable Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ item.evidence_id }}</code></td><td>Number</td><td>Unique ID of evidence</td></tr><tr><td><code>{{ item.uuid }}</code></td><td>String</td><td>Unique ID of evidence</td></tr><tr><td><code>{{ item.evidence_number }}</code></td><td>String</td><td>Item evidence number</td></tr><tr><td><code>{{ item.evidence_type }}</code></td><td>String</td><td>Type of evidence</td></tr><tr><td><code>{{ item.provider }}</code></td><td>String</td><td>Service provider/manufacturer</td></tr><tr><td><code>{{ item.item_name }}</code></td><td>String</td><td>Item name</td></tr><tr><td><code>{{ item.capacity }}</code></td><td>Number</td><td>Size of item</td></tr><tr><td><code>{{ item.capacity_unit }}</code></td><td>String</td><td>Size units: KB, MB, GB, TB</td></tr><tr><td><code>{{ item.size }}</code></td><td>Number</td><td>Size of item</td></tr><tr><td><code>{{ item.size_unit }}</code></td><td>String</td><td>Size units: KB, MB, GB, TB</td></tr><tr><td><code>{{ item.description }}</code></td><td>String</td><td>Description of item</td></tr><tr><td><code>{{ item.progress }}</code></td><td>String</td><td>Progress status of item</td></tr><tr><td><code>{{ item.created_on }}</code></td><td>Timestamp</td><td>Creation Timestamp</td></tr><tr><td><code>{{ item.linked_contact }}</code></td><td>String</td><td>Name of linked contact</td></tr><tr><td><code>{{ item.evidence_photos }}</code></td><td>[{name, image}]</td><td>Array/list of evidence photos</td></tr><tr><td><code>{{ item.custom_field_id }}</code></td><td>{name, value}</td><td>Custom field value - ID is a number that uniquely identifies a custom field.</td></tr><tr><td><code>{{ item.coc }}</code></td><td><a href="#chain-of-custody-variables">Chain of Custody List</a></td><td>List of chain of custody records for this evidence item.</td></tr></tbody></table>

## Chain of Custody Variables

The chain of custody records for an evidence item can be accessed by using the {{ item.coc }} variable listed above.  The example below shows how to access COC records for each evidence item:

```
Chain of Custody Example:

// Loop through evidence items
{% for item in evidence %}

    // Loop through evidence item COC records
    {% for record in item.coc %}
    
        // Output COC record details
        {{ record.type }}
        {{ record.custody_to }}
        {{ record.custody_from }}
        {{ record.timestamp }}
        {{ record.reason }}
        
    // End loop for COC records
    {% endfor %}
    
// End loop for evidence items
{% endfor %}
```

<table><thead><tr><th width="310">Variable Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ record.type }}</code></td><td>string</td><td>Type of COC record: Intake, Release, Move, etc...</td></tr><tr><td><code>{{ record.custody_to }}</code></td><td>string</td><td>Person or location that received the item.</td></tr><tr><td><code>{{ record.custody_from }}</code></td><td>string</td><td>Person or location that provided the item.</td></tr><tr><td><code>{{ record.timestamp }}</code></td><td>string</td><td>UTC timestamp of COC event.</td></tr><tr><td><code>{{ record.reason }}</code></td><td>string</td><td>Notes or reason provided for COC event.</td></tr></tbody></table>

## Acquisition Variables

These are variables that contain data related to acquisition items within a case.

Remember - the acquisitions object within a template is a list of acquisition records.  To use this data in a template, The values must be inside a loop:

```
Example:
{% for item in acquisitions %}
{{ item.acquisition_id }}
{% endfor %}
```

<table><thead><tr><th width="322">Variable Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>{{ item.acquisition_id }}</code></td><td>Number</td><td>Unique ID of item.</td></tr><tr><td><code>{{ item.uuid }}</code></td><td>String</td><td>Unique ID of item.</td></tr><tr><td><code>{{ item.name }}</code></td><td>String</td><td>Name of item.</td></tr><tr><td><code>{{ item.description }}</code></td><td>String</td><td>Description of item.</td></tr><tr><td><code>{{ item.size }}</code></td><td>Number</td><td>Size of item in numbers.</td></tr><tr><td><code>{{ item.size_unit }}</code></td><td>String</td><td>Units of item size:<br>KB,MB,GB,TB.</td></tr><tr><td><code>{{ item.format }}</code></td><td>String</td><td>Format of acquisition<br>Ex. E01, DD, ZIP.</td></tr><tr><td><code>{{ item.type }}</code></td><td>String</td><td>Type of acquisition:<br>Ex. File System, Physical, Chip-off.</td></tr><tr><td><code>{{ item.status }}</code></td><td>String</td><td>Active or Deleted.</td></tr><tr><td><code>{{ item.acquired_on }}</code></td><td>Date</td><td>Date of acquistion.</td></tr><tr><td><code>{{ item.created_on }}</code></td><td>Date</td><td>Date of record creation.</td></tr><tr><td><code>{{ item.acquired_by }}</code></td><td>{full_name, user_id, email, title}</td><td>The user that acquired this data.</td></tr><tr><td><code>{{ item.linked_contact }}</code></td><td>{name, contact_id}</td><td>The person that this acquisition is associated with.</td></tr><tr><td><code>{{ item.evidence }}</code></td><td>{evidence_id, uuid, evidence_number}</td><td>Evidence linked to acquisition.</td></tr><tr><td><code>{{ item.tool }}</code></td><td>{name, version}</td><td>Software uses to create acquisition.</td></tr><tr><td><code>{{ item.storage }}</code></td><td>{storage_id, uuid, storage_number}</td><td>Storage item where acquisition is stored.</td></tr><tr><td><code>{{ item.duration }}</code></td><td>{hours, mins}</td><td>Time spent creating acquisition.</td></tr><tr><td><code>{{ item.custom_field_id }}</code></td><td>{name, value}</td><td>Custom Field Value</td></tr></tbody></table>

## Notes Variables

These variables represent the data associated with notes created in Monolith.  The notes contain rich text content as well as metadata that can be placed into a template report.

{% hint style="info" %}
Notes data can be accessed using the "notes" variable
{% endhint %}

In order to render the note content as rich text data within the Word document, be sure to use the following syntax:

```
// Notes template example
// use 'r' inside the template declaration to output the note content as rich text
// remove the 'r' to output as plain text data

{% for note in notes %}
{{r note.content }}
{% endfor %}
```

Similar to the evidence data, the 'notes' template data is a list of notes, so you must place the note template data inside of a loop to access it and display note content within the template report.

| Variable Name              | Type                                                                                                                                                            | Decription                                                                                  |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `{{r note.content }}`      | Rich Text or Plain Text                                                                                                                                         | This is the note content - use 'r' to output as rich text.  Includes pasted images as well. |
| `{{ note.title }}`         | String                                                                                                                                                          | This is the note title                                                                      |
| `{{ note.uuid }}`          | String                                                                                                                                                          | This is the unique identifier assigned by Monolith to the note.                             |
| `{{ note.created_on }}`    | ISO String                                                                                                                                                      | Creation timestamp of note                                                                  |
| `{{ note.updated_on }}`    | ISO String                                                                                                                                                      | Last Update time of note                                                                    |
| `{{ note.created_by }}`    | User Object                                                                                                                                                     | User that created the note                                                                  |
| `{{ note.linked_object }}` | <p>Object Link<br><code>{</code></p><p>  <code>type: string,</code></p><p>  <code>name: string,</code></p><p>  <code>id: string</code></p><p><code>}</code></p> | This is an object that is linked to the note such as a case, evidence item, or task.        |


---

# 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.monolithforensics.com/monolith/monolith-features/case-reports/report-templates/template-variables.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.
