# DocGenTemplate

Output type describing one document generation template.

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

This custom Apex type describes one document generation template. It is returned inside DocGenTemplateList by Client.getDocGenTemplates().

## Fields

### Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | optional | Id of the template. Pass it as the template Id when you generate a document. |
| name | String | optional | Name of the template. |
| description | String | optional | Description of the template. |
| objectType | String | optional | API name of the Salesforce object the template is built on. |
| kind | String | optional | The template file type, pdf or docx. |
| createdAt | Datetime | optional | When the template was created. |
| createdBy | String | optional | Who created the template. |
| versionNumber | Integer | optional | Version number of the template. |
| tags | List&lt;String&gt; | optional | Tags on the template. |
| variables | List&lt;<a href="#/apex-type-docgen-template-variable">DocGenTemplateVariable</a>&gt; | optional | The runtime variables the template expects. Filled only when runtime variables are requested, which the Flow action can do and Apex currently cannot. |

## Constructors

```apex
global DocGenTemplate()
```

```apex
global DocGenTemplate(
  String id,
  String name,
  String description,
  String objectType,
  String kind,
  Datetime createdAt,
  String createdBy,
  Integer versionNumber
)
```
