# Email & Messages Administration

From the **Email & Notifications** pages, you can view and edit messages that Vault sends to users as both emails and in-application notifications.

## Vault Summary Emails

System Administrators and Vault Owners can configure email preferences for individual users. By default, Vault sends an email notification for every occurrence of user tasks, user mentions, and send as link, and does not send email notifications for shared views.

Instead of a notification for every occurrence, Admins can also configure Vault to send notifications in the form of a summary email delivered at regular intervals. For example, you may want users to receive a distinct notification for every occurrence of a user mention, but only need one summary email of all shared views once every 24 hours. System Admins and Vault Owners can configure the content and delivery frequency of summary emails. Email preference fields can also be set via Bulk Update.

Vault uses the value in the _[Notification Text][1]_ field as the message in summary emails. In addition, the subject line on Vault summary emails includes the name of the Vault that generated the email by default.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Email preferences are Vault-specific. You’ll need to configure email preferences for each Vault.</p>
    </div>
  </div>
</div>



### Configuring Notification Preferences {#configuring-notification-preferences}

Before configuring notification preferences for an individual user, you'll need to add the following fields to the <a href="/en/gr/26387/">page layout</a> on the _User_ object:

  * Tasks
  * User Mentions
  * Shared Views
  * Send As Link
  * Annotation Replies

To configure notification preferences for an individual user:

  1. From the **Admin** tab collection, click **Users & Groups**.
  2. Click a user's name, then expand the **Email Preferences** section.
  3. Click **Edit**.
  4. Select a value for each **Notification Type**: _Never_ disables email notifications for that category; _Summary_ holds email notifications for a specified interval; _Every Occurrence_ sends an email for each notification of that category.
  5. Click **Save**.

You can also add notification settings to the _User Profile_ layout in **Admin > Configuration > Pages > User Profile Page**, allowing users to configure their own preferences on the user profile page. Keep in mind that _Never_ only disables email notifications and not Vault notifications through the notification bell panel.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: You can disable or enable Annotation Replies and User Mentions by navigating to <strong>Admin &gt; Settings &gt; Annotations</strong> and selecting or clearing the <strong>Enable notifications for Annotation Replies</strong> and <strong>Enable User Mentions in annotations</strong> checkboxes.</p>
    </div>
  </div>
</div>



### Configuring Summary Emails {#configuring-summary-emails}

To configure summary emails for a Vault:

  1. Navigate to **Admin > Configuration > Email Settings**.
  2. In the _Email Summaries_ section, click **Edit**.
  3. Optional: To rearrange the order of notification types within the summary email, select a notification type for each **Section**. Leaving a section blank means nothing will appear in that section. If you have set a notification template's [_Notification Category_] [1] value to a custom category and set its _Email Preferences_ to _Summary_, you must add the custom category to a **Section** field or the notifications corresponding to that template will not be added to the summary emails. Summary-eligible notifications with their _Notification Category_ set to _None_ will appear in the last section, labeled _None_ in the _Email Settings_, and _Other Notifications_ in summary emails.
  4. Enter the notification limit per type. By default, the limit is 20 notifications per type but can be set to a maximum of 100. Notifications that exceed this amount are not included in the summary email, excluding the oldest notification first.
  5. Select a **Delivery Interval** from the picklist.
  6. Click **Save**. Vault uses the updated message configuration for any new emails sent to users.

If _Favorite Documents_ is set to _Never_, you can also disable <a href="/en/gr/71440/">Vault notifications</a> for this category by clearing the **Admin > Settings > Notifications > Enable Vault Notifications if Favorite Documents Email Preferences is Never** setting.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If a notification category is inactive or was not added to a <em>Section</em> in the <em>Email Summaries</em> section, Vault includes notifications from that category in the <em>Other Notifications</em> section of summary emails.</p>
    </div>
  </div>
</div>



### About the Delivery Interval {#about-the-delivery-interval}

Vault automatically checks hourly for summary-eligible notifications based on the specified _Delivery Interval_. When performing this check, Vault checks when the last summary email was sent and when the next delivery should occur.

If the user has already received a summary email within the specified _Delivery Interval_ (for example, within the last 12 hours if the _Delivery Interval_ is set to _12 Hours_), Vault includes the notification in the next scheduled email.

If the user has not received a summary email within the specified _Delivery Interval_ when the hourly check occurs, Vault still sends the summary email. The summary email schedule is then based on the initial send time for that user. For example, Vault sends the next summary email for the user in 12 hours if the _Delivery Interval_ is set to _12 Hours_.

