# Enable Automatic Email of Case Questionnaire & Scheduled Reminders

Veeva Safety can automatically send and track questionnaires and reminders to the primary reporter by email depending on the preconfigured settings for product, country, language, and watchlist. This feature was introduced in Vault Safety 20R3 and requires configuration to be made available.


<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>: We recommend enabling <a href="/en/gr/726962/">Follow-Up Questionnair​​es</a> instead of the feature described in this article. You can only configure one method of generating questionnaires configured in your Vault.</p>
    </div>
  </div>
</div>



The steps required to enable this feature depend on the release during which your Vault deployed. Depending on when your Vault was provisioned, it may have certain configurations already, such as security and object layouts. Follow the appropriate checklist to enable this feature:

* <a href="#22r3">Vaults Deployed from 22R3 or Earlier</a>
* <a href="#20r3">Vaults Deployed from 20R3 or Earlier</a>
* <a href="#20r2">Vaults Deployed from 20R2 or Earlier</a>

<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 <a href="/en/gr/5509/#limits">limits document templates</a> to 500 per document hierarchy. If your Vault uses more than 500 templates, contact your Veeva Representative about supporting high-volume document template questionnaires for this feature.</p>
    </div>
  </div>
</div>



## <a id="22r3"></a>Vaults Deployed from 22R3 or Earlier

The following configuration to enable this feature is for Vaults initially deployed in 22R3 or an earlier release.

### Update Constraints on Transmission Object

You must update the constraints on the _Transmission_ object as follows:

1. Navigate to **Admin > Configuration > Objects > Transmission > Object Types > Correspondence > Organization**.
1. Select **Edit**.
2. Clear the **Criteria VQL** field.
3. Select **Save**.
4. Navigate to the _Transmission_ object's **Fields** tab.
5. Select **Organization**.
6. Clear the **Default Value** field.
7. Navigate to the _Transmission_ object's **Object Types** tab and complete the following steps for the _Distribution_, _Inbound Transmission_, and _Submission_ object types:
   1. Select an object type.
   2. Select the **Organization** field.
   3. Select **Edit**.
   4. Update the **Default Value** to `case_version__vr.organization__v`.
   5. Select **Save**.

### Update the Inbox Item Layout

Update the _Inbox Item_ <a href="/en/gr/26387/">object layout</a>:

1. Navigate to **Admin > Configuration > Objects > Inbox Item > Layouts > Inbox Item Detail Page Layout**.
2. Insert a _Related Object_ section for the _Transmission_ object with the following parameters:
    * **Section Label**: `Correspondence`
    * **Creation Option**: **Prevent record creation**
    * **Section Help**: `Inbox Item Correspondence are tracked in this section.`
    * **Criteria VQL**: `object_type__vr.api_name__v = 'correspondence__v'`
    * Select **Apply on Create**.
3. Add the following columns to this _Correspondence_ section: 
    * _Lifecycle State_
    * _Transmission Date_
    * _Due Date_
    * _Correspondence Method_
    * _Recipient (Person)_
    * _Recipient (User)_
    * _Destination Email_
    * _Reply-To_
4. For the _Inbound Transmission_ section, update the **Criteria VQL** value to `object_type__vr.api_name__v != 'correspondence__v'`.

### Update the Inbox Item Lifecycle 

Update the _Inbox Item's_ <a href="/en/gr/30683/">lifecycle</a>:

* Add a _Correspondence_ <a href="/en/gr/30683/#define-states">state</a> to the _Inbox Item Lifecycle_ and configure the following:
   * Add an <a href="/en/gr/59885/#entry-actions">entry action</a> to always update the _Follow-Up Rule_ field to `invalid_case__v` and the _Send Follow-Up_ field to `true`.
   * Add a <a href="/en/gr/59885/#user-actions">user action</a> to always change the state to _New_. We recommend labeling this `Missing Information Received`.
