Wait for document
Wait until a document is read, or until it is also reviewed when it needs a review, then give its result.
Command in the Document Automation toolkit · id ooa.documents/wait_for_document · 4 inputs (1 required), 12 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Document ID | String | Yes | The document id that Send document to process gave (or a document_id input given by a Start-a-bot delivery). | |
| Until | String | No | read | Read: until it is read (it may then wait for a review). Reviewed: also until a person has reviewed it, when it needs a review. |
| Timeout (seconds) | Number | No | 900 | Give up after this many seconds with the error DOCS.WAIT_TIMEOUT (a review may take hours). |
| Check every (seconds) | Number | No | 10 | How often to ask Document Automation. |
Outputs
| Output | Type | What it is |
|---|---|---|
| status | String | The document's status when the wait ended. |
| done | Boolean | True when the document is no longer being read. |
| needs_review | Boolean | True while it waits for a person's review. |
| reviewed | Boolean | True when a person approved or rejected it. |
| fields | Dictionary | The fields read, by name. |
| tables | Dictionary | Table fields (such as line items), by name, each a Data table. |
| confidence | Dictionary | How sure the reading was for each field, from 0 to 1. |
| document_type | String | The document type it was classified as. |
| file_name | String | The document's file name. |
| reviewed_by | String | Who approved or rejected it, when reviewed. |
| error | String | Why reading failed, when it failed. |
| parts | List | When the file held several documents (a process that recognises and splits): each one's document_id, status, doc_type and file_name. Empty otherwise. |