Set up multi-document IE Manual Task
Multi-document Manual Task enables automation for the cases when multiple documents represent single transaction and have to be processed together, both manually and by machine learning. For example, a letter mentiones an invoice and has this invoice attached. Thus, a letter contains an invoice number, and the attached invoice contains all the remaining information such as the amount to pay.
The main feature of the enhanced process is the ability to Classify and Extract Information from multiple documents in the same task.
Input format
Input data is a Transaction object serialized to JSON. When uploading multiple documents to a Manual Task in ODF, the Transaction object containing these documents is created automatically. However, the Manual Task is fully backward compatible: If input is in the old format—a single document—the task is rendered as usual.
Input data example
{
"meta": {},
"id": "beb47611-9adc-4ff5-9396-3d1f82306ef4",
"docs": [
{
"meta": {},
"doc_id": "8a3c923c-ddee-4ef3-a9c0-77df0a829929",
"doc_name": "86086897_6898.tif",
"doc_text": "https://wfinst-307-db1.workfusion.com/gorila-ml-ocr/f3d71463-05fb-4a87-8abd-31467928634f/dff7bedd-dcad-4127-89da-e34e3c299af4/86086897_6898-xmlForCorrectedImage-raw_processed.xml",
"doc_tagged_text": "https://wfinst-307-db1.workfusion.com/gorila-ml-ocr/f3d71463-05fb-4a87-8abd-31467928634f/dff7bedd-dcad-4127-89da-e34e3c299af4/86086897_6898-xmlForCorrectedImage-raw_processed.xml",
"doc_original_link": "https://wfinst-307-db1.workfusion.com/intake-bucket/cmt-test/86086897_6898.tif",
"doc_origin": {
"meta": {},
"doc_id": "8a3c923c-ddee-4ef3-a9c0-77df0a829929",
"doc_name": "86086897_6898.tif",
"doc_type": "",
"doc_original_link": "https://wfinst-307-db1.workfusion.com/intake-bucket/cmt-test/86086897_6898.tif"
},
"doc_type": "invoice",
"doc_extracted_fields": {
"buyer_company_name": "l.ORTMAPD TOBACCO COMPANY Ih'C.",
"buyer_country": null,
"buyer_city": "GREENSBORO NC",
"buyer_postal_code": "27404",
"buyer_street_address": "714 GREEN VALLEY RD,",
"supplier_company_name": "Bozell Worldwide, Inc.",
"supplier_city": "NKW YORX. NY",
"supplier_country": null,
"supplier_street_address": "0 WEST 23PC STREET",
"supplier_postal_code": "10010-5201",
"document_id": "PR04-007551",
"document_date": "04/05/2019",
"total_amount": "1,975.00",
"line_item": [
{
"line_item_name": "Non-Coaccissionable Charges",
"tabnumber": "0",
"line_item_price": "1,975.00"
},
{
"line_item_name": "Co\\u00ABouBBionabl\\u00AB Chargee",
"tabnumber": "1",
"line_item_price": "0.00"
},
{
"line_item_name": "Agency Commission",
"tabnumber": "2",
"line_item_price": "0.00"
}
]
}
},
{
"meta": {},
"doc_id": "26a5ad4b-90e4-422d-bffa-a5d912c27e1b",
"doc_name": "2040756722_2040756723.tif",
"doc_text": "https://wfinst-307-db1.workfusion.com/gorila-ml-ocr/f3d71463-05fb-4a87-8abd-31467928634f/4eff5398-5aa5-417c-b528-39ce495c07f1/2040756722_2040756723-xmlForCorrectedImage-raw_processed.xml",
"doc_tagged_text": "https://wfinst-307-db1.workfusion.com/gorila-ml-ocr/f3d71463-05fb-4a87-8abd-31467928634f/4eff5398-5aa5-417c-b528-39ce495c07f1/2040756722_2040756723-xmlForCorrectedImage-raw_processed.xml",
"doc_original_link": "https://wfinst-307-db1.workfusion.com/intake-bucket/cmt-test/2040756722_2040756723.tif",
"doc_origin": {
"meta": {},
"doc_id": "26a5ad4b-90e4-422d-bffa-a5d912c27e1b",
"doc_name": "2040756722_2040756723.tif",
"doc_type": "",
"doc_original_link": "https://wfinst-307-db1.workfusion.com/intake-bucket/cmt-test/2040756722_2040756723.tif"
},
"doc_type": "budget",
"doc_extracted_fields": {
"total_amount": "199.165.38",
"header_of_document": "MAGAZINE",
"client_name": "P.M. INC.",
"date": "12/09/88"
}
}
]
}
caution
All fields except meta are required. The meta field is used to
pass custom information about the transaction/document.
By default ODF expects to see the transaction data in the
_sys_transaction_json field. That means that the Unique code of root
IE answer should be _sys_transaction_json.
Output format
A Manual Task does not change the data format. The output it provides is
the same JSON. Tagged text is passed in the doc_tagged_text attribute
for corresponding document. Tagged document format is the same as in the standard IE process. If some document was not reviewed by user, doc_tagged_text will remain unchanged (link or text provided in the original input data).
Manual Task configuration
To configure a Multi-document Manual Task:
Create Manual Task.
Configure the
SELECT_ONEsubanswer for multiple document types. First subanswer of theSELECT_ONEtype is used as document type classifier. The document types you've configured will be used in the Link fields to specific document type section. "Others" document type is always configured automatically, so there is no need to configure a separate type for not classified documents. See configuration example:
Configure Extraction fields.
Dynamic fields per document type
If the use case requires a different set of fields for each document type, use Answer categories to link fields to corresponding document types. A field can be assigned to a specific document type or be common for all document types.
In the following example you have to process documents of two types: Invoice and Budget.
To configure dynamic fields:
Configure
SELECT_ONEfield to classify documents.Configure all fields for all document types.
To assign the field to a specific document type, set a corresponding category. Answer Category should be the same as configured in step 1.To assign multiple categories to the field, enter answer categories separated by comma:
As the result, all fields configured for Invoice type are active, but the fields linked to Budget are not available.When multiple categories are assigned to a field, it has all of them listed:
Global fields
If a business case requires to have a field on a transaction level (for example, Final Decision), this field must have the same value across all documents in the transaction.
Global fields are available for the Check one fields only and can be
enabled in the Manual Task the following way:
<script type="text/javascript">
IEMultiDocumentModule.globalFieldsTypes = ["final_desision", "some_other_field_you_want_to_make_global"]
</script>
Enhanced results view
Enhanced results view allows for quick review of classification and extraction result for the whole transaction. This view is available on the Design tab of your Manual Task.
Results view has two grouping modes:
Group results by document presents results separately for each document. Documents are grouped by type.

Group results by field is a combined view. It is especially useful for the tasks where the goal is to extract the most important data from transaction, as opposed to extract all available data.

On the Results table view, you can:
- Directly switch between documents.
- Directly tag data using hotkeys and mouse click.
- Use tag validation.
- Use tag suggestions.
Work progress autosave
All work progress is stored in browser's IndexedDB ieAutosaveState. Data is split in two: input JSON file and data for each document separately. Submission UUID is used as a unique key in the database. Separate DB is created for each domain (this is the default browser behavior), so there are no conflicts when working on multiple instances at the same time. The state of the task is saved after every user action, such as switching to another document, tagging or removing a tag, assigning an answer by hand, correcting the final result, and so on.