# Set Up Follow-Up Questionnaires

Configure your Vault so that users can run the _Create Correspondence and Questionnaires_ action to generate and send questionnaires for _Cases_ that require follow-up. Vault uses _Follow-up Questionnaire Rules_ to determine the criteria with which to match questionnaires.  When the action runs, Vault evaluates the _Case_ against the selected _Follow-up Questionnaire Rules_ as well as any _Watchlists_. Vault then generates a _Questionnaire_ type of _Transmission_ for each matching _Follow-up Questionnaire Rule_ and _Case Contact_ pair when the following conditions are met:

* A _Case_ matches the criteria defined in a _Follow-up Questionnaire Rule_ or _Watchlist_.
* The _Case Contact_ includes both an email address and consent.

Vault generates the following types of follow-up questionnaires:

* [**Online Questionnaires**][7]: Vault generates online questionnaires leveraging <a href="/en/lr/49033/">checklists</a> and sends recipients a link to enter follow-up data. Users can review and modify the questionnaires before sending them to recipients. Vault creates an _Inbox Item_ for each submitted questionnaire. 
* [**Questionnaire Documents**][8]: Vault generates questionnaire documents from templates, which can be automatically or manually sent as email attachments. Users can modify the documents before sending them to recipients.

For instructions on how to use this feature, see <a href="/en/lr/726955/">Send a Follow-Up Questionnaire to Case Contacts</a>.

### Online Questionnaires {#online}

Users can generate checklists for online questionnaires, then review and update the checklists before sending them to recipients to collect follow-up information. Vault sends recipients a public access link (PAL), allowing them to securely respond without logging into a Vault and without the ability to view or access any areas of your Vault. PALs are valid until Vault sends a reminder with a new PAL, or for 30 days if you do not configure a reminder. Vault generates an _Inbox Item_ for follow-up from each submitted questionnaire.

#### How Vault Determines When to Send an Online Questionnaire {#determines}

You can configure an entry action or user action to trigger online questionnaire generation. The following flowchart illustrates how Vault determines whether to generate the _Questionnaire_ and email questionnaires for a _Case_:

<a href="https://platform.veevavault.help/assets/images/saf-follow-up-online-questionnaire-flow.png" data-lightbox="saf-follow-up-online-questionnaire-flow.png" data-title="" data-alt="Follow-up Online Questionnaire Process Flow">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-follow-up-online-questionnaire-flow.png" alt="Follow-up Online Questionnaire Process Flow" style=""  />
</a>
1. Vault looks at the criteria of the _Follow-up Questionnaire Rules_. Vault selects the _Follow-up Questionnaire Rule_ when:
    * The _Case_ meets all the criteria.
    * There are no criteria in the rule. When triggered by a user action, the user must also confirm Vault's rule selection. 
2. For each selected _Follow-up Questionnaire Rule_ for email correspondence, Vault selects the _Questionnaire Checklist Designs_ that meet the following: 
    * Does not contain any _Watchlist Designs_ or contains _Watchlist Designs_ that match the _Case Watchlist_ tags. 
    * Does not contain any _Country Designs_ or contains _Country Designs_ that match the _Case Contact Country_ or, if blank, the primary _Event Country_. 
3. Vault looks at the _Case Contacts_ who have provided an email address and consent. 
4. For each _Case Contact_ and _Follow-up Questionnaire Rule_ pair, Vault generates a _Questionnaire_ and links the questionnaires for the respective rule. 
5. Vault verifies which of the selected _Follow-up Questionnaire Rules_ have selected the _Enable Auto-Send_ checkbox. For these rules, Vault automatically emails the questionnaires to the _Case Contacts_ when the rule is met. Each questionnaire can be accessed using a public access link (PAL). 

### Questionnaire Documents {#document}

