Skip to content

Commit 7dd49e8

Browse files
async analyze doc documentation
Added documentation for the new enumerations and the two new actions added
1 parent bd264a9 commit 7dd49e8

1 file changed

Lines changed: 61 additions & 1 deletion

File tree

content/en/docs/appstore/connectors/aws/aws-textract.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,29 @@ This enumeration indicates the selection status of the block. For more informati
267267
| `SELECTED` | SELECTED |
268268
| `NOT_SELECTED` | NOT_SELECTED |
269269

270+
#### 4.2.7 FeatureTypes
271+
272+
This enumeration holds the available types of analysis to perform, see
273+
274+
| Name | Caption |
275+
| --- | --- |
276+
| `FORMS` | FORMS |
277+
| `TABLES` | TABLES |
278+
| `QUERIES` | QUERIES |
279+
| `SIGNATURES` | SIGNATURES |
280+
| `LAYOUT` | LAYOUT |
281+
282+
#### 4.2.8 JobStatus
283+
284+
This enumeration indicates the status of the document analysis job as part of the `GetDocumentAnalysisResponse`, see
285+
286+
| Name | Caption |
287+
| --- | --- |
288+
| `IN_PROGRESS` | IN_PROGRESS |
289+
| `SUCCEEDED` | SUCCEEDED |
290+
| `FAILED` | FAILED |
291+
| `PARTIAL_SUCCESS` | PARTIAL_SUCCESS |
292+
270293
### 4.3 Activities {#activities}
271294

272295
Activities define the actions that are executed in a microflow or a nanoflow. For the Amazon Textract connector, they represent actions such as analyzing a document or expense. For more information, see [Activities](/refguide/activities/).
@@ -277,7 +300,7 @@ To help working with PDF files with mulitple pages in a synchronous way, you can
277300

278301
The `AnalyzeDocument` Amazon Textract action allows you to analyze documents and extract information from them. It requires a valid AWS region and `AnalyzeDocumentRequest` object. It additionally requires at least a `RequestQuery` object when the `GetQueries` attribute in `AnalyzeDocumentRequest` is set to true.
279302

280-
Additionally, you can use the `AnalyzeDocumentResponse_ProcessResults` sub-flow. This will process the response from Amazon Textract into the specialized `BlockItem` model.
303+
Additionally, you can use the `AbstractDocumentAnalysisResponse_ProcessResults` sub-flow. This will process the response from Amazon Textract into the specialized `BlockItem` model.
281304

282305
The input and output for this service are shown in the table below:
283306

@@ -316,3 +339,40 @@ This activity returns an `AnalyzeExpenseResponse` object with objects from the f
316339
| `LineItemField` | | This entity holds information for a line within the given document's table. |
317340
| `LineItemExpenseField` | `AmazonTextractConnector.ExpenseField` | This specialized entity holds information for the detected expense-related information, separated into categories `Type`, `LabelDetection` and `ValueDetection`. The attribute it contains is `PageNumber`, which describes the page number on which the value was detected. Additionally, it contains a list of `GroupProperty` objects, a specialized `ExpenseDetection` object (both `ExpenseDetectionLabel` and `ExpenseDetectionValue`), an `ExpenseType` object, and a `Currency` object. |
318341
| `AnalyzeExpenseBlock` | `AmazonTextractConnector.Block` | This entity holds information for items that are recognized in a document within a group of pixels close to each other. The attributes it contains are `BlockType`, `ColumnIndex`, `ColumnSpan`, `Confidence`, `EntityTypes`, `_Id`, `Page`, `RowIndex`, `RowSpan`, `SelectionStatus`, `Text` and `TextType`. The `BlockType` describes the type of text item that's recognized, the `ColumnIndex` describes the column in which a table appears the first column position is 1, the second column position is 2 and so on), the `ColumnSpan` describes the number of columns that a table cell spans, the `Confidence` describes the score that Amazon Textract has in the accuracy of the recognized text, the `EntityTypes` describes the type of entity, the `Page` describes the page on which a block was detected, the `RowIndex` describes the row in which a table cell is located (the first row position is 1, the second row position is 2, and so on), the `RowSpan` describes the number of rows that a table cell spans, the `SelectionStatus` describes the selection status of a selection element (such as an option, radio or checkbox), the `Text` describes the word or line of text that's recognized by Amazon Textract and `TextType` describes the kind of text that Amazon Textract has detected (handwritten or printed). Additionally, this entity contains a list of `Relationship` objects and a specialized Geometry object (`BlockGeometry`). |
342+
343+
#### 4.3.3 StartDocumentAnalysis {#startdocumentanalysis}
344+
345+
The `StartDocumentAnalysis` Amazon Textract action allows you to analyze multi-page documents asynchronously and extract information from them. It requires a valid AWS region, a `Credentials` object, a `StartDocumentAnalysisRequest` object, and a `S3DocumentLocation` object. It additionally requires at least one `AsynchronousFeatureType` object. If the Feature Type 'QUERIES' is part of the request, it additionally requires a `AsnychronousRequestQuery` object to specifiy the query.
346+
347+
The input and output for this service are shown in the table below:
348+
349+
| Input | Output |
350+
| --- | --- |
351+
| `StartDocumentAnalysisRequest` (Object) | `StartDocumentAnalysisResponse` (Object) |
352+
| `AWS_Region` (Enumeration) | |
353+
| `Credentials` (object) | |
354+
355+
This activity returns a `AnalyzeDocumentResponse` object with objects from the following entities, as shown in the table below:
356+
357+
| Name | Generalization | Documentation |
358+
| --- | --- | --- |
359+
| `StartDocumentAnalysisResponse` | | This entity is the response for the Amazon Textract `StartDocumentAnalyis` action. It contains a JobId attribute, which can be used by the `GetDocumentAnalysis` action to retrieve the results once they have been processed by the Textract service|
360+
361+
#### 4.3.4 GetDocumentAnalysis {#getdocumentanalysis}
362+
363+
The `GetDocumentAnalysis` Amazon Textract action allows you to retrieve the analysis results that have been invoked by the `StartDocumentAnalysis` action. It requires a valid AWS region, a `Credentials` object, and a `GetDocumentAnalysisRequest` object.
364+
365+
Additionally, you can use the `AbstractDocumentAnalysisResponse_ProcessResults` sub-flow. This will process the response from Amazon Textract into the specialized `BlockItem` model.
366+
367+
| Input | Output |
368+
| --- | --- |
369+
| `GetDocumentAnalysisRequest` (Object) | `GetDocumentAnalysisResponse` (Object) |
370+
| `AWS_Region` (Enumeration) | |
371+
| `Credentials` (object) | |
372+
373+
This activity returns a `GetDocumentAnalysisResponse` object with objects from the following entities, as shown in the table below:
374+
375+
| Name | Generalization | Documentation |
376+
| --- | --- | --- |
377+
| `GetDocumentAnalysisResponse` | `AbstractDocumentAnalysisResponse`| This entity is the response for the Amazon Textract `GetDocumentAnalyis` action. It holds information about the JobStatus. If too many Blocks were found, it contains a NextToken that can be used to retrieve the next batch of results. |
378+
| `GetDocumentAnalysisWarning` | This entity holds information about the warnings that were sent as part of the response, and the pages to which they apply.|

0 commit comments

Comments
 (0)