# Working with EDLs

Expected Document Lists (EDLs) help you to measure the completeness of projects like clinical studies using the _EDL_ and _EDL Item_ objects. Individual records in the _EDL_ object represent a list of expected documents. _EDL Item_ is a child object of EDL; individual _EDL Item_ records represent a specific type of document. Metadata fields on the _EDL Item_ records indicate how many documents you need to collect (_Expected Steady State Count_).

EDL includes functionality to match documents to individual EDL items based on the _Matching EDL Item Fields_ setting for the parent EDL record. The batch matching job is an automatic recurring action through the Job Scheduler that compares documents in the Vault to _EDL Item_ records and then updates both the _Completeness_ value and document counts for each EDL item.


  <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>: Before you can use this feature, an Admin may need to enable and configure it on your Vault. In RIM Vaults, EDLs are labeled as <em>Content Plans</em>.</p>
    </div>
  </div>
</div>




## EDL Item to Document Matching {#matching}

Vault matches documents to _EDL Item_ records based on the _Matching EDL Item Fields_ setting for the parent EDL record. When matching on a multi-value document field, only one of the values must match the _EDL Item_ record. EDL Item to Document matching may exclude and unmatch inactive document types depending on how it was configured in your Vault. Contact Support to enable this feature.

For example, on the "Blitz Campaign" _EDL_ record, the matching fields are set to: _Document Type > Subtype > Classification_, _Country_, _Product_, and _Campaign_. "Television Ad" is an _EDL Item_ record that belongs to this EDL. When the matching job looks for documents, it will consider a document as a match if the document's _Classification_, _Country_, _Product_, and _Campaign_ values are the same as those on the _EDL Item_ record.

There are several types of document-to-*EDL Item* matching in Vault: [continuous][1], [on-demand][2], [manual][3], and batch matching. On-demand and manual matching are available to you from the _EDL Item_ record's **Details** page. Continuous matching evaluates documents and _EDL Items_ for matches after you perform actions on either. Vault can also automatically match documents in a regular job, which an Admin can configure in your Vault.

The batch matching job updates the _All Document Count_, _Steady State Document Count_, and _Completeness_ fields when matched documents are [archived](/en/lr/34126/). Continuous, on-demand, or manual matching won't update these fields for archived matched documents. The batch matching job will not execute successfully if there are duplicate [document type](/en/lr/618/) labels, even if they are inactive. 
EDL Item to Document Matching only works if the _Document Type_ and _Document Type Detail_ record's _Name_ field has no more than 128 characters.

<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>: The <em>All Document Count</em>, <em>Steady State Document Count</em>, and <em>Locked Document Count</em> fields are not audited when documents are matched or unmatched to <em>EDL Item</em> records and the count is updated. The <em>Locked Document Count</em> field only applies to manual matches.</p>

<p>In addition, manual matching is only available in Regulatory and RegulatoryOne Vaults.</p>
    </div>
  </div>
</div>



## How to Create EDLs

For _EDL_ records, fill in:

  * _Name_
  * _Matching EDL Item Fields_ (limited to 16 fields)
  * _Batch Update_ (set to **Yes**)

For _EDL Item_ records, fill in:

  * _Name_
  * _EDL_ (parent)
  * _Expected Steady State Count_
  * All fields defined for matching in the parent EDL record

Once you've created the records, Vault will update the calculated fields (_Completeness_ and document counts) the next time the batch matching job runs. If you have access, you can also manually trigger matching on individual _EDL Item_ records.

## How to Create EDLs from Templates

If your Vault has _EDL Template_ records, you can create EDLs and EDL items from templates.

  1. Navigate to the _EDL_ object, either through **Business Admin > Objects** or a custom tab. In Clinical Operations Vaults, this action is available in the _Study_, _Study Country,_ and _Study Site_ objects when configured. In RIM Submissions, this action is available through _Submission_ records.
  2. From the **Actions** menu, click **Create EDL from Template**.
  3. Select an **EDL Template**.
  4. Click **Continue**.