* Add a <a href="/en/gr/59885/#user-actions">user action</a> to the _New_ lifecycle state to always change the state to _Correspondence_. We recommend labeling this `Create Follow-up Questionnaire for Invalid Case`.

## <a id="20r3"></a>Vaults Deployed from 20R3 or Earlier

You must perform the following configuration to enable this feature on a Vault that was initially deployed off of Vault Safety 20R3 or an earlier release. 

<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>: Before you enable this feature, contact Veeva Support to turn on PHI Protection on <em>Person</em> records. We recommend that you request this as soon as possible, as this flag cannot be turned on once records exist.</p>
    </div>
  </div>
</div>



### Configure Object Layouts 

Update the following <a href="/en/gr/26387/">object layouts</a>.

#### Case Object

Update the _Case_ object layout:

* Add the following fields to the _Details_ section:
    * _Follow-Up Rule_
    * _Send Follow-Up_
* Insert a _Related Object_ section for the _Transmission_ object with the following parameters:
    * **Section Label**: `Correspondence`
    * **Creation Option**: **Prevent record creation**
    * **Section Help**: `Inbox Item Correspondence are tracked in this section.`
    * **Criteria VQL**: `object_type__vr.api_name__v = 'correspondence__v'`
    * Select **Apply on Create**.
* Add a <a href="/en/gr/51632/">layout rule</a> so that if _Send Follow-Up_ is `True`, the _Follow-Up Rule_ must not be blank.

### Watchlist Object

Update the _Watchlist_ object layout:

* Insert a _Related Documents_ section with the following parameters:
* **Section Label**: `Questionnaire Templates`
* **Select Columns to Display**: 
  * _Name_ 
  * _Doc Number_
  * _Country_
  * _Language_
  * _Lifecycle State_

### MedDRA Criteria Object

Update the _MedDRA Criteria_ object layout:

* Insert a _Related Documents_ section with the following parameters:
  * **Section Label**: `Term Specific Questionnaire Templates`
  * **Select Columns to Display**: 
    * _Name_ 
    * _Doc Number_
    * _Country_
    * _Language_
    * _Lifecycle State_

## <a id="20r2"></a>Vaults Deployed from 20R2 or Earlier

You must perform the following configuration to enable this feature on a Vault that was initially deployed off of Vault Safety 20R2 or an earlier release. 

<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>: Before you enable this feature, contact Veeva Support to turn on PHI Protection on Person records. We recommend that you request this as soon as possible, as this flag cannot be turned on once records exist.</p>
    </div>
  </div>
</div>



### Update Security Profiles

* Grant the appropriate user roles <a href="/en/gr/23647/">permissions</a> on the following new object types:
  * **Transmission**: _Correspondence_ type
  * **Transmission Message**: _Email Event_ type
* Grant field-level access to the new _Case_ object fields.

### Configure Object Layouts

Update the following <a href="/en/gr/26387/">object layouts</a>.

#### Case Object

Update the _Case_ object layout:
* Add the following fields to the _Details_ section:
    * _Follow-Up Rule_
    * _Send Follow-Up_
* Insert a _Related Object_ section for the _Transmission_ object with the following parameters:
    * **Section Label**: `Correspondence`
    * **Creation Option**: **Prevent record creation**
    * **Section Help**: `Inbox Item Correspondence are tracked in this section.`
    * **Criteria VQL**: `object_type__vr.api_name__v = 'correspondence__v'`
    * Select **Apply on Create**.
* Add a <a href="/en/gr/51632/">layout rule</a> so that if _Send Follow-Up_ is `True`, the _Follow-Up Rule_ must not be blank.

#### Transmission Object

Configure a layout for the _Correspondence_ type of _Transmission_ object with the following parameters:
* Insert a _Details_ section with the following fields:
  * _Case_
  * _Recipient (Case Contact)_
  * _Recipient (Person)_
  * _Correspondence Method_
  * _Destination Email_
  * _Reply-to_
  * _Case Identifier_
  * _Organization_
  * _Due Date_
  * _Transmission Date_
