**Source URL:** https://quality.veevavault.help/en/gr/456120/index.md

# Importing Training Assignments (Quality)

You can import _Training Assignment_ object records from other training systems into Vault using <a href="/en/gr/26607/">Vault Loader</a> or 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>.

To import _Training Assignments_ using Vault Loader, use the normal <a href="/en/gr/26607/">object record import procedure</a>, with the following additional guidelines:

  * Imported records must include the _Creation Source_, _Training Requirement_, and _Learner_ fields, and may include the _Assigned Date_ and _Due Date_ fields. Except for _Due Date_, these fields are not editable once you create the record in Vault.
  * Ensure you select the **Record Migration Mode** checkbox prior to import.
  * After import, run the _Update Training Assignments_ job to start automation functions.

## About Imported Training Assignment Sharing Settings

When importing a Training Assignment, Vault sets the _Owner_ role in the record's Sharing Settings to the user who imported the record.

Upon import, Vault may or may not update a _Training Assignment's_ Sharing Settings, depending on whether the assignment's associated _Person_ record references a _User_ record:

  * If so, Vault adds the User and their Manager Group to the assignment's Sharing Settings, and adds the User to the document's Sharing Settings.
  * If not, Vault does not update sharing settings, even if a User reference is later added to the Person. In this case, we recommend using Vault API or Vault Loader to update Sharing Settings.

## Training Assignment Field Details

The following list shows field details for imported _Training Assignment_ object records:

| Column Header | Field | Example Value | Notes |
|---|---|---|---|
| `name__v` | Name | Travel policy | The name of the _Training Assignment_ record. |
| `completed_status__v`| Completed Status | On Time | This field is optional during import. |
| `creation_source__v` | Creation Source | `import__v` | The value of this field during import must be `import__v`. <br>Vault manages the `system__v` and `direct_assignment__v` fields. |
| `training_requirement__v` | Training Requirement | V1C000000000127 | Sets the object type using the object field name as the column header and the ID value of the record; if left blank, the object record will use the "base" type. For example, Base Product. |
| `learner__v` | Learner | V0I000000000102 | Assignee of the _Training Assignment_. |
| `training_content_set__v` | Content Set | TCS-000001 | This field references the _Training Content Set_ record containing the assignment's Training Materials. The _Do Not Re-Train_ field in the parent object should be set to _No_ if you don't want Vault to re-issue assignments. |
| `state__v` | Lifecycle State | `completed__v` | The lifecycle state the record is imported into. At this time, Vault only supports the following states:<br>`assigned_state__v`<br>`created_state__v`<br>`completed_state__v`<br>`cancelled_state__v` |
| `estimated_time_minutes__v` | Estimated Time (Minutes) | 70 | The minutes a Learner is expected to spend to read and understand the content. |
| `due_date__v` | Due Date | 3/22/18 | This field is optional during import. |
| `assigned_date__v` | Assigned Date | 2018-11-07T14:50:00.000Z | This field is required during import.<br><br>You can edit this field when Creation Source is set to `import__v`.<br><br>This is the date that Vault assigns the Learner the _Training Assignment_ record.<br><br>Recurring training assignments use this field for calculation of _Next Training Date (Recurrence)_. |

## Best Practices: Importing Training Assignment Records

Ensure the _Update Training Assignments_ job is inactive before the import process begins. If the job runs before you import any records, Vault may assign Learners new _Training Assignment_ records, even if you import completed training assignment records later. To avoid this, inactivate the job, complete the import process, then activate and start the job.

To avoid erroneously issuing Training Assignments, Vault references the _Assigned Date_ rather than the _Created Date_ on migrated Training Assignment records when determining the most recent training completion record. Ensure that recently-completed training records have a more recent _Assigned Date_ than previous completed training records for the same document.

Import or create records for the following before importing the associated _Training Assignments_:

  * Documents
  * _Learner Role_ records
  * _Curriculum_ records
  * _Training Requirement_ records

When importing or creating records in the _Training Requirement_ object, you can set the _Do Not Re-Train_ field to _Yes_, _No_, or blank. If set to _Yes_, and the user does not have a _Training Assignment_ for the Document or Document Version configured for the _Training Requirement_, Vault does not assign new _Training Assignment_ records.

For example, a _Training Assignment_ record references Document A v1.0, but the _Training Requirement_ references Document A v2.0. If you do not want the user to get a new _Training Assignment_ for Document A v2.0, set the _Do Not Re-Train_ field to _Yes_ in the _Training Requirement_. The _Update Training Assignments_ job will not assign a new _Training Assignment_ record.

## Importing Assignment Details Records

You can import <a href="/en/gr/50960/#training-assignments">_Assignment Details_</a> records along with _Training Assignments_. Vault prevents importing duplicate _Assignment Details_ records.

However, since the _Update Training Assignments_ job always creates an _Assignment Details_ record for the most-recently-imported _Training Assignment_, we do not recommend doing so for the most recently-assigned _Training Assignment_ (according to its _Assigned Date_) for a given _Learner/Training Requirement_ combination.

## Updating Learner Application Role on Training Objects

To facilitate easier importing of _Training Assignments_, you can edit the Learner application role in the Sharing Settings of the following objects:

*   _Training Assignment_
*   _Assignment Details_
*   _TA Checklist_
*   _TA Response_
*   _Class Schedule_
*   _Class Roster_
*   _Session_
*   _Session Roster_
*   _Training Completion Criteria_
*   _Training Completion Criteria Detail_
*   _E-Learning Status Detail_
*   _Training Content Status_

Learner application role editing should only be used for importing _Training Assignments_. Editing the Learner application role on these objects in an active training matrix can lead to unexpected behavior, and is not recommended.

## About Training Content Set Deletion

During migration, it may be necessary to delete *Training Content Set* (TCS) and/or *Training ContentSet-Document* (TCS-D) records to unblock Vault Loader or other errors. When attempting to delete these records, you may receive a generic error that Vault cannot directly modify that record because it is in use. This means that the TCS or TCS-D record is in use by a *Training Assignment*, which you must delete in order to proceed. 

To locate that assignment, reference the TCS's *In Use by Related Training Requirement* and *Related Training Requirement* fields: Where the TCS is in-use, the linked *Related Training Requirement* shows the assignments using that TCS record.
