**Source URL:** https://qualityone.veevavault.help/en/lr/69952/index.md

# Configuring CoA Inspections (QMS)

[QualityOne Vaults](/en/lr/78610/) provide users the ability to analyze single or multi-batch CoA (Certificate of Analysis) files. Review the information in [Setting Up Inspections](/en/lr/63414/) and ensure you have [set up the prerequisite records](/en/lr/63414/#setting-up) before completing this configuration. You must complete the configuration steps in this article for your Vault to use the automated inspection of CoA records.

<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 currently available only to Early Adopters. Contact your Veeva Representative for more details.</p>
    </div>
  </div>
</div>



## About Multilingual Support {#multilingual}

QualityOne provides multilingual support for _COA Inspection_ data records. This support helps to display data records localized to a user's Vault language. Vault displays localized data records by searching for records that match the original data value and the language value is equal to the user's Vault language.

Example Scenario:
* The _Characteristic_ (original) data value is "Moisture".
* The user's Vault language is set to "French".
* When the user opens the _Inspection Sample Test Result_ record to view the _Characteristic_ value, Vault displays a _Localized Characteristic_ value "Humidité" (Admin-created localized data record).

In this scenario, the existing localized data record for _Characteristic_ specified Vault to display "Humidité" when the data value equals "Moisture" and the user's language equals "French". If there is no localized data record set up for the _Characteristic_ "Moisture" in "French", Vault continues to display "Moisture" as a _Characteristic_ for the French user with an empty _Localized Characteristic_ field.

### CoA File Language Support {#language-support}

Currently, AWS Textract supports only English, Spanish, Italian, Portuguese, French, and German uploaded CoA files. Any language uploaded that is unsupported by Textract may return "blank" or "invalid" records to Vault when running the _Analyze COA_ action. When Textract returns "valid" records, Vault can detect [Vault-supported languages](/en/lr/16678/) from these CoA file records and store the detected language. The detected language is used to filter [matching rule variants](/en/lr/76179/) and [component matching variants](/en/lr/76952/).

<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>: Localized data records are not affected by Textract not supporting the user’s Vault language. Any files that contain more than one (1) supported language may return ‘invalid’ records to Vault.</p>
    </div>
  </div>
</div>



## About Multi-Batch File Support {#multi-batch}

QualityOne also supports CoA files that contain multiple related batches within a single CoA file. Users can upload or email to Vault to create a _COA Inspection_ record for each related batch and analyze the extracted information from each portion verified in the file. Typically when a user triggers the _Analyze COA_ action for a multi-batch CoA file on a _COA Inspection_ record, Vault does the following:

* Verifies the number of batches found in the file. The first batch detected is set to the _COA Inspection_ record where the action is triggered; Vault marks this initial record as the _Main Batch_ record.
* Creates the related _COA Inspection_ batch records for each verified batch found after the first.
* Links each related batch record to the _Main Batch_ record where the action was triggered.
* Analyzes each batch record according to the portion extracted from the multi-batch CoA file and creates the _Inspection Sample_ for each batch record (main and related).
  * If users trigger the _Analyze COA_ action again, Vault deletes all existing related _Inspection Sample_ records and re-creates new _Inspection Sample_ records according to any new changes.
* Changes the lifecycle state for the _Main Batch_ record to _COA Uploaded_ and sets all related batch records to the same lifecycle state.

Users cannot trigger the _Analyze COA_ action on a related batch record. If users attempt to trigger this action on the related batch record, Vault prompts them to navigate to the _Main Batch_ record to trigger the action from the appropriate record.

When analyzing the file, Vault uses the [_Header Key_](/en/lr/627672/) to identify each batch in a file and map the extracted information according to the portion found to the appropriate batch record. That extracted information populates the _Main Batch_ record and each related _COA Inspection_ batch record similarly to when Vault ingests and analyzes a single CoA file. If the _Header Key_ is unidentifiable, Vault identifies the repetition of a _Characteristic_ or the unique _Supplier Manufacturing Lot Codes_ used in the document to verify the number of batches.

## Configuration Overview {#overview}

Configuring your Vault to use _COA Inspection_ involves the following steps:

1. [Provide AWS credentials to allow users to use CoA][1]
2. [Set up localized data records to allow multilingual support][2]
3. [Set up email intake for CoA file uploads][11]
4. [Define variant records for ingestion accuracy][8]
5. [Configure all CoA object layouts][5]
6. [Configure CoA object actions][15]
7. [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>



## Providing Credentials {#credentials}

In order for users to be able to use the automated inspection of CoA feature, you must provide AWS credentials in your Vault.

To provide credentials:

1. Navigate to **Admin > Settings > Application Settings**.
2. Click **Edit**.
3. In the **Inspections Management** section, enter your **COA AWS Account Id**.
4. 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>: The value for <em>AWS Veeva External Id</em> is a UUID provided by Veeva. Contact your Veeva Representative for more details.</p>
    </div>
  </div>
</div>



## Setting Up Localized Data Records {#setup-records}

To display localized data records to provide [multilingual support][3], you need to:

* [Set up localized data records](/en/lr/63414/#defining-referenced-items) linking to the original data records and the language of the translation.
* Update the _Inspection Plan Requirement_ object layout with the [_Localized Fields_][5].

After you have completed the initial setup and update, users can view the original record and its matching localized data record. You can also use the localized data record to [match ingested test result variants](/en/lr/76179/) against inspection sample test results.

## Setting Up Automated CoA Email Intake {#about-email-intake}

To allow users, _External Collaborators_, and external parties to submit CoA documents by emailing to Vault, you must set up the Automated CoA Email Intake feature. See [Setting Up Automated CoA Email Intake](/en/lr/583672/) for more details.

## Defining Variant Records for Accurate File Ingestion {#define-variants}

When users upload a CoA file for an _Inspection_ manually or through [email intake](/en/lr/515322/#email-intake), Vault [ingests](/en/lr/515322/#about-ingestion) data from the CoA file. To support this process, you can configure different types of records to instruct Vault to search for relevant data in a file. Since different organizations may use different terminology to describe the same fields and values in their files, Vault may not recognize some words when scanning the CoA file. To increase the accuracy of data ingestion, you can define alternate terminology by creating CoA variant records either manually or through the _COA Ingestion Setup_ panel.

### Manual Record Creation {#manual-variant-creation}

If creating records manually, use the following guidelines:

* Define _COA Matching Rule_ records to guide Vault to the matching extracted analysis results for _Inspection Sample Test Results_. See [Defining CoA Matching Rules](/en/lr/627672/) for more details.
    * After defining the required _COA Matching Rule_ records, create CoA matching rule variants to define various alternate terms for each matching rule to improve the accuracy of field value ingestion. See [Configuring CoA Matching Rule Variants](/en/lr/76179/) for more details.
* After [defining the global _Characteristics_ and _Units_](/en/lr/63414/#define-ref-items), create CoA characteristic and unit matching variants to define various alternate terms and units of measurement to improve the accuracy of field value ingestion. See [Configuring CoA Component Matching Variants](/en/lr/76952/) for more details.
* After [defining _Organizations_](/en/lr/63414/#define-ref-items) and their respective manufacturing site _Addresses_, create _Organization Matching Variants_ to improve the accuracy of field value ingestion. See [Configuring CoA Component Matching Variants](/en/lr/76952/) for more details.
* After [defining the global _Characteristics_ and _Materials_](/en/lr/63414/#define-ref-items), create CoA attribute and verdict variants to define various alternate terms to improve the accuracy of field value ingestion. See [Configuring CoA Attribute Test Result Variants](/en/lr/553553/) for more details.
* Create _Comparison Variant_ records to enable Vault to ingest comparison phrases such as "larger than" and "less than or equal to" in CoA files. See [Configuring CoA Comparison Variants](/en/lr/857905/) for more details.

### CoA Ingestion Setup Panel Record Creation {#panel-variant-creation}

You can use the _COA Ingestion Setup_ panel to complete variant record setup on a single page. To use the panel, you must first complete the following steps:

* [Configure CoA Inspections][14] in your Vault and set up [key Inspections data](/en/lr/63414/#define-ref-items).
* Create _COA Matching Rules_, _Characteristics_, and _Units_. These records store the values for which you can create variants in the panel.
* Create an _Inspection_ with an associated _Inspection Plan_ that has _Inspection Plan Requirements_. If no _Inspection Plan Requirements_ exist for _Characteristics_ and _Units_, Vault does not display data from these records in the panel.

You can use the panel to create _COA Matching Rule Variants_, _Component Matching Variants_, and _Attribute Test Result Variants_ for your defined terms. See [Using the CoA Ingestion Setup Panel](/en/lr/824752/) for more details.

## Configuring CoA Inspections Object Layouts {#coa-page-layouts}

We recommend updating [object layouts](/en/lr/26387/) for the following objects. Ensure fields are activated on all relevant object types.

* For the _COA Inspection_ object type of the _Inspection_ (`inspection__v`) object:
  * **Detail Form Section**: Include the _External Collaborator_, _COA File Uploader_, _COA Ingestion Status_, _COA Ingestion Error Type_, _COA Ingestion Source_, _COA Ingestion Status Last Modified_, _Supplier Site Fields Matched_, _Supplier Manufacturing Site Address_, and _Source Inspection_ fields for the _COA Inspection_ (`coa_inspection__v`) object type. You can modify the _Label_ and optionally provide _Help_ content for users. Without the _COA File Uploader_ field, users cannot upload CoA files for analysis. The _External Collaborator_ field allows users to assign an [external user for collaboration](/en/lr/76844/), such as uploading and analyzing a CoA file via email.
* For the _Inspection Sample_ (`inspection_sample__v`) object:
  * **Detail Form Section**: Include the _Pass / Fail?_ and _Pass / Fail Icon_ fields.
  * **Related Object Section**: Insert the _Inspection Sample Test Result_ (`inspection_sample_test_result__v`) object and include the _Analysis Source_, _In Spec?_, _Test Method_, _Test Result Units_, _Test Result (Variable Data)_, _Test Result Variable Data Symbol_, _Test Result (Attribute Data)_, _Characteristic_, _CTQ?_, _LSL_, _Spec Unit_, _USL_, and _In Spec Icon?_ field columns.
* For the _Inspection Sample Test Result_ (`inspection_sample_test_result__v`) object:
  * **Detail Form Section**: Include the _Target Value (Attribute Data)_ and _Observed Attribute Result_ fields.
* For the _Inspection Plan Requirement_ (`inspection_plan_requirement__v`) object:
  * **Detail Form Section**: Include the _Target Value (Attribute Data)_ field and two (2) _Localized Field_ control fields with the slider (<img class="inline" src="https://platform.veevavault.help/assets/images/CPC-Icon-Slider.png" alt="Slider Icon" style="" />) icon for the _Characteristic_ and _Unit_ objects.
* For the _COA Matching Rule_ (`coa_matching_rule__v`) object:
  * **Related Object Section**: Insert the _Component Matching Variant_ (`component_matching_variant__v`) object and include the _Variant Text_, _Variant Type_, _Expected Value Format_, _Supplier Name_, _Supplier Manufacturing Site Name_, _Material_, and _Language_ field columns.
* For the _COA Matching Rule Variant_ (`coa_matching_rule_variant__v`) object:
  * **Detail Form Section**: Include the _Variant Text_, _Variant Type_, _COA Matching Rule_, _Expected Value Format_, _Supplier Name_, _Supplier Manufacturing Site Name_, _Material_, and _Language_ fields.
* For the _Component Matching Variant_ (`component_matching_variant__v`) object:
  * **Detail Form Section**: Include the _Status_, _Component Matching Variant Type_, _Characteristic_, _Unit_, _Organization_, _Variant Text_, _Material_, _Supplier Name_, and _Supplier Manufacturing Site Name_ fields.
* For the _COA Header OCR Data_ (`coa_header_ocr_data__v`) object:
  * **Detail Form Section**: Include the _Supplemental Field 1_, _Supplemental Field 1 Score_, _Supplemental Field 2_, _Supplemental Field 2 Score_, _Supplemental Field 3_, and _Supplemental Field 3 Score_ fields.
  * **Related Object Section**: Insert the _COA Table Column OCR Data_ (`coa_table_column_ocr_data__v`) object.
* For the _COA Test Results OCR Data_ (`coa_test_results_ocr_data__v`) object:
  * **Detail Form Section**: Include the _Characteristic_, _Characteristic Score_, _COA Header OCR Data_, _Test Method_, _Test Method Score_, _Test Result_, _Test Result Score_, _UoM_, _UoM Score_, _Specification_, _Specification Score_, _Min_, _Min Score_, _Max_, and _Max Score_ fields.
* For the _Characteristic_ (`characteristic__v`) object:
  * **Detail Form Section**: Include the _Characteristic_, _Status_, _Description_, and _Type_ fields.
  * **Related Object Section**: Insert the _Component Matching Variant_ (`component_matching_variant__v`) object and include the _Variant Text_, _Material_, _Supplier Name_, and _Supplier Manufacturing Site Name_ field columns.
* For the _Unit_ (`unit_of_measure__v`) object:
  * **Detail Form Section**: Include the _UoM_, _Status_, _Type of Measurement_, _Unit Description_, and _Conversion Factor to Base Unit_ fields.
  * **Related Object Section**: Insert the _Component Matching Variant_ (`component_matching_variant__v`) object and include the _Variant Text_, _Material_, _Supplier Name_, and _Supplier Manufacturing Site Name_ field columns.
* For the _Organization_ (`qms_organization__qdm`) object:
    * **Detail Form Section**: Include the _Organization Address_ field.
    * **Related Object Section**: Insert the _Component Matching Variant_ (`component_matching_variant__v`) object and include the _Variant Text_, _Language_, _Supplier Name_, and _Supplier Manufacturing Site Name_ field columns.
* For the _Material_ (`material__v`) object:
  * Insert the [_Control Chart_](/en/lr/627670/) control section with the slider (<img class="inline" src="https://platform.veevavault.help/assets/images/CPC-Icon-Slider.png" alt="Slider Icon" style="" />) icon.

## Configuring CoA Object Actions {#config-coa-actions}

The _Inspection_ object lifecycle contains the following actions:

* **Analyze COA**: Triggers Vault to perform an OCR scan of the uploaded CoA file and then compare the measurement values on the CoA file with the specified _Inspection Plan_ limits. If triggered on a _Main Batch_ record, all related _COA Inspection_ batch records and their related data records will be re-created (all previous related records will be deleted during this process). You can specify which users can execute the _Analyze COA_ action by configuring [Atomic Security](/en/lr/47850/) for the _Execute_ permission in object lifecycle states that contain the action. Vault creates [job logs](/en/lr/24762/) whenever this action is triggered and updates the following fields:
  * Sets the _Processed Straight Through?_ field to "Yes" on the _COA Inspection_ record. The _Processed Straight Through?_ field updates to "No" when you modify a related _Inspection Sample Test Result_ record or create a new _Inspection Sample Test Result_ record for the inspection.
  * Updates the _Pass/Fail?_ field value based on the _Inspection Sample_ analysis result.
* **Analyze Inspection**: Triggers Vault to perform an evaluation using the _Pass/Fail?_ field value against the observed inspection samples to pass or fail the inspection, based on the specified _Inspection Plan_ criteria. Any _Inspection Sample_ with the _Exclude from Analysis_ field values of "No" or blank values are included in the evaluation.
* **Download COA OCR Data**: Triggers Vault to export OCR data that contains JSON coordinates for _Complex_ matching rules. This action is typically run by Admins only. If your Vault supports [multi-batch CoA files][12], this action is available for _Main Batch_ records only.
* **Delete Inspection**: Triggers Vault to delete the _Inspection_ record and all related child records.
* **Send CoA Upload Workflow Task Email**: Triggers Vault to send the _COA Submission_ notification to the assigned _External Collaborator_ on the _COA Inspection_ record to upload a CoA file for the inspection record.
* **Sync Related Records**: Triggers Vault to copy specific modified field values in the existing _Inspection_ record and update their related fields in the related _Inspection Sample Test Result_ records to display the new modified values.
* **Set COA Analysis Results**: Triggers Vault to create or update the _COA Analysis Results_ record with statistical information from an [analyzed _COA Inspection_ record](/en/lr/515322/#how_to_analyze_a_coa). This action typically runs when the _COA Inspection_ record enters a completed lifecycle state.

Depending on your business needs, you can:

* Add these actions as [user actions](/en/lr/59885/#user-actions) on any _Inspection_ lifecycle state:
  * _Analyze COA_
  * _Analyze Inspection_
  * _Download COA OCR Data_
  * _Delete Inspection_
  * _Send CoA Upload Workflow Task Email_
  * _Sync Related Records_
* Add these actions as [entry actions](/en/lr/59885/#entry-actions) on any _Inspection_ lifecycle state:
  * _Analyze COA_
  * _Analyze Inspection_
  * _Send CoA Upload Workflow Task Email_
  * _Set COA Analysis Results_

## Configuring User Permissions {#user-perm}

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:

* You must ensure users have the appropriate permissions to access the required objects, object types, and object fields, as well as be assigned to the appropriate [role](/en/lr/2572/#perms) for _COA Documents_ to be able to analyze CoA files.
* To use the Automated CoA Email Intake feature, ensure that you define the _User Groups_ for the _User Group for COA Email Intake Notification_ field by navigating to **Admin > Settings > Application Settings > Inspections Management**. Adding the appropriate user groups allows the defined groups to receive any Vault notification when Vault fails to ingest any CoA attachments.

## 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 [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 Lifecycles: Create, Edit</td>
    <td>Ability to create and modify object lifecycles.</td>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Admin: Configuration: Object Workflows: Create, Edit</td>
    <td>Ability to create and modify object workflows.</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: Settings: Application: Edit</td>
    <td>Ability to modify the <em>Settings > Application Settings</em> page.</td>
  </tr>
</table>

[1]: #credentials
[2]: #setup-records
[3]: #multilingual
[4]: #config-coa-mr-var
[5]: #coa-page-layouts
[6]: #config-atrv
[7]: #mr-type
[8]: #define-variants
[9]: #comp-match-var
[10]: #notification
[11]: #about-email-intake
[12]: #multi-batch
[13]: #user-perm
[14]: #overview
[15]: #config-coa-actions