Vendor information was not found on the invoice. How to assign the correct Vendor using other available information?

Question

In case the Vendor information was not found on the invoice and therefore the Vendor was not extracted and checked against the Data Set, how to assign the correct Vendor using other information from the invoice?

Answer

For such cases, the Rule-based Classifier can be used. Please refer to the following steps describing the process:

  1. The Rule-based Classifier can be developed in FlexiLayout Studio. Please refer to the Online Help for more information on the Rule-based Classifiers.
  2. For the described method to work, the classes in the classifier should be named in the form of cls<VendorID>.
  3. In the rules, describe the logic by which the invoices should be classified (ex., by the Carrier Name, etc.).
  4. After the classifier was created, it should be exported from FlexiLayout Studio.
  5. In FlexiCalpture for Invoices project, create a Classification Batch and load the exported classifier (right-click on a Classification Batch > Properties > Classification > Load). Please note that you don't need to do Class Mapping for this method to work.
  6. Open the Batch Type Properties (or Project Properties for the Default Batch Type) > Recognition tab. Enable the Classify pages option and choose Use script. Click Set.
  7. Add the created Classifier Batch to the list of available classifiers.
  8. Click Edit Script and add the following script.
//Run classification
IBatchTypeClassifierResult result = BatchTypeClassifier.ClassifyPage(Page, true);
//FCTools.ShowMessage("Results are" + result.ClassName, true);
string className = result.ClassName;

//If there is a class, map it to the vendor
if(className.Length > 0)
{
//set the VendorID to the ID from the found class
Page.Document.Properties.Set("fc_Predefined:InvoicePredefinedVendorId", className.Substring(3));
}

What the above method does is:

  1. When the document is imported, it is classified using the created classifier.
  2. If it can be classified there will be a resulted class after the classification.
  3. If there is a resulted class, we assign the predefined parameter fc_Predefined:InvoicePredefinedVendorId the value which should be the Vendor ID.
  4. In the above method, we named the classes cls<VendorID>, so the resulted class name except the first 3 symbols is used.
  5. Since the predefined parameter fc_Predefined:InvoicePredefinedVendorId is not blank, the FlexiCapture will use this information to process the invoice. The rest of the Vendor information will be extracted from Data Set. Correct Field Extraction Training Batch will be used.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.