Users can generate follow-up questionnaire documents based on matching templates, then review the documents before sending them to recipients. The <a href="/en/lr/01175/#correspondence-methods-link">_Correspondence Method_</a> of the associated _Questionnaire_ type of _Transmission_ determines if users send those documents automatically, through Vault, or manually, outside of your Vault. Vault creates _Case > Correspondence > Questionnaire_ follow-up documents based on the matching document templates when the associated [_Follow-up Questionnaire Rule_][4] meets following criteria: 

* The _Generate Document from Template_ and _Distribute Document by Email_ field values are _Yes_.
* Is not linked to any active [_Questionnaire Checklist Designs_][9].

#### How Vault Matches Questionnaire Document Templates {#templates}

Vault matches questionnaire templates based on the _Product_, _Country_, and _Language_ values of the template document and _Case_. For more information, see <a href="/en/lr/01221/#questionnaire-matching">Set Up Scheduled Follow-Up Questionnaire Emails</a>.

## Prerequisites

Before configuring follow-up questionnaires, you must complete the following:

* <a href="/en/lr/726962/">Enable follow-up questionnaires</a>.
* To map online questionnaire responses to follow-up _Inbox Items_, <a href="/en/lr/774365/">configure question field mappings</a>.
* To add questionnaire templates for _Watchlists_ and Adverse Events of Special Interest (AESI), you must configure the <a href="/en/lr/01192/">_Watchlist_</a>.

## Important Terms

Before you start configuring follow-up questionnaires, it's important to understand the following terms:
* **Case Contact**: The person reporting the adverse event. This may be a medical professional or the patient themselves.
* **Email Consent**: The _Case Contact_ has explicitly provided consent to be contacted about this _Case_ by all methods of communication, which is tracked with the _Email Consent Provided_ checkbox of the _Case Contact_.
* **Questionnaire**: A predefined form with questions and requests for information to be sent to a _Case Contact_.
* **Watchlist**: A specific set of MedDRA terms of special interest for a specific product. This is sometimes referred to as Adverse Events of Special Interest (AESI). Vault does not evaluate the _Case_ against MedDRA Terms for questionnaire documents.

## Overview

Complete the following procedures to configure Follow-Up Questionnaires in your Vault:

1. Create <a href="/en/lr/01221/#templates">_Questionnaire (Template)_</a> and <a href="/en/lr/01221/#watchlist-questionnaire">_AESI Questionnaire (Template)_</a> types of documents to use as document-based questionnaire templates, considering the <a href="/en/lr/01221/#best-practices--recommendations">best practices & recommendations</a>.
2. Add <a href="/en/lr/01221/#add-reply-to-contact-emails">reply-to contact emails</a> for applicable _Persons_.
3. Optional: [Create checklists][10] for online questionnaires.
4. Optional: [Create _Auto-Submission Schedules_][12] to define when Vault generates _Inbox Items_ for partially completed questionnaires.
5. [Create _Follow-up Questionnaire Rules_][4] to define the criteria Vault uses to generate questionnaires.
6. Optional: [Customize notification templates][11] Vault sends recipients.

## Create Checklists {#checklists}

To send online questionnaires, you must configure checklists, which Vault sends to recipients.

<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>: <a href="/en/lr/537448/">Using the Visual Checklist Designer</a> provides more information on creating sections, designing a question section, and adding library questions.</p>
    </div>
  </div>
</div>



## Create Questionnaire Checklist Designs

To create _Questionnaire Checklist Designs_:

1. Navigate to **Business Admin > Objects > Checklist Designs**.
2. Select **Create**.
3. Select the **Questionnaire Checklist Design** object type and then **Continue**. 
4. On the _Create Questionnaire Checklist Design_ page, complete the following information: 
    * **Checklist Name**: Enter a name for this questionnaire checklist design. 
    * **Checklist Type**: Select a checklist type. You may need to first create a checklist type. For more information, see <a href="/en/lr/47738/">Configuring Checklists</a>, <a href="/en/lr/66938/">Checklist Scoring & Weighting</a>, and <a href="/en/lr/651424/">Translating Checklist Designs</a>.