Vault creates _EDL_ and _EDL Items_ based on the template you selected. Vault first attempts to make an exact match. If there is no exact match, Vault selects the default. Vault populates the _Source EDL Template_ field with the selected template.

<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>: Vault does not copy values in <em>Attachment</em> fields when the <em>Create EDL from Template</em> action is used.</p>
    </div>
  </div>
</div>



## Continuous Matching {#continuous}

After any of the following events, Vault automatically evaluates documents and _EDL Items_ for new or updated matches:

  * Upload a new document
  * Update a matching field value on a document
  * Document enters or leaves its lifecycle's _Steady_ state
  * Update a matching field value on an _EDL Item_ record
  * Update a matching lookup field on an _EDL_ record

Vault displays a banner notification on the current page when matching documents.

Starting in 19R3, the continuous matching process updates the calculated fields on new _EDL Item_ records (_Completeness_ and document counts) for all matched documents that are not locked to a _Steady_ state, even if the _Batch Update_ field is set to **No** or left blank. This enables Vault to more accurately track an _EDL Item_'s completeness.

Vault will not update tracking fields on existing records where _Batch Update_ is set to **No** or left blank unless you update the _EDL Item_ record or the matched document, triggering continuous matching. To update all existing existing records, contact Veeva Support.

## On-Demand Matching {#on-demand}

Sometimes, you need to immediately find matching documents and update counts and completeness for a specific EDL item. To do this, use the **Match Documents** option from the _EDL Item_ record's **Actions** menu.

This action works the same as the batch matching job, but only affects a single EDL item. The action is only available if the _EDL Item_ record is active and _Batch Update_ is set to _Yes_.


## Manual Matching {#manual}

Manual _EDL Item_ document matching enables you to manually match and unmatch documents, lock an _EDL Item_ match to a specific document version, and exclude automatically matched documents from completeness counts.

In RIM Vaults, this feature is enabled by default.

### How to Manually Match & Unmatch Documents




<div class="note-border alert-important">
  <div class="alert alert-important" role="alert">
    <div><i class="far fa-exclamation-circle"></i></div>
    <div class="alert-text">
      <p><strong>Important</strong>: This functionality is not available in RIM Vaults. For more guidance on working with matched documents in RIM Content Plans, see <a class="external-link " href="https://regulatory.veevavault.help/en/lr/59502" target="_blank" rel="noopener">Using the Content Plan Hierarchy Viewer<i class="fa fa-external-link" aria-hidden="true"></i></a>.</p>
    </div>
  </div>
</div>



To manually match or unmatch a document from an _EDL Item_:

  1. Navigate to the _EDL Item_ record, either through **Business Admin > Objects** or a custom tab.
  2. Scroll to **Matched Documents**.
  3. Click **Add**.
  4. Click the green plus (**+**) icon to match a document with the _EDL Item_ record.
  5. Click the red minus (**-**) icon to unmatch a document from the _EDL Item_ record.
  6. Click **Save**.

Manually matched documents can also be unmatched by clicking **Remove Document** in the _Matched Documents_ section.

<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>: A document that was manually unmatched from an <em>EDL Item</em> may still be automatically matched in the future if it meets the <em>Matching Fields</em> criteria for that <em>EDL Item</em>. When this happens, you can manually unmatch this document by <a href="#exclude">excluding it</a>.</p>
    </div>
  </div>
</div>



### How to Lock a Matched Document Version {#lock}

To lock an _EDL Item_ match to a specific document version:

  1. Navigate to the _EDL Item_ record, either through **Business Admin > Objects** or a custom tab.
  2. Scroll to **Matched Documents**.
  3. Click the grid **Actions** menu for the matched document you want to lock.
  4. Select **Lock Version**.
  5. Select a document version from the drop-down.
  6. Click **OK**.

After you lock a matched document to a specific version, the automatic matching job will not update or replace it, even if there are more recent versions or if a document enters a _Superseded_ lifecycle state. Vault will only remove or replace the locked version if the matching fields on the locked document version no longer match those on the _EDL Item_.

You can unlock a matched document by selecting **Unlock Version** from the grid **Actions** menu.

