# Configuring Formulation Questionnaire Import (Compliance Management)

[Compliance Management](/en/lr/71434/) provides users with the ability to automate the creation of _Qualitative Assessment_ records by importing formulation questionnaire data into _Qualitative Assessments_. Users can [review responses from completed questionnaires](/en/lr/492101/) (_FQ Checklists_) with automatically-assigned regulated categories and statuses, then select which responses to convert into _Qualitative Assessments_ for the related _Formulation_. Users can view generated _Qualitative Assessments_ in the [Formulation Composition Viewer](/en/lr/74432/).

You must [configure formulation questionnaires](/en/lr/76971/), [set up checklists](/en/lr/76967/) for formulation questionnaires, and configure the [Formulation Composition Viewer](/en/lr/74427/) before completing the steps in this article.

<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>: In Vaults created prior to 22R3, the <em>Qualitative Assessment</em> object may be labeled <em>Compliance Assessment</em>.</p>
    </div>
  </div>
</div>



## Configuration Overview {#overview}

Configuring your Vault to import formulation questionnaires involves the following steps:

1. [Configure objects][3]
2. [Define response mappings][4] to determine how Vault creates _Qualitative Assessments_ for imported formulation questionnaire data
3. Review[ how Vault imports questionnaire data][8] to determine your Vault's [import behavior for matching records][9]
4. [Configure the _Import Questionnaire_ action][12]
5. [Configure user permissions][13]

<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>: Depending on your Vault’s creation date and which features are currently enabled and configured, some of the steps described in this article may be unavailable or already complete in your Vault.</p>
    </div>
  </div>
</div>



## Configuring Formulation Questionnaire Import Objects {#configure-objects}