* Insert a _Related Documents_ section for the _Transmission_ field.
* Insert a _Related Object_ section for the _Transmission Message_ object with the following parameters:
  * **Label**: `Correspondence Events`
  * **Creation Option**: **Prevent record creation**
  * **Select Columns to Display**: 
    * _Name_
    * _Event Type_
    * _Event Time_
* Insert an _eSignature_ section with the default settings.
* Insert an _Attachments_ section with the default settings.
* Add the following <a href="/en/gr/51632/">layout rule</a>:
 * **Label**: Hide Email Addresses
 * **Fields to Hide**:
    * _Destination Email_
    * _Reply-to_
 * **Expression**: `correspondence_method_c != 'email_c'`

#### Transmission Message

Configure a layout for the _Email Event_ type of _Transmission Message_ object with the following parameters:

* Insert a _Details_ section with the following fields:
  * _Name_
  * _Transmission_
  * _Organization_
  * _Message Type_
  * _Event Type_
  * _Event Time_
  * _Body_
* Insert an _Attachments_ section with the default settings.

#### Case Contact

Update the layout for the _Reporter_ type of _Case Contact_ object with the following parameters:

* Add include the following fields:
    * _Reporter Email_
  * _Reporter Email Consent_
* Update the _Related Documents_ section to include the following columns:
  * _Products_
  * _Countries_
  * _Language_

#### Watchlist

Update the _Watchlist_ object layout:
* Insert a _Related Documents_ section for the _Questionnaire Templates_ field with the following columns:
  * _Name_
  * _Doc Number_
  * _Country_
  * _Language_
  * _Lifecycle State_

#### MedDRA Criteria

Update the _MedDRA Criteria_ object layout:
* Insert a _Related Documents_ section for the _Term Specific Questionnaire Templates_ field with the following columns:
  * _Name_
  * _Doc Number_
  * _Country_
  * _Language_
  * _Lifecycle State_

### Configure Document Types

Update <a href="/en/gr/618/">document types</a> as follows:

* Activate the _Template_ document type and update the document field order as needed.
* Delete the _Case > Correspondence_ (`correspondence__c`) document type. 
  * If any existing documents in your Vault use this type, either <a href="/en/gr/2271/">reclassify</a> those documents or inactivate the _Correspondence_ (correspondence__c) document type instead of deleting it.

## Activate the Reporter Notification for Followup Job

You must activate the _Reporter Notification for Followup_ <a href="/en/gr/22897/">job definition</a> for Vault to to send automated email questionnaires.

## Optional Lifecycle and Workflow Updates 

We recommend the following optional configurations:

* Configure a <a href="/en/gr/2306/">document lifecycle</a> for templates.
  * Add a workflow to approve template documents
  * Add security so that only certain groups can edit the template documents. There is no security by default.
  * Add a new user group, such as Administrators or Global Administrators, who can edit the template documents.
* Configure a workflow to update _Questionnaires_ that enter the _Ready_ state for manual follow-ups to ensure the user is notified when the questionnaire should be manually sent to the reporter if an email address is unavailable. 
  * For example, add an entry action for Type=Correspondence && Method=Manual.
  * Consider adding a step to capture the transmission date as well.
* Configure a workflow or _State Change_ action to handle email transmission errors.
  * Update the _Transmission_ object lifecycle to move to _Complete_ state when a reply is received. This action should be added to the _Sent_ and _Opened_ states if _Type_ = _Correspondence_.
  * Configure security to the new states:
    * _Sent_
    * _Error_
    * _Ready_

## Customize the Questionnaire Email Notification

You can change the _Questionnaire Email_ <a href="/en/gr/2157/">notification template</a> to fit the needs of your organization. This notification supports only tokens included in the default notification.



