After configuring the required COA matching rules, you must create COA matching rule variants to define various alternate terms for each matching rule to improve the accuracy of field value ingestion.
Note: This feature is currently available only to Early Adopters. Contact your Veeva Representative for more details.
About Matching Rule Variants
Matching rule variants for Header Key and Table Column matching rule types have configurable options to ensure the header and table data is ingested accurately. Vault maps matching rule variants using the Supplier Name, Supplier Manufacturing Site Name, and Material fields to filter and apply against the ingested data. At least one (1) or more of these fields should contain a value for defining matching rule variants specific to each supplier, supplier manufacturer, or material so that Vault can match more accurately to the appropriate data location on the COA file provided using Variant Types.
When a user runs the Analyze COA action, depending on whether the Inspection record’s fields (Supplier Name, Supplier Manufacturing Site Name, and Material) have a value or not, Vault matches the variants based on the specified Variant Type. For example, if the Supplier Name field is specified but the Supplier Manufacturing Site Name and Material fields are empty, Vault matches using matching rule variants that have the same Supplier Name value and empty Supplier Manufacturing Site Name and Material. If no matching rule variant is defined, Vault matches to global variants, which have empty Supplier Name, Supplier Manufacturing Site Name, and Material fields.
Matching Rule Variant Types
The following are the types of matching rule variants you can use to define the logic to use to interpret data:
- Complex: Used to load coordinates by mapping to a location where a value may be found in particular COA files. You can use this type for variants located in consistent areas for the supported fields. You must provide the coordinates in JSON format. If your Vault supports multi-batch COA files, the Complex variant type will not be available.
- Exact Match: Used to map an exact value in a COA file to a field and that Exact Match values are not case-sensitive.
- Contains: Used to map to a defined matching rule variant that comprises specific values.
- Starts With: Used to map to a defined matching rule variant that begins with specific values.
- Ends With: Used to map to a defined matching rule variant that concludes with specific values.
- Regex: A regular expression, used to map a pattern of possible matches in a COA file to a field.
Vault may use global matching rule variants as generic variants for all Inspection records if there aren’t specific matching rule variants to better map to a variant text. For example, you can create a COA Matching Rule Variant record with the “Units” Variant Text value for the “UoM” COA Matching Field key with blank fields for Supplier Name, Supplier Manufacturing Site Name, and Material fields. This record applies to all Inspection records unless a matching rule variant with existing values for the Supplier Name, Supplier Manufacturing Site Name, or Material fields is available for a comprehensive match.
Header Key Matching Rule Priorities
When a COA matching rule of type Header Key has matching rule variants, Vault matches rule variants by most specific first. For rules with the same scope, Vault matches rule variants in the following priority:
- Complex
- Matching Strategy:
- Regex
- Exact Match
- Starts With
- Contains
- Ends With
- Vicinity Strategy (find value to the right or below the key):
- Exact Match
Example COA Matching Rule Variant Usages
You can create COA matching rule variants to define and ensure the best possible COA file analysis accuracy with the following usages:
- You might create a Header Key matching rule with a Complex matching rule variant to specify coordinates for the value of the key field “Best Before Date”, so that you can map to the field in Vault called “Supplier Expire Date”. The value of the key field is “12/13/2020”; you can locate the Complex Matching Rule coordinates from the applicable CSV file for configuration in JSON format:
{ "ocr_left": 0.0533, "ocr_top": 0.4812}
. - You might create a Header Key matching rule with a Regex matching rule variant to cover the possible permutations of the term “lot code”, which may appear in a COA file so that you can map to the field in Vault called “Supplier Manufacturer Lot Code”.
- You might create a Header Key matching rule with a Contains matching rule variant to match a specific keyword of “supp”, which may appear in the header section of a COA file intended as the word “Supplier”, so that you can map to the field in Vault called “Supplier Name”.
- You might create a Table Column matching rule with an Exact Match matching rule variant to match the table column in the COA file called “UNITS” to the field called “UoM”.
- You might create a Table Column matching rule with a Starts With matching rule variant to match the table column in the COA file beginning with “Char” to the field called “Characteristic”.
Configuring COA Matching Rule Variants
To configure COA matching rule variants:
- Navigate to the appropriate COA Matching Rule.
- In the COA Matching Rule Variants section, click Create.
- Enter the Variant Text. This is the text which, depending on the Variant Type value, is either matched exactly, mapped to a JSON coordinate, or checked for variant matches.
- Select a Variant Type.
- Optional: Select a Supplier Manufacturing Site Name.
- Optional: Select a Supplier Name.
- Optional: Select a Material.
- Optional: Enter the Expected Value Format. The value must follow the SimpleDateFormat as outlined by Oracle for Date data type or by using Regex for Text data type.
- Optional: Select a Language.
- Click Save. To create another matching rule variant, click Save + Create.
Complex COA matching rule variants cannot be saved successfully if both Supplier Manufacturing Site Name and Supplier Name fields do not have values. If the Language field does not have a value set, the default value is set to English and COA file content is matched only to English (default) variants.
Downloading COA OCR Data Files
When you need to find the JSON coordinates for Complex matching rules, you can run the Download COA OCR Data action to export the CSV file. The Download COA OCR Data action is only available for selection when the COA Inspection record has been analyzed within the last 30 days - you will need to re-run the Analyze COA action again if more than 30 days have elapsed. You first need to configure the user action to run Download COA OCR Data.
To download an OCR data file for COA inspection:
- Navigate to the appropriate COA Inspection.
- Select Download COA OCR Data from the All Actions menu. Once complete, a Vault notification will provide a link to download the CSV file.
Once you have downloaded the CSV file, locate the Complex Matching Rule coordinates for the OCR Text required for configuring Complex matching rule variants. For example, if you require the value for “Best Before Date”, which is “12/13/2020”, locate the Complex Matching Rule coordinates for the “12/13/2020” OCR Text to use for configuration. Here is an example of how your CSV file may display:
OCR Text | Complex Matching Rule |
---|---|
… | … |
Best Before Date | { "ocr_left": 0.0526, "ocr_top": 0.3512} |
12/13/2020 | { "ocr_left": 0.0533, "ocr_top": 0.4812} |
… | … |