5. Select **Save**.
6. On the questionnaire, you can add sections in the left panel. 
7. Add questions to the questionnaire checklist design or see the section below to create _Question Designs_.

<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 cannot create multiple <em>Questionnaire Checklist Designs</em> with the same <em>Checklist Type</em>.</p>
    </div>
  </div>
</div>



After creating a _Questionnaire Checklist Design_, you can select the **View Record Detail Page** (<img class="inline" src="https://platform.veevavault.help/assets/images/saf-view-record-detail-icon.png" alt="View Record Detail Icon" style="" />) icon to populate fields and add the following records: 
* _Follow-up Questionnaire Rules_
* _Watchlists_
* _Countries_
* _Checklist Design Translations_
* _Question Field Mappings_
* _Section Designs_
* _Questions_

Alternatively, you can [create _Question Designs_][1] as needed.

### Enable Ad Hoc Questions and Sections

You can configure checklists so that users and respondents can add ad hoc questions and sections to checklists. You must <a href="/en/lr/726962/#optional-enable-ad-hoc-questions-and-sections">grant permissions</a> and update the following fields to _Yes_ on the _Questionnaire Checklist Design_:

  * _Ad Hoc Questions Allowed_
  * _Ad Hoc Sections Allowed_

#### Add Watchlists and Countries

You can add the applicable <a href="/en/lr/01192/">_Watchlists_</a> and <a href="/en/lr/5450/">_Countries_</a> to each _Questionnaire Checklist Design_. These help Vault [determine whether to send an online questionnaire][5] to the _Case Contacts_. To do this:

1. Navigate to the applicable _Questionnaire Checklist Design_.
2. Optional: Add _Watchlists_:
   1. In the _Watchlist_ section, select **Add**.
   2. In the window, select or create the applicable _Watchlists_. You can also use the search bar and filters to refine your search.
   3. Select **OK**.
3. Optional: Add _Countries_:
   1. In the _Countries_ section, select **Add**.
   2. In the window, select or create the applicable _Countries_. You can also use the search bar and filters to refine your search.
   3. Select **OK**.

### Create Question Designs {#designs}

A _Question Design_ is a question associated with a section on a _Questionnaire Checklist Design_. To create a _Question Design_:

1. Navigate to **Business Admin > Object > Question Designs**.
2. Select **Create**.
3. Select a question type, and then **Continue**.
4. Complete the information on the _Question Type_ page. The fields on this page vary depending on the question type selected. See <a href="/en/lr/66932/">Checklist Question & Answer Setup</a> for field information while noting the following differences: 
    * **Section Design**: Select the _Questionnaire Checklist Design_ and section.
    * **Documents Allowed**: Ensure this value is **No**. 
    * **Documents Required**: Ensure this value is **Not Required**.
5. Select **Save**. 

### Create Question Field Mappings

Setting up _Question Field Mappings_ allows Vault to pre-populate questionnaire answers and reduces recipient effort. Vault copies the respective field's source value from the _Case_ to the questionnaire response. When _Question Field Mappings_ reuse the same fields and objects, you can set the _Standard Question Field Mapping_. This allows Vault to map API names of standard fields and their respective objects, instead of requiring manual entry.

_Question Field Mapping_ and _Standard Question Field Mappings_ support the following objects:
* _Case_
* (Primary) _Case Adverse Event_
* (Primary) _Case Product_
* _Case Contact_

When creating _Question Field Mappings_, required fields depend on whether you are selecting a _Standard Question Field Mapping_. To create _Question Field Mappings_:
1. Navigate to **Business Admin > Objects > Question Field Mappings**. 
2. Select **Create**.
3. On the _Create Question Field Mapping_ page, enter the following: 
    * **Field Name**: Enter the API name of the field. If selecting a _Standard Question Field Mapping_, Vault populates this field upon saving the record.
    * **Object Name**: Enter the API name of the object. If selecting a _Standard Question Field Mapping_, Vault populates this field upon saving the record.
    * **Questionnaire Design**: Select a _Questionnaire Checklist Design_.
    * **Question Design**: Select the _Question Design_. 
    * **Standard Question Field Mapping**: (Optional) Select a _Standard Question Field Mapping_.
