FlexiCapture for Invoices uses rules to validate invoices automatically. Upon validation, an invoice is assigned a status and a list of issued errors and warnings is generated, enabling the Operator to decide whether the invoice needs to be verified manually. While verifying an invoice in the document editor, the Operator sees the list of errors detected by the rules and can use this list to navigate and review the defective fields.
ABBYY FlexiCapture for Invoices already includes predefined validation rules for invoices commonly used in different countries. For more information, see Available rules. Users can modify or remove existing rules and create new custom rules.
Features specific to rules in FlexiCapture for Invoices
For detailed instructions on working with rules in FlexiCapture, see Rule validation.
Rules in FlexiCapture for Invoices have the following specific features:
Rules may affect the status of a document
To make a rule affect the status of a document, the rule must have a corresponding prefix in its name. Rules with names prefixed with (Exception) or (Rejected) change the status of an invoice to Exception or Rejected if the rule detects errors in that invoice.
Rules may be applied to a certain set of countries
To implement this feature, use conditions for applying rules. For more information, see Rule validation.
Rules detect the country of an invoice based on the country of the business unit to which the invoice has been issued.
If a certain kind of validation is relevant only to particular countries, only the relevant countries should be specified in the rule conditions. Conversely, if invoices from all countries must be validated except one particular country, be sure to exclude that country in the rule conditions (the condition must apply the rule only if the country of the business unit is not the same as the name of the excepted country).
Use the list of rules
View the complete list of rules
To view all the rules set up for the project:
Open the Document Definition properties
From the Document Definition menu, select Document Definition Properties….
Open the Rules tab
In the dialog box that opens, click the Rules tab.
Show all rules
In the Show rules list, select owned by Document Definition and its children.
To view all the rules that are applied to invoices from a particular country (for example, Germany), use the filter.
Set up a filter
Open the filter
In the Document Definition Properties dialog box, click the Rules tab and then click the Filter… button.
Select the country field
In the Filter dialog box, select If this condition is true and then select the Invoice Layout\BU\Country field, which defines the country of the business unit.
Set the condition
Select the Overlaps with set condition from the drop-down list.
Choose the countries
Use the Select… button to specify the required countries in the field below. A Field Value dialog box opens, where you select the countries for which to display the rules. For Germany, for example, select DE.
Apply the filter
Click OK.
The list now displays all the rules that are applied to invoices of the country you specified in the filter.
The condition that triggers a rule is shown in the Apply rule column.
Find a rule in the list
You can use the following filtering criteria to find a rule:
- Rule name
- The name of a field referred to by the rule
- The condition that triggers the rule
Open the filter
In the Document Definition Properties dialog box, click the Rules tab and then click the Filter… button.
Specify the criteria
In the Filter dialog box, you can select the name of the rule you want to find (the names are listed alphabetically), select a field referred to by the rule, or specify the condition that triggers the rule.
For detailed instructions on using the filter, see Rule validation.
Create new rules
To create a new rule:
Open the Document Definition properties
From the Document Definition menu, select Document Definition Properties….
Open the Rules tab
In the dialog box that opens, click the Rules tab.
Show all rules
In the Show rules list, select owned by Document Definition and its children.
Select the field
Select the field where the rule is stored. This may affect the operation of some rules (for example, how its error messages are generated). If you have doubts as to which field to choose, select the topmost node, that is, Invoice Layout.
Add a new rule
Click New Rule….
Choose the rule type
In the dialog box that opens, select one of the standard rule types, or select Script, which allows you to write your own rule.
For detailed information about each rule type and for instructions on how to create them, see Rule validation.
The following steps are specific to creating rules in FlexiCapture for Invoices:
Specify the rule properties
After you select a rule type, specify:
-
Name — The name should reflect the kind of validation the rule performs. Errors issued by the rule are displayed to the Operator in the format Rule name: Error message. To make the rule affect the status of invoices, prefix its name with (Exception) or (Rejected), depending on the status you want assigned to an invoice if the rule detects an error.
-
Severity — Severity flags help the Operator review the errors and warnings and decide which invoices to verify manually. Data export can also depend on the severity flag. For example, you can:
- Export documents that have no rule errors but have rule warnings to your working database.
- Export documents that have rule errors to an exceptions folder.
- Prohibit the export of documents with errors altogether.
For more information about setting up export based on the severity of a rule, see Rule validation.
-
Rule is enabled — Whether the rule is enabled after it is created.
Specify the condition for applying the rule
Typically, this condition is defined by the value of the Invoice Layout\BU\Country field. By default, the rule is always applied (Apply rule = always). To apply the rule only under certain conditions:
- From the Apply rule list, select on condition.
- Click Edit… to modify the condition.
- Select the field whose value triggers the rule (Invoice Layout\BU\Country).
- Specify the condition and, if applicable, allowed and prohibited values.
Example 1. The rule must be applied to German invoices. Select the Belongs to set condition, click Add, and add the value DE.Example 2. The rule must be applied to all invoices except German and French invoices. Select the Does not belong to set condition, click Add, and add the values DE and FR.
Disable or delete a rule
To disable a previously set up rule:
Clear the Enabled option
Clear the box in the Enabled column next to the rule. Alternatively, double-click the rule to open its Properties dialog box and clear the Enabled rule option on the General tab.
If you are certain that you no longer need a rule, you can delete it. To delete a rule:
Delete it
Select the rule by clicking its name in the list and click Delete.