Many companies have complex requirements around document numbering. For example:

  • All SOP are numbered SOP-XXX, where XXX is an incrementing number.
  • Promotional Piece documents use PP-{Product_Abbreviation}-XXX, except the Web asset subtype, which will use WEB-{Product_Abbreviation}-XXX.
  • All documents use VEEVA-XXX.

Vault’s auto-numbering functionality supports these different scenarios.

Access Document Numbering Options

You can manage document numbers from Admin > Configuration > Document Types. To do this, you must have a security profile that grants the Document Types: Create or Edit permissions.

Access Document Auto-Numbering Configuration

You can export a CSV file containing active document auto-number formats and their last used values by navigating to Admin > Configuration > Document Auto Number and clicking Export. You can also update document auto-numbering by clicking Import and selecting a CSV file with document auto-numbers and last used values. The imported CSV file can contain up to 100 rows.

How to Set the Base Numbering Format

New Vaults use a temporary numbering scheme that applies at the base document level. To change the base numbering scheme:

  1. From the Document Types page, choose Edit Details from the Actions menu for Base Document.
  2. In the Document Number Format field, enter the numbering scheme. If needed, click the token icon to search for and insert tokens. The token for an auto-generated, incrementing number is {###} with a number symbol for each digit.
  3. Click Save.

How to Override the Base Numbering Format

All document types inherit their number format from the document type above them (subtype from type, classification from subtype, etc.) unless you define a different format specifically for that type, subtype, or classification.

To override the base document number format:

  1. From the Document Types page, navigate to the document type, subtype, or classification to change and choose Edit Details from the Actions menu.
  2. The Document Number Format field automatically shows the inherited format or any existing override format. Enter the new numbering scheme. If needed, click the token icon to search for and insert tokens. The token for an auto-generated, incrementing number is {####} with a number symbol for each digit.
  3. Click Save.

After changing the document number format, you may wish to start document numbering at a number other than the default. To do so, navigate to Admin > Configuration > Document Auto Number and import a CSV with the new starting document number as the Last Used Value. The new starting value cannot be lower than the existing Last Used Value.


Numbering formats support tokens for the following:

  • Autonumber, {####}: Auto-generated, incrementing number; each number symbol represents a digit in the generated number. In many cases, this number will include leading zeros (0001, 02984, etc.).
  • Object Fields, {field_name}: Document’s values for the object field; Vault provides tokens for fields of the following types: Name (standard field), Status (standard field), Text, Number, Picklist. These are available for standard and custom objects. If a document has multiple picklist options selected, the generated number uses the first value. See below.
  • Created Month, {created_date_mm}: Month that the document was created in a two digit format. (February is 02, November is 11, etc.). At the end of each month (March 31, for example), the autonumber token {####} resets. See below.
  • Created Year, {created_date_yyyy} or {created_date_yy}: Year that the document was created, in either 4 or 2 digit format. At the end of each year (December 31), the autonumber token {####} resets. See below.

Multi-Select Fields as Tokens

When using a multi-select field as a token, the generated number uses the first value of those selected. The first value is usually determined by alphabetical order on the label. However, your Vault may sort selected values based on which value users selected first in the field, if Customer Support has enabled this option.

If you want to avoid this variability, there are three options:

  • Avoid using multi-select fields in the document number.
  • If your Vault uses alphabetical sort for selected values, select a single value during document creation and select additional values later. Vault generates the document number once during document creation. After the number is generated, selecting other values for a field used in the document number will not cause it to update.
  • Enable sorting based on the order of the user’s selections. Vault will use the first value selected when generating the document number.

Special Rules & Details

  • If you use the same sequence, for example, SOP-{####}, in two places, they share the numbering value so that it is impossible to create two documents with exactly the same number.
  • If your organization imports documents using the API’s Migration Mode, it is possible to create documents with identical document numbers.
  • If you assign an auto-numbering sequence, and then decide to stop using it, the sequence persists in your Vault until it is used again. So, if you create SOP-0001 and SOP-0002, stop using the “SOP-{####}” format for a year, and then turn it back on, the next document will be SOP-0003.
  • Vault warns you about sequences that are close enough that they could be misconstrued as the same, for example, SOP-{####} and SOP{####}, but does not prevent you from using these. We do not recommend using very similar formats.
  • Once documents exist for a specific document number format, you cannot change the number of digits in the auto-number token for that format, for example, to add leading zeros. You must make other changes to the format in order to change this.
  • Month numbers repeat every year. If you include the Created Month {created_date_mm} token in your document number format without including a Created Year {created_date_yyyy} or {created_date_yy} token, there may be duplicate document numbers. Vault does not prevent you from using only the Created Month token.
  • When using Created Month {created_date_mm} or Created Year {created_date_yyyy}, {created_date_yy} tokens, the auto-number token {####} resets at the end of each year. For example, you are using the {created_date_mm}-{created_date_yyyy}-{####} numbering format. When you create a document on December 31, 2016, that document’s number is 12-2016-1041. The first document you create on January 1, 2017 will have the number 01-2017-0001.
  • If your auto-number pattern uses object reference tokens, updating the number of {#} signs only affects future auto-number patterns created, not previously generated auto-number patterns. To update all existing auto-number patterns, you must add an additional change to the auto-number pattern configuration other than the number of ”#” signs.

Editing Generated Document Numbers

The Document Number field is never directly editable by users. The only situation in which a Document Number value can change is when a user reclassifies the document and the new document type uses a different auto-numbering format.