# Enable Email Submissions and Distributions

Learn how to update your Vault's configuration to enable email distributions.

## About the Feature

Support for Email Distributions was added in 20R3. Vaults created in 20R3 or later include this functionality by default, while Vaults created in 20R2 or earlier must have the configuration upgrades described on this page to enable this feature.

Once you enable this feature, the following pages provide more information on how to  set up and use Email Distributions:

* <a href="/en/lr/01204/">Configure Email Transmissions</a>
* <a href="/en/lr/01267/">Send an Email Transmission</a>

## Mandatory Configuration

The following configuration is required to enable email distributions.

### Activate the Template Document Type

Go to **Configuration > Document Types** and make the **Template (template__v)** document type active.

### Add the Email Profile Layout

1. In **Admin**, go to **Configuration > Objects > Transmission Profile**.
2. On the **Layouts** tab, open the **Email Profile Detail Page Layout**. If this layout does not exist, create a new layout with this name for the Transmission Profile object type.
3. Update the Details section to match the following fields:
    * Name
    * Organization
    * Origin
    * Origin ID
    * Destination
    * Destination ID
    * Format
    * Cover Letter Template
    * Sender User
    * Message Subject
    * Message Body
4. Update the System section to match the following fields:
    * Created By
    * Created Date
    * Modified By
    * Modified Date
    * Lifecycle State
    * Status
5. Insert a **Workflow Timeline** section on the page.
6. Insert an **Email Destination** Related Object section with the following details:
    1. **Related Object**: Email Destination
    2. **Section Label**: Email Recipients
    3. **Creation Option**: Create record in pop-up dialog
    4. **Columns**:
        1. Name
        2. Destination Person
        3. Recipient Type > Recipient.Name
        4. Recipient.Email

### Update the Distribution Layout

1. In **Admin**, go to **Configuration > Objects > Transmission**.
2. On the **Layouts** tab, open the **Distribution Detail Page Layout**.
3. In the **Details** section, add the following fields:
    * Message Subject
    * Message Body
4. Edit the **Transmission Message** Related Object section with the following details:
    1. **Related Object**: Transmission Message
    2. **Section Label**: Transmission Messages
    3. **Creation Option**: Prevent record creation
    4. **Filter Related List**: Message Type - is not equal to - Email Event
5. Insert a **Transmission Message** Related Object section with the following details:
    1. **Related Object**: Transmission Message
    2. **Section Label**: Email Events
    3. **Creation Option**: Prevent record creation
    4. **Columns**:
        1. Name
        2. Recipient
        3. Event Type
        4. Event Time
    5. **Filter Related List**: Message Type - equals - Email Event
6. Create a new Layout Rule on the Transmission object with the following details:
    1. **Label**: Hide Email Information
    2. **IF This layout expression is TRUE**: `transmission_profile_type__cr.name__v != 'Email Profile'`
    3. **Apply the following display effects**:
        1. **Effect**: Hide<br>**Type**: Fields<br>**Values**: Message Body, Message Subject, Cover Letter, Cover Letter (Unbound)
        2. **Effect**: Hide<br>**Type**: Section<br>**Values**: Email Events

### Update the Submission Layout

1. In **Admin**, go to **Configuration > Objects > Transmission**.
2. On the **Layouts** tab, open the **Submission Detail Page Layout**.
3. In the **Details** section, add the following fields:
    * Message Subject
    * Message Body
4. Edit the **Transmission Message** Related Object section with the following details:
    1. **Related Object**: Transmission Message
    2. **Section Label**: Transmission Messages
    3. **Creation Option**: Prevent record creation
    4. **Filter Related List**: Message Type - is not equal to - Email Event
5. Insert a **Transmission Message** Related Object section with the following details:
    1. **Related Object**: Transmission Message
    2. **Section Label**: Email Events
    3. **Creation Option**: Prevent record creation
    4. **Columns**:
        1. Name
        2. Recipient
        3. Event Type
        4. Event Time
    5. **Filter Related List**: Message Type - equals - Email Event
6. Create a new Layout Rule on the Transmission Object with the following details:
    1. **Label**: Hide Email Information
    2. **IF This layout expression is TRUE**: `transmission_profile_type__cr.name__v != 'Email Profile'`
    3. **Apply the following display effects**:
        1. **Effect**: Hide<br>**Type**: Fields<br>**Values**: Message Body, Message Subject, Cover Letter, Cover Letter (Unbound)
        2. **Effect**: Hide<br>**Type**: Section<br>**Values**: Email Events

### Add the Email Event Layout

1. In **Admin**, go to **Configuration > Objects > Transmission Message**.
2. On the **Layouts** tab, open the **Email Event Detail Page Layout** for the Object Type **Email Event**.
3. Update the **Details** section to match the following fields:
    * Name
    * Transmission
    * Recipient
    * Event Time
    * Event Type
    * Message ID
    * Body
4. Insert a **Workflow Timeline** section on the page.
5. Update the **System** section to match the following fields:
    * Created By
    * Created Date
    * Organization
    * Last Modified By
    * Last Modified Date
    * Lifecycle State