If the _Delivery Interval_ is set to _24 Hours_, Vault sends the summary email between 8:00-9:00 AM each day in the user's time zone. This occurs only if the user has notifications to receive. The timing could vary in certain circumstances, such as:

* If no summary-eligible notification was available when the job ran between 8:00-9:00 AM, Vault sends the summary email within an hour of the first generated summary-eligible notification. For instance, if the first summary-eligible notification was generated at 10:30 AM, then Vault sends the summary email around 11:00 AM.

* The summary email was initially configured for that Vault or the user changed a notification category to _Summary_. In these instances, the user may receive a summary email within an hour if they have summary-eligible notifications generated after those changes were made.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Vault does not send a summary email if there are no new summary notifications to send to the user.</p>
    </div>
  </div>
</div>



### Configuring the Summary Notification Template

You can edit the summary notification template from **Admin > Configuration > User Account Emails > Notification Summary** using HTML and [tokens][4].

### Configuring the Email Burst Threshold

If needed, you can choose to limit the number of notification emails Vault can send for a given notification template within a 30-minute period. To configure this notification email burst threshold:

  1. Navigate to **Admin > Configuration > Email Settings**.
  2. In the **General Settings** section, click **Edit**.
  3. Enter an **Email Burst Threshold** value. This value is the maximum number of emails Vault will send per notification template within a 30-minute period.
  4. Click **Save**.

### Enable Summary Email Enhancements {#enable-summary-email-enhancements}

Vault offers enhanced versions of summary emails that provides users more control over email preferences and reduces email notification frequency. These enhancements include:

  * Sets the _Email Preferences_ field to _Summary_ if it was set to _Every Occurrence_ on specific <a class="download-link " href="https://platform.veevavault.help/assets/downloads/25R3-Summarized-Notification-Templates.xlsx" target="_blank" rel="noopener">Platform and application-family notification templates<i class="fa fa-download" aria-hidden="true"></i></a>.
  * Changes the _Delivery Interval_ value on the **Admin > Configuration > Email Settings** page to _1 hour_.
  * Sets the _Notification Category_ to _Tasks_ for Task Reminder notifications (`object_task_reminder_notification__v` and `task_reminder_notification__v`) if they were set to _None_ prior to 25R1.
  * Exposes the following email notification configuration fields by default on the **User Profile** page: _Annotation Replies_, _Shared Views_, _Send as Link_, and _Favorite Document_ notification fields.
  * Includes a _Summary Email Interval_ picklist on the **User Profile** page that allows users to choose their own delivery interval.
  
<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: As of the 25R2 release, these enhancements are enabled by default. In addition, the following templates are set to <em>Every Occurrence</em> if they were set to <em>Summary</em> for Vaults that did not opt out in 25R1:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">bulkstatechangesummary__v</code></li>
  <li><code class="language-plaintext highlighter-rouge">bulkupdatesummary__v</code></li>
  <li><code class="language-plaintext highlighter-rouge">bulkworkflowsummary__v</code></li>
  <li><code class="language-plaintext highlighter-rouge">emailparticipants__v</code></li>
</ul>

<p>The <code class="language-plaintext highlighter-rouge">email_participants__v</code> notification template is set to <em>Every Occurrence</em> in 25R3 if it was set to <em>Summary</em>.</p>
    </div>
  </div>
</div>



## Accessing Message Administration

You can manage email and notification messages from **Admin** > **Configuration** > **Notification Templates** and **User Account Emails**. While Vault allows you to create, edit, and delete entries in the **Notification Templates** page, you can only edit in the **User Account Emails** page. You must have the correct Admin permissions to work with messages.



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Be aware of the <a class="external-link " href="https://support.google.com/a/answer/1366776?hl=en" target="_blank" rel="noopener">limits on incoming emails set by Gmail<i class="fa fa-external-link" aria-hidden="true"></i></a>. A large number of incoming emails may lead to a delay in email delivery.</p>
    </div>
  </div>
</div>



## Creating New Messages

You can create email and notification messages for documents and objects in Vault. For example, you may want to create a notification message specifically for task reminders on document workflows. Keep in mind when creating message notifications for workflows that multi-document workflows use object messages while single document workflows use document messages. This behavior applies to the notification step as well as task actions, such as task assignment, reassignment, and reminders.

### Document Messages {#document-messages}

To create a new document message:

  1. From the **Notification Templates** page, click **Create**.
  2. Select **Document** and click **Continue**.
  3. Enter values in each field. See field details [below][1].
  4. Click **Save**.