You must make the following changes to object fields and layouts:
* Enable [system-managed naming](/en/lr/30986/) for the _Qualitative Assessment_ object.
* Add the _Name_ field to the _Qualitative Assessment_ [object layout](/en/lr/26387/#fields).
* Add the _Imported_ field to the _FQ Checklist_ [object layout](/en/lr/26387/#fields).

We also recommend adding the _Question Text_ field as a lookup field from the _Question Design_ object to the _FQ Regulated Category Mapping_ object.

## Defining Response Mappings {#map}

You must create _Response Mapping Strategies_ and _FQ Regulated Category Mappings_ to instruct Vault how to generate _Qualitative Assessments_ from formulation questionnaire responses. First, create _Response Mapping Strategies_ that identify expected responses. Second, link those strategies to _FQ Regulated Category Mappings_ to define how Vault creates and populates _Qualitative Assessment_ records based on specific responses in _FQ Checklists_.

You do not have to create _Response Mapping Strategies_ for each response and _Regulated Category_ combination. Instead, you can link the same _Response Mapping Strategy_ to multiple _FQ Regulated Category Mappings_.

### Example Use Case {#example}

Configure a checklist with the question "Is your product listed on the Toxic Substance Control Act (TSCA)?" with possible responses "Listed", "Not Listed", and "Exempt". For this response, you only want to create _Qualitative Assessments_ for the "TSCA" _Regulated Category_ for "Listed" responses. To do this, create the following records to define response mapping:

* A _Response Mapping Strategy_ for the _Multiple Choice Question_ question type with the following values:
  * **Name**: `Listed`
  * **Answer Text**: `Listed`
* An _FQ Regulated Category Mapping_ with the following values:
  * **Regulated Category**: `TSCA`
  * **Response Mapping Strategy**: `Listed`
  * **Compliance Assessment Status**: `Y`
  * **Mapping Priority**: `1`

When a user imports a completed questionnaire to review for _Formulation_ "HEXACRON-DOS" with a response of "Listed" for the "Is your product listed on the Toxic Substance Control Act (TSCA)?" question, Vault assigns that response the _Regulated Category_ value of "TSCA" and the _Compliance Assessment Status_ value of "Y". If the user then selects that response to import, Vault will create a new _Qualitative Assessment_ with the assigned values for the "HEXACRON-DOS" _Formulation_.

If the questionnaire had a response of "Not Listed" or "Exempt" for that question, Vault would not create a _Qualitative Assessment_ for that response when the user imported the questionnaire.

### Creating Response Mapping Strategies {#strategies}

_Response Mapping Strategies_ define expected responses for multiple choice and number types of _Question Designs_ included in questionnaires. You must create Response Mapping Strategies for all multiple choice and number types of responses you want to allow users to import and convert to _Qualitative Assessments_. You can only create mapping strategies for responses to multiple choice and number types of _Question Designs_.

To create a _Response Mapping Strategy_:

1. Navigate to **Business Admin > Objects > Response Mapping Strategies**.
2. Click **Create**.
3. In the _Create Response Mapping Strategy_ dialog, select **Multiple Choice Question** or **Number Question** to specify the type of question this response defines.
4. Click **Continue**.
5. Enter a **Name**.
6. Define the response depending on the type of question:
  * For _Multiple Choice Questions_, enter the **Answer Text** you want to map. This text must exactly match the _Answer Text_ in the applicable _Available Answer Design_.
  * For _Number Questions_, define the numeric range (0 - 100) of responses to map to by entering values in the **Greater than or equal** and **Less than or equal** fields. You must enter a value for at least one (1) of the fields.
7. Click Save, or to create another _Response Mapping Strategy_ for the same type of question, click **Save + Create**.

### Creating FQ Regulated Category Mapping {#mapping}

_FQ Regulated Category Mappings_ map a specific response [defined in a _Response Mapping Strategy_][6] to a _Regulated Category_ and a _Compliance Assessment Status_. You can also map the response to a specific _Question Design_ in addition to the category and status. When users import questionnaires on completed _FQ Checklists_, Vault populates the _Regulated Category_ and _Compliance Assessment Status_ fields on generated _Qualitative Assessments_ based on these mappings. You must have already created _Response Mapping Strategies_ to be able to create _FQ Regulated Category Mappings_.

To create an _FQ Regulated Category Mapping_:

1. Navigate to **Business Admin > Objects > FQ Regulated Category Mappings**.
2. Click **Create**.
3. Optional: Limit this mapping to a response to a specific question:
  * Select a **Checklist Design** to filter the list of sections and questions you can select.
  * Optional: Select a **Section Design** to filter the list of questions you can select.
  * Select an active **Question Design to** which apply this mapping. Selecting a value for this field automatically populates the _Question Text_ field.
4. Select a **Regulated Category** to define how Vault will populate this value on generated _Qualitative Assessments_ when a questionnaire response is equal to the specified _Response Mapping Strategy_.
5. Select a **Response Mapping Strategy** to identify the response you are mapping.
6. Select a **Compliance Assessment Status** to define how Vault will populate this value on generated _Qualitative Assessments_ when a questionnaire response is equal to the specified _Response Mapping Strategy_. You can select any value included in the _Compliance Assessment Status_ picklist.
7. Enter a **Mapping Priority** to define how Vault handles multiple mapped values to a single multiple choice question and multiple mapped value ranges for a single response to a number question. In these scenarios, Vault only considers the _FQ Regulated Category Mapping_ with the highest priority, with "1" being the highest priority.
8. Click **Save**, or to create another _FQ Regulated Category Mapping_, click **Save + Create**.

## How Vault Imports Questionnaire Data {#import}

The [_Import Questionnaire_ action][12] on the _FQ Checklist_ object allows users to import questionnaire data and convert responses into _Qualitative Assessments_ based on active [_FQ Regulated Category Mappings_][7]. Vault creates new _Qualitative Assessments_ and inactivates or updates matching _Qualitative Assessments_ depending on your Vault's [import behavior for matching records][9]. Vault populates the following fields on generated records:

* **Formulation**: The _Formulation_ of the related _Formulation Questionnaire_.
* **Regulated Category**: Based on _FQ Regulated Category Mappings_.
* **Compliance Assessment Status**: Based on _FQ Regulated Category Mappings_.

After users finish importing a questionnaire, Vault updates the _Imported_ field to "Yes" on the _FQ Checklist_ record so users can easily determine which questionnaires they've already imported.

### Import Behavior for Matching Records {#behavior}

When generating new records based on questionnaire import, Vault does not create duplicate _Qualitative Assessment_ records for a given _Formulation_ and _Regulated Category_. By default, Vault [inactivates][10] any existing matching _Qualitative Assessment_ records and replaces them with new _Qualitative Assessment_ records based on imported response data.

<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 change the import behavior of your Vault to <a href="#update">update</a> matching <em>Qualitative Assessment</em> records based on imported response data rather than inactivating and replacing them. Contact your Veeva Representative for more details.</p>
    </div>
  </div>
</div>



#### Inactivate & Replace Matching Records {#inactivate}

By default, Vault creates new _Qualitative Assessment_ records and replaces any matching _Qualitative Assessments_ based on imported response data. When users finish importing a questionnaire, Vault:

* Creates new _Qualitative Assessments_ for all user-selected responses.
* Inactivates all matching _Qualitative Assessments_ and clears the _Regulated Category (Internal Name)_ field so the records will not appear in the [Formulation Composition Viewer](/en/lr/74427/#map).

<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>: Formulation questionnaire import will fail if you use a lifecycle on the <em>Qualitative Assessment</em> object and your Vault inactivates and replaces matching records based on imported response data.</p>
    </div>
  </div>
</div>



#### Update Matching Records {#update}

If you have enabled the update existing records behavior in your Vault, Vault creates new _Qualitative Assessment_ records and updates any matching _Qualitative Assessments_ based on imported response data. When users finish importing a questionnaire, Vault does the following:

* Creates new _Qualitative Assessments_ for any user-selected responses that do not match active _Qualitative Assessments_.
* Updates the _Compliance Assessment Status_ field on any active matching records based on _FQ Regulated Category Mappings_.
* Deletes any inactive matching records.

## Configuring the Import Questionnaire Action {#action}

You must configure the _Import Questionnaire_ action as a [record action](/en/lr/43127/) on the _FQ Checklist_ object. The action only displays in the **All Actions** menu of an _FQ Checklist_ (formulation questionnaire) when it is in a lifecycle state associated with the _Complete State_ [state type](/en/lr/30683/#state-type).

When users run the _Import Questionnaire_ action on a completed questionnaire, Vault lists all mapped responses on the _Import Questionnaire_ page and displays the _Regulated Categories_ and _Compliance Assessment Statuses_, which are automatically assigned based on your [response mappings][4]. Users can review responses with the assigned category and status, then select which responses to import and convert into _Qualitative Assessments_.

Review the following behavior regarding the process of how Vault displays details on the _Import Questionnaire_ page when users run the _Import Questionnaire_ action:

* _Regulated Category_ and _Compliance Assessment Status_ columns display values based on active response mappings.
* All responses are displayed, including unmapped responses that you cannot convert into _Qualitative Assessments_. Unmapped responses are not assigned _Regulated Category_ or _Compliance Assessment Status_ values.
* If a question has multiple mapped responses, Vault displays only the response with the higher priority.
* If a question has multiple responses, none of which are mapped, Vault displays a single response and does not assign _Regulated Category_ or _Compliance Assessment Status_ values.

## Limitations {#limitations}

Formulation questionnaire import does not support lifecycle enablement on the _Qualitative Assessment_ object.

## Configuring User Permissions {#user-permissions}

You must ensure users have the appropriate read and create [permissions ](/en/lr/22824/)
to access the appropriate objects and object fields in addition to the permissions outlined below:

* For the _Qualitative Assessment_ object: _Create_ permission.
* For the _FQ Checklist_ object: _Read_ permission.
* For the _FQ Regulated Category Mapping_ object: _Read_ permission, including _Read_ permission on the following fields:
  * _Compliance Assessment Status_
  * _Question Design_
  * _Regulated Category_
  * _Section Design_
* For the _FQ Response_ object: _Read_ permission on the _Response Text_ field.
* For the _Question Design_ object: _Read_ permission on the _Question Text_ field.
* _Pages: Import Questionnaire: View_

## Related Permissions
You can complete all steps in this article with the standard _System Administrator_ or _Vault Owner_ security profile. If your Vault uses custom security profiles, your profile must grant the following [permissions](/en/lr/22824/):

<table>
  <tr>
    <th><strong>Type</strong></th>
    <th><strong>Permission</strong></th>
    <th><strong>Controls</strong></th>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Admin: Configuration: Object Lifecycle: Edit</td>
    <td>Ability to modify object lifecycles.</td>
  </tr>
    <tr>
    <td>Security Profile</td>
    <td>Admin: Configuration: Objects: Create, Edit</td>
    <td>Ability to create and modify Vault objects.</td>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Admin: Security: Permission Sets: Edit</td>
    <td>Ability to modify permission sets for users.</td>
  </tr>
</table>

[2]: #overview
[3]: #configure-objects
[4]: #map
[5]: #example
[6]: #strategies
[7]: #mapping
[8]: #import
[9]: #behavior
[10]: #inactivate
[11]: #update
[12]: #action
[13]: #user-permissions
