# Creating Dossier Documents from Templates Automatically (Registration & Dossier Management)

<a href="/en/gr/71498/">Registration & Dossier Management</a> provides you with the ability to automatically create documents from templates for a dossier before generating a <a href="/en/gr/76898/">Dossier Binder</a>. You can select the appropriate template for <a href="/en/gr/71503/#how-to">generated _Requirements_</a> for which you want to create documents. When you run the _Auto create document from template_ action, Vault automatically generates documents from the specified templates for the appropriate descendant _EDL Items_ in a dossier or all dossiers associated with an _Event_.

Depending on your <a href="/en/gr/679928/">Admin's configuration</a>, object, field, and section labels may appear differently than the labels mentioned in this article.

## About Creating Dossier Documents from Templates {#about}

The _Auto create document from template_ action allows you to automatically create documents from a specified template for all applicable _EDL Items_ in a dossier or all dossiers associated with an _Event_. When you run the action, Vault creates documents for descendant _EDL Items_ that fit the following criteria:

* There is no existing matched document.
* The _Document Template_ field on the grandparent _Requirement_ is populated with a <a href="/en/gr/46018/">controlled document template</a>.
* The _Use Source_ checkbox on the grandparent _Requirement_ is clear, indicating either of the following conditions:
  * The record is not <a href="/en/gr/71503/#reusing-shared">reusing shared requirements</a>.
  * You've run the <a href="/en/gr/71503/#customizing">_Customize_ action</a> on the record that is reusing shared requirements.

When you run the action on a root _Requirement_ or _Event_, Vault does the following:

* Sets the _Batch Update_ field to Yes on all parent _EDLs_ with child _EDL Items_ that meet the criteria.
* Checks if any existing documents can be automatically matched based on <a href="/en/gr/32749/#matching">matching fields</a>. Vault adds any matching documents to the applicable _EDL Items_ as automatically matched documents.
* Generates documents for all _EDL Items_ for the specified templates that meet the criteria and adds them to the applicable records as manually matched documents.
  * Populates <a href="/en/gr/32749/#matching">matching fields</a> on each generated document with the applicable values on the related _EDL Item_.
  * Sets the document type based on the _Document Lifecycle Name_ of the grandparent _Requirement_.

## Creating Dossier Documents from Templates {#creating}

Before running the _Auto create document from template_ action, you must ensure several required fields are populated appropriately. When configured by your Admin, these fields may already have default values. To create documents from templates for _EDL Items_ after <a href="/en/gr/71503/#how-to">generating _Requirements_</a> with <a href="/en/gr/71503/#define-req">EDLs</a>:

1. Navigate to the root _Requirement_ or _Event_.
2. Review the descendant records in the <a href="/en/gr/623829/">Requirement Hierarchy Viewer</a>.
3. For each _EDL Item_ for which you want to create a document from a template:
    * Select a **Full Document Type**.
    * Optional: In the _Matched Document_ section, select **Exclude Document** from the document's **Action** menu for any document for which you do not want to generate a new document.
4. For each _EDL Item_ for which you want to create a document from a template, ensure the following fields are populated appropriately on their grandparent _Requirement_:
    * Optional: Select a **Document Lifecycle Name**. 
    * Select a **Document Template**. This document must be a controlled document template in the latest steady state.
    * Ensure the **Use Source** checkbox is clear.
5. For each _EDL Item_ for which you want to create a document from a template, ensure the following fields are populated appropriately:
    * Select a **Full Document Type**. This value must match the _Template Document Type_ field value of the _Document Template_ you selected on the grandparent _Requirement_. If the _Document Lifecycle Name_ field on the grandparent _Requirement_ is populated, it must be the same value.
6. From the record's **All Actions** menu, select **Auto create document from template**.

When you run the action on an _Event_ to generate documents for all associated _Requirements_, Vault does not generate duplicate documents. Instead, Vault associates each applicable _EDL Item_ with the same document.

### Automatic Document Creation from Template {#automatic}

Depending on your Admin's configurations, your Vault may automatically generate documents from a template based on Admin-defined criteria when the _Requirement_ or _Event_  enters a specific lifecycle state (such as _In Progress_) rather than, or in addition to, the _Auto create document from template_ action being available to you in the **All Actions** menu. Change the state of the record from the **Workflow Actions** menu to trigger the entry action.

## Notifications {#notifications}

When Vault finishes creating documents, you'll receive a Vault notification. The notification lets you know if the action was successful or if there were any errors. The notification includes details about which _EDL Items_ were skipped because they already have at least one matched document.

Vault sends one notification per 500 related _Registration Objectives_. For instance, if an _Event_ has 900 _Registration Objectives_, Vault sends two notifications.

## Limitations {#limitation}

The following limitations apply to the _Auto create document from template_ action:

* When running the action on a root _Requirement_, the action creates up to 100 documents. 
* When running the action on an _Event_, the action creates up to 100,000 documents.
* The action cannot run on _Events_ with more than 10,000 associated _Registration Objectives_.
* The action fails if more than 50 descendant _EDL Items_ fit the [criteria for document creation][1].
* The action cannot run on child _Requirements_ with a _Parent Requirement_ value.

[1]: #about