### Object Messages {#object-messages}

To create a new object message:

  1. From the **Notification Templates** page, click **Create**.
  2. Select **Object**.
  3. Select an object or **All objects** from the **Create Object Message** picklist. This allows you to create a message that applies to a specific object or all objects.
  4. Click **Continue**.
  5. Enter values in each field. See field details [below][1].
  6. Click **Save**.

## Editing Messages {#edit-messages}

To edit an existing message:

  1. From the **Notification Templates** or **User Account Emails** page, click on the message to edit.
  2. Click **Edit**.
  3. Change the entries in each field as needed. See field details [below][1].
  4. Click **Save**. Vault uses the updated messages for any notifications sent out after you save.

## Deleting Messages

To delete a message:

  1. From the **Notification Templates** page, find the message in the list to be deleted. Only custom messages can be deleted.
  2. From the Actions menu to the right of the message label, click **Delete**.

You cannot delete a message which is currently in use.

## Message Fields {#tokens}

Each message has the following fields:

  * **Label** is a unique identifier for the message, which is only visible to Admins. We recommend that you provide a descriptive name to help Admins select the message in other configuration pages.
  * **Name** is a unique identifier for the message that can be used through the Vault API.
  * **Email Preferences** allows you to set the email frequency for each notification. You can select _Every Occurrence_, _Summary_, or _Never_. For notification templates belonging to System categories, users can override this field value from the <a href="/en/gr/7239/#notification-email">_User Profile_</a> page and Admins can override it from the _User_ object. Email preferences for custom categories can't be overridden for users. Emails are still sent immediately for tracked emails regardless of the frequency selected in this field.
  * **Notification Category** allows you to set the type of notification. Select a category (this picklist can contain up to 15 active categories), or select _None_. The following are System categories: _User Mentions_, _Annotation Replies_, _Shared Views_, _Send As Link_, _Tasks_, and _Favorite Documents_. Notification templates associated with System categories are automatically assigned to their respective categories. Admins must manually add any new notification templates associated with workflow tasks to the _Tasks_ category.
  
  * **Subject** is the subject of the email sent to the notification recipient. This field can contain tokens, but cannot contain hyperlinks.
  * **Notification Text** is the message that appears in the notification bell panel, notification pages for the notification recipient, and summary emails. This field can contain tokens, rich text, and hyperlinks. It is not available for user account emails because those are only sent via email.
  * **Email Body** is the body of the email sent to the notification recipient. This field can contain tokens, hyperlinks, rich text, and basic HTML.

You can only add rich text formatting to rich text field tokens. Adding the `;richtext` modifier to a non-rich text field token results in an error.

Vault does not resolve document or object message tokens to hyperlinks in email notifications sent to delegate users, and removes any hyperlinks to Vault pages. Links to non-Vault pages remain displayed as links in email notifications to delegate users.

### Limits

Email messages on the **User Account Emails** page allow a maximum of 2,000 characters.

The following limits apply to writing and configuring text in notification templates:

* **Subject**: 255 characters
* **Notification Text**: 1,023 characters
* **Email Body**: 2,000,000 characters

The following limits apply when Vault displays the notification through the notification bell and notification pages, and includes the text count of resolved token values:

* **Subject**: 255 characters
* **Notification Text** (in Vault): 4,000 characters

Vault truncates text that exceeds the _Subject_ and _Notification Text_ limit displayed in the notification bell. Vault counts the entire URL towards the 4,000 _Notification Text_ character limit. For example, while `Veeva` is only five characters, `https://www.veeva.com/` is 22 characters, so Vault counts this text as 22 characters.

### Supported HTML Tags {#supported-html}

Vault supports the following HTML tags when you customize a notification:

  * `<b>bold</b>`
  * `<em>emphasis</em>`
  * `<i>italic</i>`
  * `<p>paragraphs</p>`
  * `line break<br>`
  * `<blockquote>blockquotes are indented</blockquote>`
  * `<span>span</span>`

#### Ordered Lists

  `<ol>`\
     `<li>list item 1</li>`\
     `<li>list item 2</li>`\
  `</ol>`

#### Unordered Lists

  `<ul>`\
     `<li>list item 1</li>`\
     `<li>list item 2</li>`\
  `</ul>`

#### Allowed attributes for \<a> tag

  * `"href"`
  * `"target"`
  * `"title"`

##### Example

  `<a target="_blank" href="http://www.veeva.com/" title="Veeva Systems Inc.">Explore Veeva.com!</a>`