### Add the Send Email Transmission Action to Submissions and Distributions

1. In **Admin**, go to **Configuration > Objects > Transmission**.
2. Open the **Actions** tab, and then select **Create**.
3. In the **Create Action** window, select the **Send Email Transmission** action, and then select **Continue**.
4. On the **Create Action** page that appears, select **Save**.
5. Return to the **Transmission** object page, and open the **Object Types** tab.
6. In the upper left corner beside the Action menu, select **Actions**.
7. Expand the Action menu, and then select **Edit Object Type Actions**.
8. Ensure that the **Submission** and **Distribution** object types have access to the action, and deselect all other object types.

<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>: Add any role-based execute overrides as necessary.</p>
    </div>
  </div>
</div>



#### Add the Send Email Transmission User Action to the Transmission Lifecycle

1. In Admin, go to **Configuration > Object Lifecycles > Transmission Lifecycle**. Open the **Ready** State and add a new **User Action**.
2. Select **Perform with conditions**.
3. Select **Transmission Profile Type> equals > Email Profile**.
4. Under **Allow the following actions**:
    * Select **Send Email Transmission**
    * Enter "Send Email Transmission" under **Action Label**

<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>: Add any role based execute overrides as necessary.</p>
    </div>
  </div>
</div>



### Modify the Submit to Gateway Entry Action on Transmission Lifecycle

1. In Admin, go to **Configuration > Object Lifecycles > Transmission Lifecycle** Open the **Ready for Submission** state.
2. Select **Edit** under **Entry Actions**.
3. Modify the Rule for the action **Submit to Gateway**:
    1. Select **Perform with conditions**
    2. Select **Submission Method > is not equal to > FDA Manual**
    3. Select **Add condition**
    4. Select **Transmission Profile Type > includes > AS2 Gateway, Partner Exchange Profile, and System Gateway**
4. Under Perform actions, select **Submit to Gateway**.

### Add Ready to the Pending Group for Transmissions

1. In Admin, go to **Configuration > Object Lifecycle Stage Groups > Distribution Stages > Pending**.
2. Select **Add**.
3. Select <a href="https://platform.veevavault.help/assets/images/saf-blue-add-button.png" data-lightbox="saf-blue-add-button.png" data-title="" data-alt="blue add button">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-blue-add-button.png" alt="blue add button" style=""  />
</a> next to the Ready state.
4. Select **OK**.
5. In Admin, go to **Configuration > Object Lifecycle Stage Groups > Submission Stages > Pending**.
6. Select **Add**.
7. Select <a href="https://platform.veevavault.help/assets/images/saf-blue-add-button.png" data-lightbox="saf-blue-add-button.png" data-title="" data-alt="blue add button">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-blue-add-button.png" alt="blue add button" style=""  />
</a> next to the Ready state.
8. Select **OK**.

### Permission Sets

Manage permission sets from **Admin > Users & Groups > Permission Sets**.

#### Add Read Access to Objects in Permission Sets

Configure **Read** permissions for the objects and object types for permission sets using the table below:

<table>
    <thead>
        <tr>
            <th>Permission Set</th>
            <th>Email Destination</th>
            <th>Person > Email Person</th>
            <th>Transmission Profile (All)</th>
            <th>Transmission Message > Email Event </th>
        </tr>
    </thead>
    <tbody>
        <tr>
             <td>Case Distribution Actions</td>
             <td><i class="fas fa-check"></i></td>
             <td><i class="fas fa-check"></i></td>
             <td><i class="fas fa-check"></i></td>
             <td><i class="fas fa-check"></i></td>
        </tr>
        <tr>
            <td>Case Entry Actions</td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td></td>
        </tr>
        <tr>
            <td>Case Review Actions</td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
        </tr>
        <tr>
            <td>Safety Operations Actions</td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
        </tr>
        <tr>
            <td>Submission Actions</td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
            <td><i class="fas fa-check"></i></td>
        </tr>
    </tbody>
</table>

#### Add Access to Transmission Profile in Administration Actions

Select the _Administration Actions_ permission set and configure permissions for the _Transmission Profile_ object types as follows:

| Object Type | Read | Create | Edit | Delete |
|---|---|---|---|---|---
| _Base Transmission Profile_ | | | | |
| _System Gateway_ | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> |
| _Partner Exchage Profile_ | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> |
| _AS2 Gateway_ | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> |
| _Manual_ | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> |
| _Email Profile_ | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> | <i class="fas fa-check"></i> |

## Optional Configuration

### Auto-submissions
You can use auto-submissions with email distributions. You must first <a href="/en/lr/01260/">enable auto-submissions</a>.

### Security and Workflows
Ensure that the appropriate user roles are granted permissions on the new types of transmission messages and transmission profiles.

### Groups for Document Creation
We recommend that you add a new User Managed Group for users who should be able to create new templates. You may choose to include certain security profiles such as Vault Owner, System Administrator, etc. You may then modify which groups have **Create Document Permission** on each doctype in the **Security Tab** of the Edit Doctype Details Box.