# Configuring Surveys for External Respondents

Vault allows you to send surveys ([Checklists](/en/lr/49033/)) to respondents outside of your Vault. The recipients can then complete the survey and view any reference files related to it within Vault, without requiring the recipient to have a user account. This enables you to quickly gather data from Sites and contacts external to your Vault without using a third-party tool, and the data remains inside Vault.

An Admin must configure your Vault to ensure users can send surveys to external respondents. See [Creating & Using Surveys for External Respondents](/en/lr/72698/) for more information about generating these surveys.

<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>: This feature is only available in Clinical Operations Vaults with Study Startup.</p>
    </div>
  </div>
</div>



## Configuration Overview

* Navigate to **Configuration \> Checklist Types** and enable or create _Checklist Types_ for applicable target objects. Vault automatically enables the _Site Survey_ and _Outreach Target Survey Checklist Types_.  
* Configure the [**Send Checklists Based on Contacts**][4] action on applicable target [object lifecycles](/en/lr/59885/).
* Optional: Configure [Response Flags][5].  
* Optional: Configure the [filing and sending of complete survey documents][2].   
* Configure [actions for the _Site Survey Invitation_ and _Outreach Survey Invitation_ objects][6].  
* Optional: Configure [Custom Email Senders][1].

## Configuring Response Flag Survey Answers {#response-flag}
When survey respondents select configured _Response Flag_ values on [_Available Answer Design_ records](/en/lr/66932/), these answers confirm [electronic confidentiality][3], non-interest from a Site, or the survey requires additional evaluation. Vault populates the _Response Flag_ value on to the parent _Survey_ record when a respondent selects it.

To enable _Response Flags_ on a survey type, navigate to **Admin > Configuration > Checklist Types** and select a _Checklist Type_ record. Click **Edit** on the applicable _Checklist Type_ record and enter **Response Flag** in the _Optional Fields_ field in the _Available Answer Design_ section. 

To use _Response Flags_ on _Survey_ questions, activate the appropriate values in the _Response Flag_ picklist in the _Business Admin_.

### Configuring Electronic Confidentiality Agreements (eCDA) {#configuring-ecda}
You can configure Vault to generate eCDAs for surveys when users choose a specific answer for a question. To enable this feature, an Admin must perform the following steps in your Vault:

* Create an eCDA [**Formatted Output**](/en/lr/41170/).
* Configure entry and user actions on the _Completed_ state of **Site Survey Lifecycle** to file and send completed eCDA documents.   
  * Select the **eCDA Confirmed** values for the _Notification Template_ to send survey respondents a copy of their completed survey. Vault files the document under the _Document Type_ in the action.

In configured Vaults, to use *Electronic Confidentiality Agreement*:

* Add the **Electronic Confidentiality Confirmed** value to the _Response Flag_ field on answers where the site agrees to terms included in the attached CDA.  
  * Example Answer: 'Yes, I agree to the terms referenced in the attached CDA'  
* Add the **Confidentiality Recipient** value to the *Survey Respondent Type* field on the _Study Person_ records of the appropriate individual to confirm the eCDA.

<div class="note-border alert-important">
  <div class="alert alert-important" role="alert">
    <div><i class="far fa-exclamation-circle"></i></div>
    <div class="alert-text">
      <p><strong>Important</strong>: You can only add the <strong>Confidentiality Recipient</strong> value to the <strong>Survey Respondent Type</strong> field on <em>Study Person</em> records. An error occurs if you attempt to add the value to the <em>Survey Respondent Type</em> field on <em>Contact Information</em> records. A Vault can only have one active <em>Study Person</em> record with the <em>Confidential Recipient</em> value for a survey at a time.</p>
    </div>
  </div>
</div>



## Configuring Custom Email Senders {#custom-email-config}
Before you can send surveys from custom email addresses, an Admin must perform the following configuration steps:

* Enable the Outbound Email Domains setting via a support ticket
* [Configure the outbound email address](/en/lr/78114/)
* [Edit the _Study Person_ page layout](/en/lr/26387/#how-to-show-hide-or-move-object-fields) to include the _Survey Sender Type_ field
* Optional: [Add or update custom email banners](/en/lr/10263/#how-to-update-email-banners)

## Configuring the Send Checklist Based on Contacts Action {#send-checklist-based-contacts}
When configured on target object lifecycles, the _Send Checklist Based on Contacts_ action sends surveys to _Organization Contacts_ or _Study Persons_ with valid email addresses and matching _Survey Respondent Types_. 

You can configure the **Send Checklist Based on Contacts** action as an [entry or user action](/en/lr/59885/). You can also enable this action in bulk using the *Send Checklists Based on Contacts Bulk* action. When configuring the action on a target object lifecycle, complete the following configuration steps:

* Select the **Checklist Type** value that matches the _Survey Template Type_ of the desired *Survey Template*.  
* Select the **Survey Respondent Type** value that matches the _Survey Respondent Type_ value on the corresponding _Study Person_ or _Organization_ record for the site that should receive the survey.

## Configuring the Filing & Sending of Completed Survey Documents {#filing-sending-completed-survey}

You can configure your Vault to save the respondent's completed survey in TMF and send the respondents a copy. To enable this functionality, an Admin must perform the following configuration steps:

* Add the **Generate Document from Formatted Output** action to the _Study Site Survey_ and _Outreach Target Survey_ objects.   
* Optional: Add the **Object Document** field to the appropriate _Classification_ and configure the field to point to the _Study Site Survey_ and/or _Outreach Survey_ objects.  
* Configure the **Generate Document from Formatted Output** action on the _Site Survey Lifecycle_ and _Outreach Target Lifecycle_. We recommend configuring the action as an entry action on the *Completed* lifecycle state.   
* Optional: Add the **Response Document** column to the **Site Survey** section of the _Study Site_ page layout and the _Outreach Survey_ section of the _Outreach Target_ page layout.

### Configuring the Generate Document from Formatted Output Action

To configure the _Generate Document from Formatted Output_ action to send survey respondents a copy of their completed survey:

1. Navigate to **Admin > Configuration > Lifecycles**.
2. Select the **Site Survey Lifecycle** or **Outreach Target Lifecycle**. 
3. Select an object lifecycle state. We recommend selecting the _Completed_ lifecycle state.
4. Select **Edit** for _Entry Actions_ or _User Actions_. We recommend configuring the action as an entry action.
5. Select a **Condition Type**. We recommend adding conditions based on _Survey Type_.
6. In the _Performs Action_ section, select the **Generate Document from Formatted Output** action.
7. Select **Site Survey Response** or **Outreach Target Survey Response** for the _Formatted Output Template_. 
8. Select a **Document Type**. Vault creates the generated document as this _Document Type_ in TMF.
9. Optional: If your Vault has _Subartifacts_ enabled, select a **Document Subartifact**.
10. Select a **Document Lifecycle**. 
11. Optional: Select a **Document Lifecycle State**. This is the state that the generated document moves to during the action.
12. Optional: Select an **Object Field On Document**. This is the field on the generated document.
13.  Select **Response Document** for the _Document Field On Object_ field.
14.  Select the **Send Copy to Survey Respondent** checkbox.
15.  Select **Download Survey Response** in the _Notification Template_ field.
16.  Click **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>: Document generation fails if the selected <em>Document Type</em> contains missing required fields.</p>
    </div>
  </div>
</div>



When the system or a user triggers the _Generate Document from Formatted Output_ action, Vault generates a survey response document from the _Formatted Output Template_ and files the document under the _Document Type_. The system also creates a link for the document in the _Response Document_ field on the _Site Survey_ and _Outreach Target Survey_ objects.

The _Download Survey Response_ notification template allows Vault to send the survey respondent a download link for the PDF copy of the survey response document. The link to the document expires 60 days after Vault sends the notification.

## Configuring Actions for Invitation Object Lifecycles {#config-action-invitation}

Vault creates _Invitation_ objects for each survey sent. You can configure actions for the **Site Survey Invitation** and **Outreach Survey Invitation** lifecycles. We recommend configuring the following user actions:
* **Generate New Link**: Deactivates the associated unique link and generates a new record for that recipient with a new unique link.  
* **Inactivate Link**: Sets the existing record to the _Inactive_ state and deactivates the associated unique link.

### Configuring Survey Reminder Emails

Admins can configure the **Send Site Survey Reminder** and **Send Outreach Survey Reminder** object actions to trigger the reminder notification prior to the designated _Next Reminder Date_. These actions automatically update the _Next Reminder Date_ to today and trigger a system job to send the reminder notification to the _Respondents_ listed on the _Invitation_ record.

[1]: #custom-email-config
[2]: #filing-sending-completed-survey
[3]: #configuring-ecda
[4]: #send-checklist-based-contacts
[5]: #response-flag
[6]: #config-action-invitation