# Configuring for TMF Transfer

This article describes the configurations that Admins must perform in Vaults participating in data transfer via [TMF Transfer](/en/lr/53413/).

<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>: Contact your Veeva Representative or Managed Services Consultant before configuring this feature in your Clinical Operations eTMF Vault. They will complete a Gap Analysis to determine the extent of configuration required to activate this feature.</p>
    </div>
  </div>
</div>



## Configuration Overview

1. In both Vaults, [add a Related Object section for the Agreement object to the Study Detail Page Layout](/en/lr/26387/#related-object) on the _Study_ object.
2. In both Vaults, add [Related Object sections for **Agreement Transfers** and **Transfer Failures**](/en/lr/26387/#related-object)  on the Agreement object page layout.
2. In both Vaults, [map document types to the TMF Reference Model 3.0][3].
3. In the target Vault, [configure the _TMF Exchange Document Lifecycle_ to include custom roles. Or, replace it with a custom lifecycle][4].
4. Optional: In the target Vault, [create _Field Default_ records][5] if either Vault has set required fields on _Base Documents_ that are not included in [_TMF Documents_](/en/lr/53413/#document-fields).
5. Optional: In the target Vault, [create _Configuration Mapping_ records][7] to map components that have different names in each Vault.
6. Optional: In both Vaults, import and deploy [layout changes][8] and [notifications][9].
7. In both Vaults, [assign permissions to users](/en/lr/53413/#permissions).
8. [Establish a Vault to Vault Connection][11] between the source and target Vaults.
9. In both Vaults, [assign _Connection Users_ to the _Connection_][12].
10. Optional: [Activate rule sets][13].
11. Optional: Enable [Document Archive](/en/lr/34126/) in both Vaults to properly transfer archived documents.
12. Optional: Enable [Study Archival](/en/lr/66651/) in both Vaults to properly transfer _Study Country_ and _Study Site_ records related to archived studies.

## Map Document Types {#map-document-types}

You should ensure that document types that you want Vault to transfer are included on the [_TMF Reference Model v3.0_](/en/lr/30636/). To do this:

  1. Navigate to **Admin > Configuration > Document Types**.
  2. Select a document type and click the **Type Defaults** tab.
  3. Under **TMF RM v3.0**, select the document type, then click **Save**.

This mapping determines how Vault populates the _Source Artifact_ (`source_artifact__v`) field in the target Vault. This allows the target Vault to view these documents in the TMF Viewer.

## Configuring Document Lifecycles {#lifecycles}

Vault provides the standard _TMF Document_ document type and _TMF Exchange Document Lifecycle_ to support TMF transfer. Depending on the needs of your organization, you can either:

  * [Add custom roles](/en/lr/2662/) to the standard _TMF Exchange Document Lifecycle._
  * Remove the _TMF Exchange Document Lifecycle_ from the _TMF Document_ document type and [add a custom lifecycle](/en/lr/618/#how-to-edit-document-types).

## Field Defaults {#field-defaults}

_Field Defaults_ allow you to specify a default value to apply to certain fields on incoming documents and object records. For example, if your Vault contains custom required fields on the _Base Document_ type in addition to the [standard _TMF Document_ fields](/en/lr/53413/#document-fields), Vault will not transfer documents to your Vault because those fields do not exist in the source Vault for _TMF Documents_. For that scenario, create a _Document Field Default_ type of _Field Default_ to apply that field and default value to incoming documents for all _Agreements_ associated with a specific _Connection_.

You can apply _Field Defaults_ to all [_Agreements_](/en/lr/53413/#create-agreement) associated with a specific [_Connection_][11] or a specific _Rule Set_. To create a _Field Default_ record:

  1. **Create** a _Field Default_ record from **Business Admin** or a custom tab.
  2. Select a **Field Default Type** and click **Continue**.
  3. Enter a **Name**, **Field Name**, and **Default Value** to apply. Note that [_Default Values_ must be entered in a specific format][20]. For _Object Field_ and _Object Field Default (Rule Set)_ types of defaults, enter an **Object Name**.
  4. Depending on the _Field Default Type_ you are creating, select the **Connection** or **Rule Set** that this default value will apply to.
  5. The **Status** defaults to _Active_ on new records. You can change the status to _Inactive_ if you want Vault to ignore the _Field Default_.
  6. Click **Save**.

If you create both _Rule Set_-level and _Connection_-level _Field Defaults_ for a field, Vault applies the _Default Value_ specified in the _Connection_-level _Field Default Type_.

<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 prioritizes <em>Field Defaults</em> over default document and object configurations.</p>
    </div>
  </div>
</div>



### Default Value Formatting {#default-format}

You must enter values in the _Default Value_ field in the correct format:

<table class="wbord">
  <tr>
    <td>
      <p>
        <strong>Data Type</strong>
      </p>
    </td>
    <td>
      <p>
        <strong>Format</strong>
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Text
      </p>
    </td>
    <td>
      <p>
        Text
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Yes/No
      </p>
    </td>
    <td>
      <p>
        True/False
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Object
      </p>
    </td>
    <td>
      <p>
        Object ID
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Date Time
      </p>
    </td>
    <td>
      <p>
        YYYY:MM:DDTHH:MM:SS.MMMZ
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Date
      </p>
    </td>
    <td>
      <p>
        YYYY:MM:DD
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Picklist Value for Object
      </p>
    </td>
    <td>
      <p>
        Picklist Value Name
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Picklist Value for Document
      </p>
    </td>
    <td>
      <p>
        Picklist Value Label
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Number
      </p>
    </td>
    <td>
      <p>
        123
      </p>
    </td>
  </tr>
</table>

To have Vault use the prior version's value for the field, use the `{prior_version_value}` token. This will automatically fill in whatever value was in that field on the previous version of the document.

## Configuration Mapping {#configuration-mapping}

_Configuration Mapping_ records allow you to map data in your target Vault to data with a different name in the source Vault. For example, if the standard _Content_ (blinding__v) field is inactive in either Vault in favor of a custom field, the field may not be set correctly on transferred documents. To avoid this, create a _Document Field Name_ type of _Configuration Mapping_ to map the standard field name to the custom field name.

### Types of Configuration Mapping

  * Document Field Name
  * Document Type
  * Object Field Name
  * Object Name
  * Picklist Value

### How to Create Configuration Mapping Records

  1. **Create** a _Configuration Mapping_ record from **Business Admin** or a custom tab.
  2. Select the mapping type and click **Continue**.
  3. Enter a **Name** and **Incoming Name**. The **Incoming Name** must match the name from the incoming Vault. For _Object Field Name_ and _Object Type Name_ types, enter an **Object Name Mapping Rule**. For _Picklist Value_ type, enter a **Local Picklist Name**.
  4. Optional: Enter a **Local Name** that matches the name in your Vault. If you do not enter a value in the **Local Name** field, the incoming record will not be populated with the value from the source Vault.
  5. Select the **Connection** that this mapping will apply to.
  6. Click **Save**.

### Configuring Layouts {#layouts}

We recommend that you add additional page layout sections for the _Agreement_, _Connection_, and _CDX Issue_ objects to make the objects more usable. To do this, import and deploy a Configuration Migration Package:

  1. <a class="download-link " href="https://platform.veevavault.help/assets/downloads/tmf-transfer-page-layouts.zip" target="_blank" rel="noopener">Download the VPK file here<i class="fa fa-download" aria-hidden="true"></i></a>.
  2. Extract (unzip) the downloaded file.
  3. [Import](/en/lr/36919/#import) and [Deploy](/en/lr/36919/#deploy) the package in your Vault.

### Configuring Notifications {#notifications}

We recommend that you add two additional notifications to the _CDX Agreement_ lifecycle so that Vault notifies users in both Vaults when an _Agreement_ is activated. To do this, import and deploy a Configuration Migration Package:

  1. <a class="download-link " href="https://platform.veevavault.help/assets/downloads/tmf-transfer-agreement-notifications.zip" target="_blank" rel="noopener">Download the VPK file here<i class="fa fa-download" aria-hidden="true"></i></a>.
  2. Extract (unzip) the downloaded file.
  3. [Import](/en/lr/36919/#import) and [Deploy](/en/lr/36919/#deploy) the package in your Vault.

## Establishing a Connection {#connection}

You must create a Vault to Vault Connection between the two Vaults that will transfer data. For detailed information about setting up connections between Vaults, see [Managing Connections](/en/lr/53358/#vault-to-vault).

### Configuring Connection Users {#connection-users}

You can specify which users receive tasks related to all _Agreements_ linked to a specific connection. This requires that you first update the _Connection_ object in one of the following ways:

  * Deploy the Configuration Migration Package file to update page layout changes for the _Connection_ object. See details [above][8].
  * Add a related object section to the [_Vault to Vault Detail Page Layout_](/en/lr/26387/#related-object) on the _Connection_ object for the _CDX Connection User > User_ object.

To specify users to receive tasks:

  1. Navigate to **Admin > Connections** and click into the _Connection_.
  2. In the _User_ section, click +**Add**.
  3. Select the relevant users.
  4. Click **OK**.

## Activating Rule Sets {#activating-rule-sets}

Veeva provides several [rule sets to support TMF Transfer](/en/lr/53413/#rule-sets):

  * _Simple TMF Transfer Blinded_
  * _Simple TMF Transfer Blinded (No Site Creation)_
  * _Simple TMF Transfer Complete_
  * _Simple TMF Transfer Complete (No Site Creation)_

The _Simple TMF Transfer Complete_ rule set is active by default. You can activate additional _Rule Sets_ via a Vault Owner or through a support ticket.

<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>: Veeva defines and provides rule sets. You cannot edit rule sets or create custom ones.</p>
    </div>
  </div>
</div>



 [3]: #map-document-types
 [4]: #lifecycles
 [5]: #field-defaults
 [7]: #configuration-mapping
 [8]: #layouts
 [9]: #notifications
 [11]: #connection
 [12]: #connection-users
 [13]: #activating-rule-sets
 [20]: #default-format