4. Select **Save**.

<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 cannot add more than one <em>Question Field Mapping</em> for a given <em>Question Design</em>.</p>
    </div>
  </div>
</div>



## Define Auto-Submission Schedules {#schedules}

To capture any partially completed questionnaire responses for online questionnaires, you can create _Automatic Submission Schedules_ to define completion windows in which respondents can submit their questionnaires. Based on the defined schedule, Vault automatically submits the data on behalf of external respondents. To define a schedule:

1. Navigate to **Business Admin > Objects > Automatic Submission Schedules**. 
2. Select **Create**. 
3. Enter a **Name**.
4. For **Timer (Hours)**, enter a number between 1-72 to specify the completion window for the questionnaire. 
5. Select **Save**.

You can create multiple schedules and assign them to specific [_Follow-Up Questionnaire Rules_][4]. When a respondent begins a questionnaire with an assigned schedule, a countdown timer displays on the page. If the timer expires before manual submission, Vault automatically submits any partially completed data and moves the associated _Transmission Checklist_ to the _Auto-Submitted_ state. For these questionnaires, Vault sends the _Online Questionnaire Auto-Submit Email_ [notification][11], which uses the `${Custom.timer__v}` token to specify the total time that was allotted for submission. If a respondent starts a questionnaire shortly before the PAL expires, Vault automatically extends the link's expiration to match the auto-submission deadline.

## Create Follow-Up Questionnaire Rules {#rules}

When Vault generates _Transmissions_ and questionnaires for a _Case_, it uses _Follow-up Questionnaire Rules_ to match questionnaires to the _Case_. To create _Follow-up Questionnaire Rules_:

1. Navigate to **Business Admin > Objects > Follow-up Questionnaire Rules**.
2. Select **Create**.
3. On the _Create Follow-up Questionnaire Rule_ page, complete the following information: 
    * **Name**: Enter a name.
    * **Days Between Attempts**: The number of days that should pass between each reminder email to the _Case Contact_. You can specify up to 30 days.
    * **Enable Auto-Send**: Select this checkbox to allow Vault to automatically send online questionnaires to the desired _Case Contacts_ when this _Follow-up Questionnaire Rule_ is met. 
    * **From**: Select an email address. You may first need to <a href="/en/lr/01204/#create-from-email-addresses">configure the email addresses</a>. 
    * **Reply-To**: Select an email address. When this questionnaire is sent to a _Case Contact_, this is the person the _Case Contact_ replies to.
    * **Total Attempts**: The total number of attempts that Vault should make to email the _Case Contact_. After the first email, Vault waits the specified _Days Between Attempts_ before sending the next email, and each one thereafter. You can specify up to 10 attempts. 
    * **Generate Document from Template**: Select this checkbox to generate questionnaire documents from active templates instead of generating online questionnaires.
    * **Distribute Document by Email**: If you selected the _Generate Document from Template_ checkbox, select this checkbox to send generated documents as email attachments for automatic <a href="/en/lr/01175/#correspondence-methods-link">_Correspondence Methods_</a>. If you do not select this checkbox, users must manually send questionnaire documents outside of your Vault.
4. Optional: To define the completion window for associated questionnaires, select an [**Auto-Submission Schedule**][12].
5. Select **Save**. 

<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 create up to 100 <em>Follow-up Questionnaire Rules</em>.</p>
    </div>
  </div>
</div>



### Add Follow-Up Rule Criteria

Add up to ten _Follow-up Rule Criteria_ to define the criteria a _Case_ must satisfy to match a questionnaire:

