# DocGenTemplateVariable

Output type describing one runtime variable a doc-gen template expects.

> Kind: Apex type · Updated: 2026-10-05

This custom Apex type describes one runtime variable on a template. It is returned in the variables field of DocGenTemplate.

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | optional | API name of the variable. Use it as the key when you pass the variable to a Generate Document action. |
| label | String | optional | Display label of the variable. |
| dataType | String | optional | Data type of the variable. |
| defaultValue | String | optional | Value used when none is passed. |
| isCollection | Boolean | optional | True when the variable takes a collection. |

## Constructors

```apex
global DocGenTemplateVariable()
```
