# Configuring Formulation Questionnaire Attachment Import (Compliance Management)

<a href="/en/gr/71434/">Compliance Management</a> provides users with the ability to <a href="/en/gr/76963/#import-attachments">import documents attached to formulation questionnaires</a> directly to your Vault Library. You can map each question to a document type and specify up to ten (10) document fields for users to populate when importing the selected attachments.

## Configuration Overview {#overview}

Configuring your Vault to import formulation questionnaire attachments involves the following steps:

1. [Configure formulation questionnaires][6]
2. [Map questions to document types][1]
3. [Configure document fields][2]
4. [Configure the _Import Attachment_ action][4]
5. [Configure user permissions][5]

<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>



## Configure Formulation Questionnaires {#formulation-questionnaires}

You must <a href="/en/gr/76971/">configure formulation questionnaires</a> before you can configure questionnaire attachment import.

 <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>: Do not create <a href="/en/gr/76967/#configure-design"><em>Checklist Designs</em></a> that allow more than 40 attachments.</p>
    </div>
  </div>
</div>



## Mapping Questions to Document Types {#mapping}

When users import attachments from a formulation questionnaire, you can define which <a href="/en/gr/618/">document types</a> Vault applies for each applicable _Question Design_, which users can modify before importing each attachment. To do this:

1. Navigate to **Business Admin > Objects > FQ Question Doc Type Mappings**.
2. Click **Create**.
3. Select a **Checklist Design**.
4. Select a **Section Design**.
5. Select a **Question Design** for a question that allows attachments.
6. Select a **Document Type** that Vault will automatically apply to all attachments imported for the selected question.
7. Click **Save**.

Create an _FQ Question Doc Type Mapping_ for each _Question Design_ that allows attachments for which you want to automatically classify when users import them. For any unmapped _Question Designs_, Vault suggests those attachments as _Unclassified_ type, which users can modify before importing.

## Configuring Document Fields {#doc-fields}

You can specify <a href="/en/gr/592/">document fields</a> users must define for all attachments they import from formulation questionnaires. Users must populate any required document fields when importing. 

To add document fields:

1. Navigate to **Admin > Configuration > Pages > FQ Import Attachments**.
2. In the _Layouts_ section, click **Import Attachments**.
3. Click **Edit**.
4. For **Document Fields**, select up to ten (10) active [supported fields][3]. Include all required document fields for all [mapped document types][1].
5. If you selected a _Document Field_ that references the _Formulation_ object, select that field for **Formulation Document Field**.
6. Click **Save**.

If users attempt to import an attachment for a mapped document type with a required field you did not include as a _Document Field_, the attachment displays an information (<i class="far fa-info-circle" style="color: #c9c9c9;"></i>) icon in the _Review and confirm [NN] attachments_ dialog and they may not be able to populate all field values before proceeding with the import.

### Supported Document Field Types {#supported-fields}

Vault supports mapping the following document field types for _Document Fields_:

* Date
* Number
* Object
* Picklist
* Text

## Configuring the Import Attachments Action {#action}

You can configure the _Import Attachments_ <a href="/en/gr/59885/">user action</a> on the lifecycle states of the _FQ Checklist_ object linked to the <a href="/en/gr/29798/#state-types">_Completed State_</a>. This action will not appear to users for _FQ Checklists_ in any lifecycle state type that is not in a _Completed State_.

## Configuring User Permissions {#user-permissions}

You must ensure users have the appropriate read and create <a href="/en/gr/22824/">permissions</a> to access the appropriate objects and object fields in addition to the permissions outlined below:

* _Create Document Permission_ on the applicable document types.
* For the _Document Type Detail_ object: _Read_ permission.

## Related Permissions {#permissions}

You can complete all the 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 <a href="/en/gr/22824/">permissions</a>:

<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: Security: Permission Sets: Edit</td>
    <td>Ability to modify permission sets for users.</td>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Application: API: Metadata API</td>
    <td>Ability to access the <em>FQ Import Attachments</em> page.</td>
  </tr>
</table>

[1]: #mapping
[2]: #doc-fields
[3]: #supported-fields
[4]: #action
[5]: #user-permissions
[6]: #formulation-questionnaires