# Creating & Updating Groups Using Vault Loader

[Vault Loader](/en/lr/26597/) allows you to perform bulk actions on groups in your Vault. Before loading groups, prepare the CSV input file containing group field names and values.

## Preparing the CSV Input Files {#prepare}

### Creating Groups

When creating new groups, the group `label__v` is the only required field and must be set to a unique value.

### Updating Groups

When updating groups, the group `id` field is required. Vault uses group IDs to match existing groups with those specified in the input.

### Upserting Groups

The upsert action is a combination of create and update. Create one input with fields and values required to create new groups and update existing group information.

To update, upsert, or delete system-managed groups, use the `members__v` field. For example:

| id | members__v |
| --- | --- |
| `1394917493801` | `"15873889,10864625"` |

## How to Load Groups

To create, update, or upsert groups:

  1. In the left panel of the **Loader** tab, click **Load**.
  2. For the **CSV File**, click **Choose** and select the CSV input file.
  3. In the **Entity Type** picklist, select **Groups**.
  4. In the **Action Type** picklist, select **Create**, **Update**, or **Upsert**.
  5. 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](/en/lr/26597/#loader-notifications-outputs) with request details and CSV output files.

## File Validation {#file_validation}

Before beginning the Vault Loader job to create or update groups, 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 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.

## Retrieving Group Fields & Values {#retrieving-group-fields-and-values}

Vault group records are configured with a set of standard fields. With the exception of system-managed fields such as `id` and `create_by__v`, you can configure most user fields with values.

  * Configure **String** fields with user-defined alphanumeric values.
  * Configure **ObjectReference** fields with available values.
  * Set **Boolean** fields to _true_ or _false_.

Refer to the <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault API Group Metadata<i class="fa fa-external-link" aria-hidden="true"></i></a> to see all fields configured on the **Groups** object. You can also retrieve all groups in your Vault with the API or [command-line tool](/en/lr/26627/).

To see the fields and values configured for an individual group in your Vault, go to **Admin > Users & Groups > Groups** and click into a group.

## About Group ID Fields {#about-group-id-fields}

The group ID is a system-managed numeric field with values automatically assigned to each new group. The `id` field values cannot be edited. System-managed groups have single-digit IDs (id: 1, 2, 3, etc.). Custom groups are typically assigned larger values (id: 123456789).

You can retrieve lists of group IDs with [Vault Loader](/en/lr/31536/), <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault Groups API<i class="fa fa-external-link" aria-hidden="true"></i></a>, or the [command-line tool](/en/lr/26627/).

To find the ID of an individual group in your Vault, go to **Admin > Users & Groups > Groups** and click into a group record. The group ID is located at the end of the URL in the address bar.

For example: _myvault.veevavault.com/ui/#admin/users_group/detail=&g=**20020002**_

## About User ID Fields {#about-user-id-fields}

The user ID is a system-managed numeric field with values automatically assigned to each new user. The `id` field values cannot be edited.

You can retrieve lists of user IDs with [Vault Loader](/en/lr/31536/#loader-notifications-outputs), <a class="external-link " href="https://developer.veevavault.com/" target="_blank" rel="noopener">Vault Groups API<i class="fa fa-external-link" aria-hidden="true"></i></a>, or the [command-line tool](/en/lr/26627/).

To find the ID of an individual user in your Vault, go to **Admin > Users & Groups > Users** and click into a user record. The user ID is located at the end of the URL in the address bar.

For example: _myvault.veevavault.com/ui/#admin/users_group/detail=&u=**11001**_

You can use Vault Loader to update [User](/en/lr/26609/) information and [Document Roles](/en/lr/26613/).