#### Allowed attributes for \<span> tag

  `"style"`

##### Example

  `<span style="color: #DE483A; font-weight:bold">span</span>`

#### Allowed attributes for \<img> tag (Email Body only)

  * `"src"`
  * `"alt"`
  * `"width"`
  * `"height"`

##### Example

  `<img src="http://www.veeva.com/images/ veeva_logo.gif" alt="Veeva Systems logo" height="50" width="200">`

## Sender Display Name for Emails

You can use the **Admin** > **Configuration** > **Email Settings** page to modify the "display name" that appears in the **From** field for Vault-generated emails. This value is separate from the actual email address, which is not configurable. For example, the display name is "Veeva Vault" in the default "Veeva Vault vault-emails@veeva.com". You may want to modify this to show your company name, for example, "VeevaPharm PromoMats Vault".

To modify the display name, edit the **Email From Name** field. Note that you should not use the following characters within this field due to standard email restrictions: `"` `( )` `,` `:` `;` `<` `>` `@` `[` `]`

## Document Message Tokens {#document_message_tokens}

<a href="/en/gr/6382/">Tokens</a> are special bits of text that are replaced at the time the message is used. You can use the following tokens within the email content for document messages:

### URLs

  * ${docInfoUrl}: Doc Info page for related document
  * ${notificationHome}: Notifications page
  * ${taskHome}: **Home** > **My Tasks** page

### Task Information

  * ${taskDecisionComments}: For the related workflow, all participant names, task names, verdicts, completion dates, and comments; requires additional setup in a notification step of a workflow
  * ${taskInstructions}: Workflow start comments entered by the workflow owner

### Workflow Recipient Information

  * ${recipientMobilePhone}: Message recipient's mobile phone number
  * ${recipientOfficePhone}: Message recipient's office phone number
  * ${recipientName}: Message recipient's full name
  * ${recipientEmail}: Message recipient's email address
  * ${recipientFirstName}: Message recipient's first name
  * ${recipientLastName}: Message recipient's last name
  * ${recipientTitle}: Message recipient's title

### Workflow Owner (Initiator) Information

  * ${workflowInitiatorMobilePhone}: Workflow owner's mobile phone number
  * ${workflowInitiatorOfficePhone}: Workflow owner's office phone number
  * ${workflowInitiatorName}: Workflow owner's full name
  * ${workflowInitiatorEmail}: Workflow owner's email address
  * ${workflowInitiatorFirstName}: Workflow owner's first name
  * ${workflowInitiatorLastName}: Workflow owner's last name
  * ${workflowInitiatorTitle}: Workflow owner's title

### Sender Information

  * ${senderFirstName}: First name of the document's Coordinator, or the workflow owner if the Coordinator is not defined
  * ${senderLastName}: Last name of the document's Coordinator, or the workflow owner if the Coordinator is not defined

### Document Owner Information

  * ${docOwnerMobilePhone}: Document owner's mobile phone number
  * ${docOwnerOfficePhone}: Document owner's office phone number
  * ${docOwnerName}: Document owner's full name
  * ${docOwnerEmail}: Document owner's email address
  * ${docOwnerFirstName}: Document owner's first name
  * ${docOwnerLastName}: Document owner's last name
  * ${docOwnerTitle}: Document owner's title

### Document Fields & Information

  * ${docNumber}: Document number
  * ${docType}: Document type
  * ${docSubType}: Document subtype
  * ${docProduct}: Product, as a space-separated list if multiple products are selected
  * ${docMajor}: Major version number
  * ${docMinor}: Minor version number
  * ${docNameNoLink}: Document name, as plain text
  * ${docName}: Document name, as a link to the document's Doc Info page
  * ${docStatus}: Status/lifecycle state
  * ${docTitle}: Title
  * ${daysToExpire}: Number of days before the expiration date
  * ${taskDueDate}: Workflow due date
  * ${linkToAnnotation}: Link to a specific annotation; this token relates to the User Mentions functionality.
  * ${noteComment}: Text from an annotation's _Comment_ field (email templates only); this token relates to the User Mentions functionality.

