# Document Migration Mode

Document Migration Mode allows you to easily migrate large numbers of documents by relaxing some constraints that Vault typically enforces. For example, you can create documents in any lifecycle state and manually set the name, document number, and version number in your CSV input file.

You can apply Document Migration Mode to new documents that you create or existing documents that you update using the <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault API<i class="fa fa-external-link" aria-hidden="true"></i></a>, <a href="/en/gr/26597/">Vault Loader</a>, or the <a href="/en/gr/26627/">Vault Loader Command Line Tool</a>. All other documents will continue to operate as usual. You must have the _Vault Owner Actions: Document Migration_ permission to apply migration mode using these options.



<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>: Document Migration Mode is separate from <a href="/en/gr/36928/">Configuration Mode</a> and has different functionality.</p>
    </div>
  </div>
</div>



When Document Migration Mode is enabled, Vault allows you to set or edit values for fields that are normally not editable when creating and updating documents.

| Action | Fields Where Constraints are Bypassed | Notes |
| --- | --- | --- |
| Create Documents | `name__v` <br> `major_version_number__v` <br> `minor_version_number__v` <br> `document_number__v status__v` | When setting major or minor version numbers with the _Create Documents_ action, the fields must have a <a href="/en/gr/2942/">security override</a>. |
| Update Documents | `document_number__v` | You cannot set major or minor version numbers with the _Update Documents_ action. |
| Create Document Versions | `name__v` <br> `major_version_number__v` <br> `minor_version_number__v` <br> `status__v` | When setting major or minor version numbers with the _Create Document Versions_ action, the fields must have a <a href="/en/gr/2942/">security override</a>. |
| Update Document Versions | `document_number__v` | You cannot set major or minor version numbers with the _Update Document Versions_ action. |
| Add Document Renditions | `major_version_number__v` `minor_version_number__v` `rendition_type__v` | You must apply _Document Migration Mode_ when adding renditions. |

## How to Use Document Migration Mode

### Documents API

The <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault API's<i class="fa fa-external-link" aria-hidden="true"></i></a> Create Multiple Documents, Create Multiple Document Versions, Update Multiple Documents, and Add Multiple Document Renditions endpoints allow the `X-VaultAPI-MigrationMode` header, which applies Document Migration Mode to any document created or updated in that request.

Set the `X-VaultAPI-NoTriggers` header to true to bypass triggers when Document Migration Mode is enabled. Before using this parameter, learn more about [bypassing triggers][0].

### Vault Loader API

Use the <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault API's<i class="fa fa-external-link" aria-hidden="true"></i></a> Load Data Objects endpoint and set the `documentmigrationmode` parameter to `true`.

To also bypass record triggers, set the `notriggers` parameter to `true`. Before using this parameter, learn more about [bypassing triggers][0].

### Vault Loader UI

When creating or updating documents in bulk with <a href="/en/gr/26605/">Vault Loader</a>, select the **Document Migration Mode** checkbox to apply migration mode. You can only select the checkbox if the _Entity Type_ is _Documents_, _Document Renditions_, _Document Versions_, _Document Relationships_, or _Documents, Versions, Roles_.

The _No Triggers_ option allows you to bypass record triggers. Before using this parameter, learn more about [bypassing triggers][0].

### Vault Loader CLI

Use the `-documentmigrationmode` parameter in the <a href="/en/gr/26627/">Vault Loader Command Line tool</a>.

To also bypass record triggers, use the `-notriggers` parameter. Before using this parameter, learn more about [bypassing triggers][0].

## Limitations of Document Migration Mode

When you create or update documents via an API call or Vault Loader import where you apply Document Migration Mode, some Vault functions are limited and may require an additional step after the upload is complete. The following limitations apply only to the documents created or updated with Document Migration Mode applied:

|Limitation|After creating or updating documents|
|--- |--- |
|Disables <a href="/en/gr/36469/">automatic application of Legal Hold on documents</a>|Re-apply Legal Hold to the intended documents|
|Disables <a href="/en/gr/9706/">video file rendering</a>|Manually re-render the affected video files|
|Disables <a href="/en/gr/33316/">continuous EDL matching</a> to documents|Re-apply EDL matching to the affected documents|
|Disables <a href="/en/gr/46018/">controlled document template</a> creation when using the <a class="external-link " href="https://developer.veevavault.com/api" target="_blank" rel="noopener">Create Multiple Document Versions API<i class="fa fa-external-link" aria-hidden="true"></i></a> or <a href="/en/gr/26911/">Vault Loader: Add Document Versions</a>.|Controlled document template creation returns to normal.|
|In <a href="/en/gr/48988/">Sandbox Vaults</a> only: Disables indexing for <a href="/en/gr/3569/#index">full-text search</a> of documents that are migrated with the `X-VaultAPI-MigrationMode` API header.|Full-text search of documents returns to normal|
|In <a href="/en/gr/48988/">Sandbox Vaults</a> only: <a href="/en/gr/3815/#ocr">OCR indexing</a> is disabled for documents created with the `X-VaultAPI-MigrationMode` API header.|OCR indexing of documents returns to normal|
|Vault does not execute <a href="/en/gr/51700/#create-event-actions">Event Actions</a> for documents uploaded via <a href="/en/gr/18666/">API</a> or <a href="/en/gr/26605/">Vault Loader</a>.|Event Action execution returns to normal.|
|Vault does not change the document lifecycle when updating documents using Vault Loader.|Reclassify the documents, which updates their lifecycle accordingly.|
|Vault may create document versions out of order when migrating documents. For example, version 0.2 may be created before version 0.1.|No additional action required.|
|Vault only sends users a notification containing the success and failure logs when a _Create_ or _Update_ document action completes with Document Migration Mode enabled. No other notification types are sent.|No additional action required.|

## About Bypassing Triggers {#about-bypassing-triggers}

When using Document Migration Mode with Vault API, Vault Loader, or Vault Loader CLI, you can optionally configure Vault to skip all trigger execution. This includes custom Vault Java SDK triggers, Action Triggers, standard triggers, and system triggers which work to deliver various Vault functionality.

Because standard and system triggers are generally expected to run, bypassing these triggers may have unexpected consequences. As a best practice, always run your document migration in a sandbox Vault and test for expected functionality before running in production.

_Document Relationships_ do not allow bypassing triggers.

[0]: #about-bypassing-triggers