<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>: If you attempt to lock a document that was automatically matched, Vault uses the matching criteria to determine which versions are available in the <em>Lock Version</em> drop-down. This may result in an empty drop-down list.</p>
    </div>
  </div>
</div>



### How to Exclude Matched Documents {#exclude}

When viewing documents in the _Matched Documents_ section, the _Source_ field is set to _Automatic_ for automatically matched documents and _User_ for manually matched documents.  To exclude an automatically matched document from completeness calculations on your _EDL Item_ record:

  1. Navigate to the _EDL Item_ record, either through **Business Admin > Objects** or a custom tab.
  2. Scroll to **Matched Documents**.
  3. Click the grid **Actions** menu for the matched document you'd like to exclude.
  4. Click **Exclude Document**.
  5. Click **Continue** in the confirmation dialog.

To include an automatically matched document after excluding it, select **Include** from the matched document's grid **Actions** menu in the _EDL Item_ record. Vault will update the completeness counts and set the document's _Include In Total_ field to _Yes_.

Once you exclude a document, Vault performs the following actions:

  * Vault excludes the document from _All Document Count_ and updates the document's _Include In Total_ field to _No_. If the document is in its _Steady_ state, Vault excludes the document from _Steady State Document Count_.
  * If excluding the document changes the difference between the _Expected Steady State Count_ and _Steady State Document Count_ fields, Vault updates the _Completeness_ value.
  * Vault sets the _Iterations without Updates_ field of the grandparent _EDL_ record to zero (0).

You can only exclude automatically matched documents. To unmatch manually matched documents, select **Remove Document** from the **Actions** menu in the _Matched Documents_ section.

## Automatic Matched Document Version Locking {#auto-locking}

Vault can automatically lock a matched document version to an _EDL Item_ once the document reaches _Steady_ state. Once locked, continuous or batch matching jobs no longer update that document version on the _EDL Item_.

If a document version has not yet locked, you can still manually [lock][5] a matched document version or [exclude][6] a matched document.

### How to Automatically Lock Matched Document Versions

To set up automatic document version locking, navigate to your _EDL_ or _EDL Template_ record and set the _Lock Matched Documents on Steady State_ field to **Yes**. Ensure that _Batch Update_ is set to **Yes** on _EDL Items_ you want to automatically lock.

The _Lock Matched Documents on Steady State_ field is automatically available on the _EDL_ and _EDL Template_ objects in all Vaults with EDLs enabled and custom matching fields configured. This feature also enables [Manual Matching][3].

You'll need to [assign the _Lock Matched Documents on Steady State_ field](/en/lr/32857/#assign) to any applicable object types. You must add the _Lock Matched Documents on Steady State_ field to the _EDL_ or _EDL Template_ object page layouts manually in existing Vaults.

<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>: Enabling auto-locking on an <em>EDL</em> record will increase processing time for the EDL matching job.</p>
    </div>
  </div>
</div>