### Vault Loader Information {#vault-loader-tokens}

  * ${vaultLoaderFileLink}: Link to access the input file
  * ${vaultLoaderFileName}: Input file name
  * ${vaultLoaderObjectType}: Entity type
  * ${vaultLoaderActionType}: Action type
  * ${vaultLoaderSettings}: Loader settings
  * ${vaultLoaderWhereClause}: Where clauses applied on extract
  * ${vaultLoaderStartTime}: Start time
  * ${vaultLoaderDuration}: Total duration
  * ${vaultLoaderRecordsPerSecond}: Number of records processed per second
  * ${vaultLoaderNumSuccesses}: Number of successfully processed records
  * ${vaultLoaderSuccessLink}: Link to access the success log file
  * ${vaultLoaderNumFailures}: Number of records that failed to be processed
  * ${vaultLoaderFailureLink}: Link to access the failure log file
  * ${vaultLoaderFailureReason}: Reason for the failure
  * ${vaultLoaderRecordMigrationMode}: Whether _Record Migration Mode_ was enabled
  * ${vaultLoaderNoTriggers}: Whether _No Triggers_ was enabled for _Record Migration Mode_
  * ${vaultLoaderDocumentMigrationMode}: Whether _Document Migration Mode_ was enabled
  * ${vaultLoaderChangeObjectType}: Whether _Change Object Type_ was enabled

## Web Action Tokens

You can use the following tokens within the email content for web actions:

  * ${Object.id}: Object record ID
  * ${Session.id}: Session ID
  * ${Vault.domain}: Vault domain
  * ${Vault.id}: Vault ID
  * ${User.id}: User's ID
  * ${User.email__v}: User's email
  * ${User.name__v}: User's username

## Object Message Tokens {#object-message-tokens}

You can use the following tokens within the email content for object messages:

  * ${Object.name__v}: Object record name
  * ${Object.status__v}: Object record status
  * ${Object.state__v}: Object record state
  * ${Object.[custom field name]__c}: Object record's custom field name to be used for object-specific messages. Use the `;richtext` modifier to display the content in rich text format.
  * ${objectType}: Object type
  * ${Object.welcome_email_subject__sys}: Email subject line (<a href="/en/gr/47738/">_Checklists only_</a>)
  * ${Object.welcome_notification_text__sys}: Notification text (<a href="/en/gr/47738/">_Checklists only_</a>)
  * ${Object.welcome_email_text__sys}: Email text (<a href="/en/gr/47738/">_Checklists only_</a>)
  * ${taskName}: Task name
  * ${taskDueDate}: Task due date
  * ${recipientName}: Task recipient name
  * ${taskHome}: Link to the My Tasks page
  * ${taskVerdicts}: Task verdicts
  * ${taskComments}: Task comments
  * ${taskInstructionsByInitiator}: Instructions provided by the workflow owner
  * ${notificationMessage}: Notification message
  * ${workflowLabel}: Label of the workflow
  * ${multiDocDocumentsListLatestVersion}: Workflow documents for latest version, with link
  * ${multiDocWorkflowLink}: Document workflow name, with link
  * ${workflowTargetNoLink}: Non-linked document workflow name
  * ${multiDocDocumentsList}: Linked list of documents in a workflow
  * ${multiDocDocumentsListDocNumber}: Linked list of documents in a workflow with each document's document number preceding the document name
  * ${workflowContentsLink}: Linked list of documents in a workflow
  * ${workflowContentsNoLink}: Non-linked list of documents in a workflow
  * ${workflowInitiatorEmail}: Workflow owneremail
  * ${workflowInitiatorFirstName}: Workflow owner first name
  * ${workflowInitiatorLastName}: Workflow owner last name
  * ${workflowInitiatorMobilePhone}: Workflow owner mobile phone
  * ${workflowInitiatorName}: Workflow owner name
  * ${workflowInitiatorOfficePhone}: Workflow owner office phone
  * ${workflowInitiatorTitle}: Workflow owner title
  * ${workflowErrorMessage}: Workflow error message
  * ${vaultName}: Name of user's Vault
  * ${uiBaseExtUrl}: Base URL of user's Vault

## Summary Email Tokens {#summary-email-tokens}

You can use the following tokens within the summary notification template:

* ${vaultName}: Name of user's Vault
* ${currentDate}: Date when the summary email was sent
* ${category.name}: Notification category name
* ${category.viewAllLink}: Launches notifications page with all notifications related to that category. This page is available for only 30 days. 
* ${notification.senderImage}: Sender's user profile image
* ${notification.content}: Content of the notification. Corresponds to the _Notification_ Text field of the notification template
* ${notification.date}: Date when the notification was generated

 [1]: #tokens
 [2]: #document-messages
 [3]: #object-messages
 [4]: #summary-email-tokens
 [5]: #supported-html
 [6]: #configuring-summary-emails