1. Navigate to the applicable _Follow-up Questionnaire Rule_.
2. In the _Follow-up Rule Criteria_ section, select **Create**.
3. Define the criteria Vault uses to evaluate _Case_ data for the associated _Follow-up Questionnaire Rule_ using either of the following options: 
   * To define complex criteria, in the [**Follow-up Rule Criteria Query Builder**][6] field, enter a formula expression that returns as true.
     * Optional: Use the **Check Syntax** button to validate your query.
   * To define simple criteria, enter values in the following fields:
     * **Object Name**: Enter the API name of the _Case_ (`case_version__v`) or _Case_ child object.
     * **Field Name**: Enter the API name of the field on the specified object.
     * **Value**: Enter the applicable value of the specified field.
4. Select **Save**.
5. Repeat the above steps to add more criteria. For simple criteria, you can create one _Follow-up Rule Criteria_ for each _Object Name_ and _Field Name_ combination. 

#### Follow-Up Rule Criteria Query Builder {#query-builder}

When building a query using <a href="/en/lr/1037069/">VQL</a> formula expressions, you can use any of the operators and functions in the <a href="/en/lr/52324/">Vault Formula Reference Guide</a> and the Safety-specific functions detailed in <a href="/en/lr/861364/">Create Formula Expressions</a>. 

##### Example

The following example returns true for serious, post-marketing _Cases_:

`IF( AND(case_version__v.serious__v=TRUE, OR( AND(case_version__v.report_type__vr.api_name__v= "study__v",case_version__v.study_product_reason__vr.api_name__v!= "clinical_trial__v"), OR( case_version__v.report_type__vr.api_name__v="spontaneous__v", case_version__v.report_type__vr.api_name__v="literature__v", case_version__v.report_type__vr.api_name__v="literature_study__v"))), TRUE,FALSE)`

### Add Questionnaire Checklist Designs {#add-checklists}

When a _Case_ satisfies the _Follow-up Questionnaire Rule_ criteria, Vault matches it with a questionnaire. Link the _Questionnaire Checklist Designs_ to the _Follow-up Questionnaire Rule_:

1. Navigate to the applicable _Follow-up Questionnaire Rule_.
2. In the _Questionnaire Designs_ section, Select **Add**.
3. In the window, select all applicable checklist designs to link them to the _Follow-up Questionnaire Rule_, or select **Create** to create new checklist designs. 
4. Select **OK**.

## Customize Notification Templates {#notifications}

You can configure the following templates to customize the emails Vault sends for each questionnaire:

* _Online Questionnaire Email_
* _Online Questionnaire Auto-Submit Email_
* _Questionnaire Email with Documents_

You can use the following <a href="/en/lr/2157/#object-message-tokens">object message tokens</a> in the _Subject_ and _Email Body_ fields of the notification, which reference the <a href="/en/lr/01287/">corresponding fields on the _Case_</a>:

* `${Custom.patient_id_value__v}`
* `${Custom.primary_event_reported__v}`
* `${Custom.primary_product_reported__v}`
* `${Custom.receipt_date__v}`
* `${Custom.new_info_date__v}`
* `${Custom.timer__v}` (available for the _Online Questionnaire Auto-Submit Email_ notification)
* `${Custom.uid__v}`
* `${Custom.worldwide_uid__v}`

### Translate Email Notifications {#translate}

You can use the <a href="/en/lr/13309/#about-bulk-translation">bulk translation tool</a> to add translations for the `subject_template` and `message_template` fields of the notification. This enables Vault to send _Case Contacts_ language-specific emails. Vault determines which translation to use based on the _Reporter Language_ value of the _Case Contact_. Vault uses the base language translation in the following scenarios:

* The _Reporter Language_ of the _Case Contact_ is blank or not <a href="/en/lr/16678/">supported</a>
* The _Translated Label_ column of the bulk translation file is blank

[1]: #designs
[3]: #create-question-field-mappings
[4]: #rules
[5]: #determines
[6]: #query-builder
[7]: #online
[8]: #document
[9]: #add-checklists
[10]: #checklists
[11]: #notifications
[12]: #schedules