- If vendor and business unit databases are used, ABBYY FlexiCapture can more reliably detect companies by looking for additional company information on invoice images. It can also confirm that a detected vendor is a “known” vendor. Additionally, if a vendor database is used, you can train fields.
- If no vendor or business unit databases are used, ABBYY FlexiCapture uses neural networks to look for vendor and business unit names and addresses on invoice images. For more information, see Detecting the main fields. You also cannot train fields, because ABBYY FlexiCapture cannot reliably identify vendors without a vendor database.
- If you have no vendor databases but still want to use field training, you can accumulate company information by adding records to your data sets while capturing invoices. For more information, see Looking up vendors and business units in the database.
Connect a vendor or business unit database
Vendor and business unit databases are connected in the same way:1
Open the Document Definitions dialog box
Open the Project menu and click Document Definitions….
2
Edit the Document Definition
Click the Edit… button in the dialog box that opens.
3
Open the Document Definition properties
Open the Document Definition menu and click Document Definition Properties….
4
Open the Data Sets tab
Open the Data Sets tab in the dialog box that opens.
5
Open the data set
Double-click the BusinessUnits (or Vendors) row, or click the Set Up… button. The Data Set dialog box opens.A data set is essentially a table of data with a fixed set of columns and types that you cannot change. You match each data set column with a column from an external database. If a database does not contain a table with the necessary data, create a view with this data and specify the view as the table.
6
Select the source
Select Database from the Source drop-down list.
Select the Script source type only if you plan to use a script to update the data set. For more information, see Updating data sets.
7
Specify the connection string
Specify the database connection string. You can select one of the existing environment variables from the project or define a new string by clicking the Specify… button. Using an environment variable from the project lets you move the project and connect to databases with the same structure without editing the Document Definition.
8
Select the schema and table
Select the Data schema and Database table.
9
Match the columns
Match the columns from the data set with their corresponding columns in the external database. For each data set column, you can specify the corresponding external database column or a value.The Match fields list contains:
- The names of columns in the data set.
- The corresponding columns from the external database.
- The Found column, which contains a checkmark when a match between the data set field and a database column has been established.
- The Normalization column, which shows the type of normalization used for the value.
10
Add custom columns (optional)
Use the Add… button to add custom columns to a data set and specify corresponding columns in an external database.
Use the Edit… and Delete buttons to manage complex columns. Predefined columns (indicated by the lock icon) cannot be deleted.
11
Set an update period
Specify a database update period in the data set if automatic updates are required.
12
Enable script validation (optional)
To validate records using a script, enable the Check records using scripts option. For more information, see Data set validation scripts.
13
Save your changes
Save your changes.
Map a data set column to a database column
For each column, select it in the Match fields list, click the Edit… button, and configure the mapping in the Data Set Column Mapping dialog box:1
Select the database column
Select the matching database column from the Database columns list.Invoices from the same vendor can contain different company names and addresses. When several values correspond to the same vendor (the same VATID), place them in different columns of the external database table or view, such as Name1, Name2, Address1, …, AddressN. You can then select Several columns… from the list and specify any number of database columns as matches for the data set column.To create more than one column, specify the number of permitted columns for a field in the Max variant count box. Operators can add values to these columns later.If your database has no matching column for a data set column, refer to the Vendors data set and BusinessUnits data set sections.
The external database may contain only one value for the company name or street, but these fields can have several common variants on invoices. To achieve the best detection quality, the text in these fields on an invoice should be as close as possible to the corresponding text in the data set. For more information, see Multiple-value columns in a data set.
If you specify a number that is less than the actual number of columns, it is increased automatically when the data set is updated. If you specify a number greater than the actual number of columns, empty columns are added.
2
Select the normalization type
Select an entry from the Normalization list that best fits the type of data in the column. For more information, see Normalization of values in data sets. If necessary, enable the Store normalized value option.
3
Set the Cannot be empty option
Enable the Cannot be empty option if necessary.
When enabled, the Cannot be empty option tells the program that a column has to contain values. If it turns out to contain no values, the record is marked as invalid.
If your Document Definition contains a Vendors data set that uses an external database as its source, and the value of the Vendor field depends on the value of the Business Unit field, Cannot be empty is enabled for the BusinessUnitId column by default. If the Vendors data set uses another source, enable this option manually.
4
Save the mapping
Save the changes in the Data Set Column Mapping dialog box.
The Data Sets tab
All data sets are listed on the Data Sets tab. This list includes some additional information:- The name of the data set in the Name column.
- The type of the selected source in the Source column.
- The total number of records in the Record count column.
- The status of the data set (whether it is enabled) in the Connected column.
The total number of records is displayed only if the Cache data option is enabled in the data set’s properties.
- Set Up… opens the properties dialog box of the selected data set.
- Update updates the selected data set.
- Check… checks the data set (data is displayed in a separate window).
- Add… creates a new data set.
- Rename… renames the selected data set.
- Delete deletes the selected data set.
- View… opens a dialog box that lets you view and edit data from the selected data set.
- Clean Up deletes all records in the data set.
View and edit data set records
To view or edit a data set, select it on the Data Sets tab of the Document Definition properties dialog box and click the View… button. All records belong to one of three record groups. You can select the record group you want to view from the Record group drop-down list.- General contains only valid records.
- Deleted contains records that were deleted by a user. These records are not used during recognition and are not displayed as results for a database search. If the data set is updated, these records are not restored.
- Invalid contains invalid records.
* Adding and editing records is only possible if the Primary key option is enabled. Records in the PurchaseOrders and PurchaseOrderItems default data sets cannot be added or edited.
When adding or editing records, the number of values you can specify for a field cannot exceed the Max variant count set for that field in the Data Set Column Mapping dialog box. You can use the
and
buttons in the Add Record and Edit Record dialog boxes to manage records.
To apply sorting and filtering to newly added or edited records, set the filter again.
Database Check rules
The Invoice Document Definition contains rules that are used to check data in the Vendor and Business Unit groups of fields against the database. These are standard rules of the Database Check type, named (Rejected) Vendor should be found in the database and (Rejected) Business Unit should be found in the database. To learn how to find rules in the list, see Rules. You can view the properties of these rules to find out how each field in the Vendor and Business Unit groups is checked:- Which fields must exactly match records in the data set (and, by extension, in the database).
- Which fields do not have to match perfectly.
- Which fields are simply copied from the database.
