Populate a document using the response from Azure AI Document Intelligence
Azure AI offers a Document Intelligence service as part of its cloud offerings.
Document Intelligence offers several pre-built models that are specifically designed to extract different types of data from various document types. It also supports custom models.
The OCR response contains a collection of named fields specific to the processor and what it was able to detect.
Import the sample package, Azure AI Document Intelligence Package.zip, available at \\TotalAgilityInstall\Sample Processes\Third Party Data Extraction into your TotalAgility Designer.
The sample package includes the following items.
Category |
Data Extraction > Azure AI Document Intelligence Everything in the package is added to this category. |
Processes |
|
Extraction group | ThirdPartyExtraction: This extraction group contains several example document types. |
Classification group | ThirdPartyExtractionCG |
Scan/VRS profile | Third Party Data Extraction Profile |
Global data models |
|
Forms | Scan create new job and Validation forms. |
Sample process: AzureAI Receipt
This sample process shows how to populate fields that are returned using the prebuilt-receipt model using API version 3.1 2023-07-31. Refer to Receipt data extraction - Document Intelligence (formerly Form Recognizer) - Azure AI services | Microsoft Learn.
This sample process includes the following activities.
Activity | Description |
---|---|
Azure AI Extraction | Sets a data object using JSON in the process. The JSON corresponds to the sample response from AzureAI for the coffee-chain-receipt-sample.jpg image. (In a real work scenario this would make a call to Azure AI) |
Process Receipt Extraction Results | Gets the receipt data from the JSON and populates the fields in the TotalAgility document. |
Clear down raw data | Clears down the raw JSON and data object, as they are no longer required. |
Validate | Validates the document. |
To try this at run time, do the following:
-
Browse to AzureAI Receipt_Scan.form.
-
Scan the coffee-chain-receipt-sample.jpg image.
This sample process is configured to work with this image only.
-
Create a job for the process.
-
Select the work queue and click on the Validation activity.
The data for the document fields is displayed. Clicking on a field highlights the area on the document image.
-
You can validate each field of the document wherever required.
-
Click Yes to complete the validation.
Sample process: AzureAI Driving License
This process is similar to the Azure AI Receipt process; however, the fields are different as per the driving license document type.
The Scan form is AzureAI Driving License_Scan.form and the image to scan is laura-wilson-driving-license-sample.jpg.
This sample process is configured to work with this image only.