# Managing Document Templates

Document templates allow quick creation of new documents from a configured template. When users create the new document, Vault copies the template file and uses that copy as the source file for the new document. This process bypasses the content upload process and allows for more consistent document creation. Document templates are associated with a specific document type, like documents themselves.

## Accessing Template Management {#access}

Administration options are in **Business Admin > Templates > Documents & Binders**. All Admins can manage document templates from this page.

For information about binder templates, see <a href="/en/lr/7625/">Managing Binder Templates</a>.

## Template Types

There are two types of document templates available in Vault.

### Basic Document Templates

Basic document templates use an Admin-uploaded document as the template's source file. You can create multiple basic document templates from a single source file by uploading the same source file each time you create a new basic template. Basic document templates are created and managed in **Business Admin > Templates > Documents & Binders**.

### Controlled Document Templates

Controlled document templates point to a _Steady_ state Vault document, referred to as a template document, as the source file for the template. Documents derived from the template inherit a _Based On_ (and _Original Source_, if enabled) relationship with the template document. You can create multiple controlled document templates in any location in the document type hierarchy, but you can't use a single document version as the template document for more than one controlled document template. Both Admins and users can create controlled document templates, but these templates are mainly managed by users.

See <a href="/en/lr/46025/">Configuring Controlled Document Templates</a> for details about configuring controlled document templates in your Vault. See <a href="/en/lr/46018/">Creating & Managing Controlled Document Templates</a> for details about working with controlled document templates.



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Controlled document templates are converted to basic document templates during cloning or refreshing. This is because the template’s Vault document is not retained in a cloned or refreshed Vault. However, once this document is added to the new or refreshed Vault, you can <a href="/en/lr/5509/#converting">convert</a> the basic template. See also <a href="/en/lr/48988/#configurationcopying">Administering Sandbox Vaults</a>.</p>
    </div>
  </div>
</div>



## Template Limits {#limits}

To ensure reliable loading, the following limits apply to document templates:

- 50 document templates at the Base document type
- 500 document templates per document hierarchy
- 5,000 document templates per Vault

For example, consider the following document hierarchy with document templates: Base Document (20) > VPS Adverse Event Report Document (300) > eDMR (130) > Attachment (50)

This example document hierarchy has 500 total document templates, so Vault will prevent a user from adding another document template to any of the above categories.

## How to Create Templates {#add}

In Admin, you can create both basic and controlled document templates from the **Document & Binder Templates** page.

### Creating a Basic Document Template

To create a basic document template:

  1. From the **Document & Binder Templates** page, navigate to the appropriate level in the document type hierarchy for the new template.
  2. In the templates pane, click **Create > New Document Template**.
  3. On the **Create Document Template** page, select the **Basic Document Template** type.
  4. Enter the **Label**. When users create documents from templates, they see this value in the list of available templates.
  5. Optional: Modify the **Name**. This value does not appear to end users. It is used through the Vault API.
  6. Set the **Status**. If set to _Inactive_, users cannot see the template when adding content.
  7. Click **Choose** and select a file to attach. Once attached, the file name appears next to the **Choose** button.
  8. Click **Save** to create the template and upload the attached file.

### Creating a Controlled Document Template {#create-controlled-template}

To create a controlled document template from **Business Admin > Templates**:

  1. From the **Document & Binder Templates** page, navigate to the appropriate level in the document type hierarchy for the new template.
  2. In the templates pane, click **Create > New Document Template**.
  3. On the **Create Document Template** page, select the **Controlled Document Template** type.
  4. Enter the **Label**. When users create documents from templates, they see this value in the list of available templates.
  5. Optional: Modify the **Name**. This value does not appear to end users. It is used through the Vault API.
  6. Set the **Status**. If set to _Inactive_, users cannot see the template when adding content.
  7. Click **Choose** to select a valid template document from the Vault library. See details [below][4].
  8. Click **Save** to create the template.

Once you create a controlled document template, you can't delete it directly from Admin. See <a href="/en/lr/46018/#deleting">Creating & Managing Controlled Document Templates</a> for details about deleting controlled document templates.

You must have _Read_ permission on the _Document Type Detail_ object to create controlled document templates from Business Admin. You can create a reference constraint using the object's _Enabled_ field on the _Template Document Type_ shared field to display only active document types in the _Select Document_ dialog.

### Template Documents {#template-documents}

In order for documents to appear in the _Select Document_ dialog, they must first be approved to _Steady_ state. Then, a user needs to edit the document and select a value in the _Template Document Type_ field. When you create or convert a controlled document template in **Admin**, your position in the document type hierarchy must match the value in the _Template Document Type_ field. Documents which already have controlled templates do not appear in the _Select Document_ dialog.

## How to Edit Templates {#edit}

To edit a template:

  1. Change the status of a template directly from the template list by selecting **Set to Active** or **Set to Disabled** in the **Actions** menu.
  2. Click on a template name from the list.
  3. Click **Edit**.
  4. Make any necessary changes. You can update the template label, name, and status or replace the attached file. Choosing a new file deletes the old file permanently.
  5. Click **Save**. The updated template is immediately available to users, but the changes do not affect documents created before the update.

### Converting Basic Templates to Controlled Templates {#converting}

You can convert a basic document template to a controlled document template. Before you convert a template, first confirm that the document you wish to use as the source file for the template is in a _Steady_ state and has the _Template Document Type_ field set to the same position in the document type hierarchy as the basic document template you're converting.

To convert a basic template:

  1. Navigate to **Business Admin > Templates > Document & Binders**.
  2. Select the name of a basic document template from the list.
  3. Click **Edit**.
  4. Select the **Controlled Document Template** toggle.
  5. Click **Choose** to launch the _Select Document_ dialog and choose a [template document][4]. Vault only displays documents that are not already associated with another controlled document template.
  6. Click **Save**.

You cannot convert a controlled document template to a basic template. Converting a basic document template to a controlled document template cannot be undone.

## How to Disable and Delete Templates {#disableDelete}

Disabling a template makes it temporarily unavailable to users creating new documents. Setting the disabled template back to **Active** makes it available again. Deleting a template permanently removes it from the Vault and deletes the attached file or the association to the [template document][4]. Neither action affects documents created from the template.

To disable a basic or controlled template:

  * From the template list panel, select **Set to Disabled** from the **Actions** menu.
  * From the template detail page, click **Edit**, change the status and click **Save**.

To delete a basic document template:

  * From the template list panel, select **Delete** from the **Actions** menu.
  * From the template details page, click **Delete**.

  

  <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: You cannot delete controlled document templates directly from Admin. See <a href="/en/lr/46018/#deleting">Creating &amp; Managing Controlled Document Templates</a> for details about deleting controlled document templates. You also cannot delete or disable document templates that are used in workflows.</p>
    </div>
  </div>
</div>



 [4]: #template-documents
