Event Handlers - Before matching


I’ll briefly describe my whole situation. I have 13 types of different documents, I’m working on an export project. There are important documents like Invoice, CMR, Packing list... a huge part of the documents are unique. 30 companies and this is only for 2 products out of 10, the number of unique companies will increase and The batch recognition process will take even longer.I'm looking for ways to speed up the document recognition process.I will be glad to hear your suggestions on how to increase speed.

One of the solutions I came to is how to speed up document recognition, this is Event Handlers -> Before matching

    string documentDefinition = Document.Properties.Get("Invoice");
    Matching.DefinitionsList = documentDefinition;
    Matching.ForceMatch = true;
At the moment, any of the documents are recognized as an invoice, but I need a condition such that in the process of the servers, when they see the first recognition, they will immediately end there and will not look further for a match

I hope I explained everything correctly that I want the result to be the first recognizable document and not even look at the rest. I think that I should add a condition to the workflow, for example
if ( condition =="invoice") { Document.Properties.Set("Invoice", "Invoice") } 
if ( condition =="CMR") { Document.Properties.Set("CMR", "CMR") }

I need your help
Regards Lado

Was this article helpful?

0 out of 0 found this helpful


1 comment

  • Avatar
    Anton Vakhtel

    Hi Lado,

    FlexiCapture 12 knows the Document Definition only after the matching, so if you'd want to force the Document Definition in Before matching Event Handler, you need to use different conditions, like the file name, or email sender (if you use the import from the mailbox).

    You should also check that the Use first acceptable FlexiLayout option is turned on in the project's Document Definitions list.

    Best regards,



Please sign in to leave a comment.