Skip to main content

Extraction

Not yet checked on the product

This chapter was written from the product's source code and has not yet been checked by a person on a running Cogneris. If what you see on screen differs, the screen is right — please tell your Cogneris contact so the chapter can be corrected.

Extraction reads the fields of each document of the process. It sends every document to the Cogneris Vision service and keeps the fields it returns. When an earlier Classification found the template of a document, the extraction follows that template's fields.

PaletteNodes › Extraction
OutputsOne. See Outputs.
Content statusFrom source; not observed (workflow-fe f88c5c1, workflow-be 6703373, 2026-10-22)

When to use it​

Whenever a later phase needs the content of the documents: a Manual Review where a person checks the fields, a Cross-check, a Conditional on a field value, Generate document, or a delivery with Send or REST integration.

Put a Classification before it when your documents have templates: the fields then have the names your template declares. Without it the AI names the fields itself, and the names can differ from one process to the next.

Extraction accepts only one incoming link. The editor does not draw a second one.

What happens in a run​

The phase reads the documents from the output of the phase that leads into it, and handles them one at a time:

  1. A document that already failed in an earlier phase is not processed again; it is carried forward as skipped.
  2. If an earlier phase resolved the document's template, the call asks the Vision service for exactly that template's fields. Otherwise the Vision service decides which fields to return.
  3. The fields are recorded on the document of the run, and the document counts as succeeded — even when the service found no value at all, as on a blank page.
  4. What an earlier Classification or Zero Shot said about the document (its classification or zeroShot result) is copied into the row, so phases further on still see the type.

The output is one row per document (document, fields, the type information carried forward, and skipped or error when they apply) plus the list of documents, unchanged.

A process started with a Cogneris API key is sent through the Cogneris API instead of straight to the Vision service. On that path the template is not passed on, so the fields are always named by the AI. Detect document type works on that path too: the classifier is reached through the Cogneris API as well.

Detect document type​

With Detect document type on, after the fields are read the phase sends the documents that did not fail to the Vision classifier, in one extra call. For each document it adds:

  • classification — the document type, the confidence, the pages and the template that covers the type, as Classification produces them. It replaces any classification carried from an earlier phase.
  • identified — true, or false when no type was found or the type is UNKNOWN.

It also stamps the type and template on the document of the run, as Classification does, so a later Manual Review can file the document under its type.

This step never fails the phase. If the classifier answers an error, the rows are left without a type; a Conditional that reads them then finds nothing.

A Conditional placed after Extraction can read these values at results[N].identified and results[N].classification.documentType, where N is the document's position starting at 0. Extracted values are under results[N].fields.

When documents fail​

A failure on one document marks only that document failed; the others carry on, and later phases skip it.

  • A temporary failure of the Vision service (server error, timeout, connection error, too many requests) is retried up to 3 times for that document. When the service asks to wait at most 10 seconds, the phase waits that long.
  • If no document succeeded:
    • and a Manual Review is still ahead in the process, the phase completes anyway and the review receives the failed documents for a person to decide;
    • otherwise, if every failure was temporary, the whole phase runs again, up to 3 more times;
    • otherwise the documents are marked failed and the process fails. If exactly one Send is still ahead, it runs first to deliver the failure, every other pending phase is skipped, and the process then ends as failed.
  • If at least one document succeeded, a document whose temporary failure outlasted its retries is marked failed; the phase is not run again for it.

Outputs​

The node has one output: every phase linked to it runs once Extraction completes.

Before this version it also showed Alternative, which the service never chose between: both outputs ran. A version published with a link on Alternative keeps running it. In the editor, such a link keeps its dot and the node shows Alternative not routed; connect the link to the output before you publish a new version — the publication is refused with “…” has an edge on its Alternative output, which only Classification routes.

To route on whether the document was identified, or on a field value, connect Extraction to a Conditional.

Configuration​

Select the node to open Phase Configuration. Its header shows the phase type as EXTRACTION.

FieldWhat it doesRequiredFormat / valuesDefaultValidation messages
DescriptionThe name shown on the node.NoFree text. Left empty, the node keeps its previous name.Extraction—
Detect document typeAlso classifies each document and adds its type, confidence and identified flag to the result. The hint reads Classifies each document during extraction and adds its type, its confidence and whether it was identified to the extraction output. Costs one extra vision call per process.NoOn / offOff—

There is no template to choose here: the template comes from an earlier Classification. The type found by Detect document type arrives after the fields are read, so it serves routing and review but does not change the extraction it belongs to.

Common problems​

MessageCauseWhat to do
(none — the link is not drawn)You tried to connect a second phase into Extraction. It accepts one incoming link.Remove the existing link first, or place the phases in sequence.
Auth token missing for run; cannot call the document service. (service text, run error)The process carries no credential for the Vision service.Start the process again. If it persists, contact Cogneris support.
No documents found for extraction. (service text, run error)The phase received no documents.Check that the phase leading into Extraction passes documents on.
extraction: no document succeeded — … (service text, run error)Every document failed. The text lists the error of each one.Read each document's error. Check the files and your templates, then start the process again.
extraction: no document succeeded because all failures were transient — … (service text)Every document hit a temporary failure. The phase is run again automatically.Wait. If the process then fails, start it again later.
Field names change between processesNo template was found for the document, so the AI named the fields.Add a Classification before Extraction and make sure a template covers the document type.
No type in the result although Detect document type is onThe classifier answered an error (the run log has detectDocumentType classifier returned errors), or the API key used to start the process cannot use the classifier.Check the classifier, or the API key's access.
Publishing says the node has an edge on its Alternative outputA link drawn before this version still leaves Alternative.Connect it to the node's output (Normal), or route with a Conditional.

Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation