Vault Loader allows you to bulk create and delete document attachments in your Vault. This works for version-specific attachments and attachments at the document level. If the attachment already exists, Vault uploads the attachment as a new version of the existing attachment. Learn more about attachment versioning.
How to Load Document Attachments
Before loading document attachments:
- Upload files to the File Staging Server or the Vault REST APIs Create a Folder or File (Files under 50MB) or Resumable Upload Session (files over 50MB) endpoints.
- Prepare the CSV input file containing document attachment field values.
To load document attachments:
- In the left panel of the Loader tab, click Load.
- For the CSV File, click Choose and select the CSV input file.
- In the Object Type picklist, select Document Attachments.
- In the Action Type picklist, select Create or Delete.
- In the Key Field drop-down, select the ID field. This option is only required for the Delete action.
- Optional: Click Map Fields to access the field mapping grid.
- Click Start Load.
Before processing the request, Vault validates the selected CSV file. If the file is valid, Vault begins processing the request. When finished, you’ll receive a Vault notification and email with request details and CSV output files.
Field Mapping
With field mapping, you can choose to map specific document fields to the columns in your CSV input file. For example, if your CSV contains a VeePharm ID column containing external id numbers for each document attachment source file, you can map the external_id__v field to the VeePharm ID column to populate the external_id__v field on the document attachment with the value in the VeePharm ID column. If you skip this step, Vault applies auto mapping to all columns in your CSV.
To map fields:
- After selecting your CSV file, select Document Attachments from the Object drop-down list.
- In the Action Type drop-down, select Create or Delete.
- In the Key Field drop-down, select ID. Note that this option is only required for the Delete action.
- Click the Map Fields button to access the field mapping grid. You can also load previously saved mapping by clicking the Map Fields drop-down button and selecting Load Saved Mapping.
- Optional: Apply any additional column filters.
- Optional: Click Clear Fields to clear all existing column mappings.
- Optional: Use the Search box to search for a specific object column.
- In the CSV Column, select a column name from the applicable drop-down list to map to the desired field or label. You can enter a page number above the field mapping grid to jump to a specific page, or use the navigation arrows.
- Optional: Click Save Mapping to save your current column mappings.
- When ready, click Start Load.
Additional Details
- Vault uses yellow highlighting for required CSV columns.
- The drop-down lists in the CSV column displays (no mapping) for available columns of the CSV.
- Select (no mapping) to un-map a previously mapped column.
- Already mapped fields are unavailable in the CSV column drop-down until they are un-mapped.
Preparing the CSV Input File
Prepare a CSV input file with the following values. You must use UTF-8 encoding in your CSV file to create or delete document attachments using Vault Loader.
To create document attachments:
Column Header | Field | Example Value | Description |
document_id__v | Document id | 127 | The id of the document to which Vault Loader should add the attachment. |
filename__v | File Name | gludacta_brochure.docx | The filename of the source file for the attachment. |
file | File | /u1400167/gludacta_2020/gludacta_brochure.docx | The filepath of the attachment on the file staging server. |
description__v | Description | 2020 Gludacta Patient Brochure | Optional: A description of the attachment. Maximum value 100 characters. |
major_version_number__v | Major Version Number | 1 | Optional: The major version of the source document. |
minor_version_number__v | Minor version Number | 3 | Optional: The minor version of the source document. |
external_id__v | External ID | VEEV-12345 | Optional: Set an external ID value on the attachment. |
To delete document attachments:
Column Header | Field | Example Value | Description |
id | ID | 566 | The id of the document attachment to delete. |
Example Inputs for Creating and Deleting Document Attachments
- Create Document Attachments. Download example input.
- Delete Document Attachments. Download example input.
File Validation
Before beginning the Vault Loader job to create or delete document attachments, Vault checks that the selected CSV file meets certain criteria:
- Is not empty
- Does not contain empty columns
- Includes a valid header row. Invalid header rows are those with no columns that match to metadata for the records you’re loading.
- If using the Delete action, the column specified as the Key Field must be mapped.
If your file is not valid, Vault displays a notification, stops the process, and allows you to select a new CSV file. If some of the header columns do not match metadata for your Vault, the notification will allow you to stop the load or ignore those columns and proceed.
Related Permissions
In addition to the standard Vault Loader permissions, your security profile must include the Application: All Documents: All Document Actions permission in order to create document attachments using Vault Loader.