Vault provides various URL formats that allow you to link users directly to specific documents from external systems. Most organizations have a variety of systems that hold or reference documents, for example, learning management systems (LMS) and corporate portals. Over time, uploaded documents become out of date and you have to re-upload new versions. Ensuring that all of these systems stay in-sync is time-consuming. Using Vault URLs helps your organization to maintain a single source of truth (Vault), rather than uploading documents to various learning management systems (LMS) and corporate portals.
Note that these URLs only work for users with access to your Vault. If the user isn’t already logged in, Vault will prompt them to log in before displaying the document. Vault will never show a document or document version that the user does not have permission to view. If users don’t have access or no document is found, they will see a “Document Not Found” error.
Base URL
The base URL is the portion of the URL that will not change based on parameters:
https://{DNS}.veevavault.com/ui/#doc_info/{ID}
When constructing a URL, you’ll replace the {DNS} and {ID} items above with actual information:
- Replace {DNS} with the domain name of your Vault, for example, “veepharm” is the DNS in
https://veepharm.veevavault.com
- Replace {ID} with the ID of the document. The easiest way to find this is to open the Doc Info page and look at the number that comes after “doc_info/”. For example, “3084” in
https://veepharm.veevavault.com/ui/#doc_info/3084/0/7
.
The base URL sends users to the first page of the latest version of the document they have access to view. For example, if Gladys has View Document permission on version 1.0, but not on version 1.1, she will see version 1.0.
How to Specify Versions
You can send users to a specific version of the document. To specify a version, add the following to the URL:
/{MAJOR_VERSION}/{MINOR_VERSION}
The variables {MAJOR_VERSION} and {MINOR_VERSION} correspond to the major_version_number__v and minor_version_number__v fields.
Example: https://veepharm.veevavault.com/ui/#doc_info/3084/1/0
Using with State Type or State
You can combine this setting with the state type or lifecycle state setting to send the user to a version only if that version is in the specified lifecycle state or state type.
Example: https://veepharm.veevavault.com/ui/#doc_info/3084/1/0?status=approved_for_use__c
Access & Redirects
If a user doesn’t have permission to access the specified version or the specified version no longer exists, Vault redirects to the latest version they can access. You can choose to prevent this redirect if needed.
How to Specify Page Number
You can send users to a specific page of the document. To specify a page, add the following to the URL:
?anQS=page{#}
The variable {#}
corresponds to the page number of the document.
Example: https://veepharm.veevavault.com/ui/#doc_info/3084?anQS=page3
How to Specify State Type
You can construct a URL that sends users to the latest version in a specific state type, for example, the latest Steady State version. To specify a state type, add the following to the URL:
?state_type={STATE_TYPE_NAME}
The variable {STATE_TYPE_NAME} corresponds to the Name value (not Label) of the state type.
Example: https://veepharm.veevavault.com/ui/#doc_info/3084?state_type=steady_state__v
Note that you cannot specify both state type and lifecycle state in the same URL.
Access & Redirects
If users don’t have access to the latest version in the specified state type, Vault will redirect to the latest version (in that state type) they can access. Vault will never redirect to a version that is not in the specified state type.
Supported State Types
Vault supports the following state types as URL parameters:
- Starting:
starting_state__v
- Steady:
steady_state__v
- Obsolete:
obsolete_state__v
- Superseded:
superseded_state__v
For any other values, users will see the “Document Not Found” error.
How to Specify Lifecycle State
You can construct a URL that sends users to the latest version in a specific lifecycle state, for example, the latest version in Approved for Use state. To specify a lifecycle state, add the following to the URL:
?status={STATE_NAME}
The variable {STATE_NAME} corresponds to the Name value (not Label) of the lifecycle state. This value is visible in Admin > Configuration > Document Lifecycles > [Lifecycle] > States > [State].
Example: https://veepharm.veevavault.com/ui/#doc_info/3084?status=approved_for_use__c
Note that you cannot specify both state type and lifecycle state in the same URL.
Access & Redirects
If users don’t have access to the latest version in the specified lifecycle state, Vault will redirect to the latest version (in that state) they can access. Vault will never redirect to a version that is not in the specified lifecycle state.
How to Stop Redirects
Sometimes, you want to make sure users go to a specific version and prevent the link from working entirely if they don’t have access to that version. To do this, add the following parameter to the URL:
?redirect=false
If users don’t have access to the specified version, they’ll see a “Document Not Found” error.
Example: https://veepharm.veevavault.com/ui/#doc_info/3084?redirect=false
You can also use ?redirect=true
, but this simply replicates the default redirect behavior, so it’s not necessary.