### Locking Matched Document Versions in Other Lifecycle States
By default, you can only lock documents in the _Steady_ and _Superseded_ states, but you can [configure other lockable states](/en/lr/33316/#matched-document-version-locking) as well. End users can then manually lock any matched document versions in these states. However, automatic version locking is only available for the _Steady_ state.



## Auto-Matching & Suggested Matching Limitations

Document types, subtypes, and classification can be configured with labels with up to 200 characters. However, the corresponding filters used in [auto-matching and suggested matching/match document mode](/en/lr/59502/#working-with-matched-documents) support a maximum character length of 128 characters. Document types, subtypes, and classifications should be configured with labels within the 128 matching character limit to work as expected in auto-matching and suggested matching features.

## How to Create Documents from EDL Items {#upload}

You can create documents by uploading source files from an _EDL Item_ record:

  1. Navigate to the _EDL Item_ record detail page or a list page showing the record.
  2. From the record **Actions** menu, choose **Upload**.
  3. Vault selects a document type based on the EDL item and auto-fills certain fields based on the _EDL Item_ values.
  4. Proceed with the standard document creation process.

The next batch matching job will match the newly created document to the _EDL Item_ record.



### Creating Placeholders from EDL Items {#placeholders}

You can also create placeholder documents from _EDL Items_. You can create placeholders from [individual records](/en/lr/15087/#placeholders) or as a [bulk action](/en/lr/33725/#placeholders).

### Creating Documents from Templates for EDL Items

Documents can also be [created from templates](/en/lr/15085/#how-to-add-documents-from-templates) for EDL Items by selecting **Create Document from Template** from the record **Actions** menu.

The _Create Document from Template_ action is only available if one of these two conditions exist:

* The _Document Type_ field on the _EDL Item_ contains a document type that has templates.
* The _Document Type_ field on the _EDL Item_ is not populated, and the user has permission to create at least one document type with templates.

### Defaulting Document Fields

When you create a placeholder or upload a document from an _EDL Item_ record, Vault defaults similar document fields to match those on the _EDL Item_ record, for example, the _Study_ field.

Vault defaults field values for the following field types:

  * Text
  * Number
  * Date
  * DateTime
  * Yes/No
  * Picklist (single & multi-value)
  * Object Reference

## EDL & EDL Item Field Explanations {#edl-fields}

When creating, editing, or reviewing _EDLs_ and _EDL Items_, you can refer to these field explanations.


<table class="wbord" style="height: 583px;">
    <tr style="height: 21px;">
        <td style="height: 21px; width: 99.375px;"> <strong>Field Name</strong> </td>
        <td style="height: 21px; width: 777.153px;"> <strong>Explanation</strong> </td>
        <td style="height: 21px; width: 61.5972px;"> <strong>Objects</strong> </td>
    </tr>
    <tr style="height: 68px;">
        <td style="height: 68px; width: 99.375px;"> Matching EDL Item Fields </td>
        <td style="height: 68px; width: 777.153px;"> Defines the fields that Vault will compare to match individual <em>EDL Item</em> records to documents; <a href="#matching">see details</a>. </td>
        <td style="height: 68px; width: 61.5972px;"> EDL </td>
    </tr>
    <tr style="height: 114px;">
        <td style="height: 114px; width: 99.375px;"> Batch Update </td>
        <td style="height: 114px; width: 777.153px;">
            <p>Controls whether the standard batch matching job will look for matches based on this record</p> Vault automatically sets this to "No" once the matching job has run a certain number of times without detecting any change. By default, this number (called <em>Maximum EDL Iterations</em>) is 10. If you need to change this, contact Veeva Support.</td>
        <td style="height: 114px; width: 61.5972px;"> EDL </td>
    </tr>
    <tr style="height: 44px;">
        <td style="height: 44px; width: 99.375px;"> Last Matched Time </td>
        <td style="height: 44px; width: 777.153px;"> (Non-editable) Indicates the last time the batch matching job found a match for EDL Items in this EDL </td>
        <td style="height: 44px; width: 61.5972px;"> EDL </td>
    </tr>
    <tr style="height: 68px;">
        <td style="height: 68px; width: 99.375px;"> Iterations without Updates </td>
        <td style="height: 68px; width: 777.153px;"> (Non-editable) Indicates the number of times the batch matching job has looked for matches and found no new documents or updates to matched documents for EDL Items in this EDL </td>
        <td style="height: 68px; width: 61.5972px;"> EDL </td>
    </tr>
    <tr style="height: 44px;">
        <td style="height: 44px; width: 99.375px;"> EDL </td>
        <td style="height: 44px; width: 777.153px;"> Parent EDL record </td>
        <td style="height: 44px; width: 61.5972px;"> EDL Item </td>
    </tr>
    <tr style="height: 68px;">
        <td style="height: 68px; width: 99.375px;"> Steady State Document Count </td>
        <td style="height: 68px; width: 777.153px;"> (Non-editable) Indicates the number of matching documents in their lifecycle's <em>Steady</em> state (including <em>Superseded</em>), according to the last batch matching job and any manual match changes </td>
        <td style="height: 68px; width: 61.5972px;"> EDL Item </td>
    </tr>
    <tr style="height: 44px;">
        <td style="height: 44px; width: 99.375px;"> All Document Count </td>
        <td style="height: 44px; width: 777.153px;"> (Non-editable) Indicates the total number of matching documents, according to the last batch matching job and any manual match changes </td>
        <td style="height: 44px; width: 61.5972px;"> EDL Item </td>
    </tr>
    <tr style="height: 68px;">
        <td style="height: 68px; width: 99.375px;"> Expected Steady State Count </td>
        <td style="height: 68px; width: 777.153px;"> Allows you to indicate the number of documents that you expect to collect for this EDL Item </td>
        <td style="height: 68px; width: 61.5972px;"> EDL Item </td>
    </tr>
    <tr style="height: 44px;">
        <td style="height: 44px; width: 99.375px;"> Completeness </td>
        <td style="height: 44px; width: 777.153px;"> (Non-editable) Indicates whether document collection for this EDL Item is complete; <a href="#completeness">see details</a>. </td>
        <td style="height: 44px; width: 61.5972px;"> EDL Item </td>
    </tr>
    <tr style="height: 44px;">
        <td style="height: 44px; width: 99.375px;"> Locked Document Count </td>
        <td style="height: 44px; width: 777.153px;"> Indicates the number of locked documents for an EDL Item. </td>
        <td style="height: 44px; width: 61.5972px;"> EDL Item </td>
    </tr>
</table>

## Completeness {#completeness}

The _Completeness_ field provides three statuses:

<table class="wbord">
    <tr>
        <td> <strong>Status</strong> </td>
        <td> <strong>Conditions</strong> </td>
    </tr>
    <tr>
        <td> Not Started </td>
        <td>
            <p>EDL Item: <em>Expected Steady State Count</em> is one (1) or greater</p> Documents: No matching documents located in any lifecycle state</td>
    </tr>
    <tr>
        <td> In Progress </td>
        <td>
            <p>EDL Item: <em>Expected Steady State Count</em> is one (1) or greater</p> Documents: Matching documents found, but fewer are in their lifecycle Steady state than the expected number</td>
    </tr>
    <tr>
        <td> Complete </td>
        <td>
            <p>EDL Item: <em>Expected Steady State Count</em> is one (1) or greater</p> Documents: Matching documents found and at least the expected number are in their lifecycle Steady state
            <br> OR
            <br> EDL Item: <em>Expected Steady State Count</em> is zero (0)</td>
    </tr>
</table>

## Related Permissions

You can complete all steps in this article with the standard Business Admin, System Admin or Vault Owner profile.

An Admin may configure [Atomic Security](/en/lr/33316/#restricting-edl-atomic-security) to allow or prevent you from performing certain actions in specific lifecycle states.

If your Vault uses custom security profiles, your profile must grant the following [permissions](/en/lr/22824/):

|Type|Permission Label|Controls|
|--- |--- |--- |
|Security Profile|Objects: EDL Item: View|Ability to access the **Match Documents** action on an _EDL Item_ record.|
|Security Profile|Objects: EDL: Create, Edit|Ability to create and edit _EDL_ records, including object actions; necessary for working with templates.|
|Security Profile|Objects: EDL Item: Create|Ability to create _EDL Item_ records; necessary for working with templates.|
|Security Profile|Objects: EDL Item: Edit|Ability to edit _EDL Item_ records; necessary for working with templates. Ability to upload documents to _EDL Item_ records; if [Sharing Settings](/en/lr/61279/) are enabled on _EDL Item_, you must also have the _Editor_ role.|
|Security Profile|Application: EDL Matching: Run|Ability to access the **Match Documents** action on an _EDL Item_ record.|
|Security Profile|Application: EDL Matching: Edit Match Fields|Ability to edit the _EDL Matching Field_ value on an _EDL_ record.|
|Security Profile|EDL Matching: Edit Document Matches|Ability to lock the document version matched with an _EDL Item_ record, exclude or include matched documents in summary fields, and manually match or unmatch documents from an _EDL Item._|


 [1]: #continuous
 [2]: #on-demand
 [3]: #manual
 [5]: #lock
 [6]: #exclude
