Vault Loader allows you to bulk create or delete object record attachments in your Vault if attachments are enabled for that object type. When creating attachments, if the attachment already exists, Vault uploads the attachment as a new version of the existing attachment. Learn more about Configuring Attachments.
How to Load Object Record Attachments
Before loading object record 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 object record attachment field values.
To load object record 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 the object type of the records on which to add or delete attachments.
- In the Action Type picklist, select Create Attachments or Delete Attachments.
- Optional: If deleting attachments using a CSV file that identifies attachments by an external id, in the Key Field drop-down, select External ID.
- Optional: Click Map Fields to access the field mapping grid.
- Click Start Load.
Field Mapping
With field mapping, you can choose to map specific object fields to the columns in your CSV input file. For example, if your CSV contains a VeePharm ID column with the external ID values for each object record 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 object record 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 the object type of the records to which to add the attachments from the Object drop-down list.
- In the Action Type drop-down, select Create Attachments or Delete Attachments.
- Click the Map Fields button to access the field mapping grid. You can also load previously saved mappings 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 object 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 object record attachments using Vault Loader.
Create Attachments
Column Header |
Field |
Example Value |
Description |
id |
ID |
V5A000000001002 |
The object record ID to which Vault Loader should add the attachment. |
filename__v |
File Name |
NyaxaPrescribingInformation.docx |
The filename of the source file for the attachment. |
file |
File |
u275657/NyaxaPrescribingInformation.docx |
The filepath of the attachment on the file staging server. |
description__v |
Description |
Informative pamphlet for prescribers |
Optional: A description of the attachment. Maximum 100 characters. |
external_id__v |
External ID |
NXA-2020123 |
Optional: Set an external ID value on the attachment. |
Delete Attachments
Column Header |
Field |
Example Value |
Description |
id |
ID |
V5A000000001002 |
The object record ID from which Vault Loader should remove the attachment. |
attachment_id |
Attachment ID |
5 | The ID of the attachment to remove. If you are identifying attachments by external_id, do not include this column. |
external_id__v |
External ID |
NXA-2020123 |
Optional: Identify attachments by an external id value rather than attachment_id. |
Example Input for Creating Object Record Attachments
- Create Object Record Attachments. Download example input.
File Validation
Before beginning the Vault Loader job to create object record 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 attachments you’re loading.
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 Edit permission on the object type to which you are adding attachments.
Additionally, your security profile must include the Attachments: Upload: Execute permission and, if including the Description field, the Attachments: Edit Descriptions: Execute permission, to load attachments for any object with Use Action Security to control attachments enabled. Learn more about securing object attachments.