Pular para o conteúdo principal

Conditional

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.

A Conditional phase asks a yes/no question about the result that reached it and sends the process down its True or its False output. It changes no document; it only chooses the branch.

PaletteNodes › Conditional
OutputsTrue — the conditions are met. False — they are not, or they could not be evaluated. The output not taken is skipped.
Content statusFrom source; not observed (workflow-fe f88c5c1, workflow-be 6703373, 2026-10-22)

When to use it​

  • Deliver straight away when a check passed, and send everything else to a person: for example True → Send, False → Manual Review.
  • Branch on what an earlier phase decided: the face check, the cross-check, the classification, or the answer of a REST integration.

A Conditional accepts only one incoming link.

What happens in a run​

  1. What it reads. The phase reads the output of the phase that led into it. If there is none, it reads what the process was started with.
  2. How a field is found. Each condition names a Field as a path: property names separated by dots, and a position in a list in square brackets, counted from 0 — for example results[0].classification.documentType. Names are case-sensitive. The path is looked for first at the top of the result and then, if it is not there, inside each wrapped earlier result (up to 8 levels). This is what lets a condition placed after a Manual Review still read what the phases before the review produced. Where the path exists at the top, the top wins.
  3. How each condition is decided. The Operator compares the value found at the path with the Value you typed — see Operators.
  4. How the answer is decided. With All conditions (AND) every condition must be true; with Any condition (OR) one is enough. True → the True output; otherwise → False.
  5. What it passes on. The output is the result it received, unchanged, plus three entries: branch (true or false), decision (the same as a true/false value) and conditionalEvaluated — one line per condition with the field, the operator, the value, the value actually read (empty when the field was missing) and the result. This is where to look when a process took the branch you did not expect.
  6. Routing. Only the links leaving the chosen output stay live. Phases reachable only through the other output are marked skipped. A link that leaves the phase without an output name is never followed.

The phase never fails the run. Anything it cannot evaluate routes to False:

SituationResult
No condition with a Field (or no configuration at all)The whole phase answers False.
A workflow saved before conditions were a list (one Field, Operator and Value stored on their own)Read as a single condition, exactly as the editor shows it when the phase is opened.
The field does not exist in the resultThat condition follows the "missing field" column of Operators.
The result is not valid JSONEvery field counts as missing.
An operator the service does not know (only possible in a configuration not made in this panel)That condition is false.

Fields you can compare​

The Field box accepts any path. Its suggestion list offers the fields of an imported schema and the answer of every REST integration placed before this phase. The paths below are written by the other phases; each exists only if that phase ran before the Conditional on the same route.

PathWritten byValues
results[0].classification.documentTypeClassification, or Extraction with Detect document typeThe document type, as the classifier names it
results[0].classification.confidenceSameThe classifier's confidence, as a number
results[0].identifiedExtraction with Detect document typetrue, or false when the type is UNKNOWN or empty
results[0].zeroShot.documentTypeZero ShotThe document type the zero-shot reading returned
results[0].fields.metadata.…ExtractionAn extracted field, under the name the extraction gave it
results[0].fields.fraudBlockedThe extraction, when the service reports ittrue / false
results[0].facematch.scoreFacematchThe similarity score of the first document
facematch.decisionFacematch, or a Cross-check rule with the face comparatorpass, review or notApplicable (no document was face-checked)
crossCheck.decisionCross-checkpass or review
restCall.….okREST integration — the part after restCall. is that phase's node idtrue / false
restCall.….foundSamefalse when the lookup found nothing
restCall.….statusSameThe HTTP status the system answered
restCall.….data.…SameA value of the mapped answer

results[0] is always the first document of the process. To gate the whole process on a face check or a cross-check, use facematch.decision or crossCheck.decision, which summarize every document.

Operators​

The Operator list shows symbols. The Value box appears only for operators that compare with a value.

SymbolOperatorTrue whenValueMissing field
=equalsThe value read equals ValueRequiredfalse
≠not equalsThe value read differs from ValueRequiredtrue
>greater thanThe value read is a number greater than ValueA numberfalse
≥greater or equal… greater than or equal to ValueA numberfalse
less-than signless than… less than ValueA numberfalse
≤less or equal… less than or equal to ValueA numberfalse
∈inThe value read is one of the items of Value, a comma-separated list (passport, id_card)A listfalse
∉not inThe value read is none of the items of ValueA listfalse
⊃containsThe value read is text that contains Value, or a list with an item equal to ValueRequiredfalse
?existsThe field exists and is not nullNonefalse
∅is emptyThe field is missing, null, empty text, an empty list or an empty objectNonetrue

How values are compared:

  • Value is always stored as text. Equality is therefore a text comparison that ignores upper and lower case: PASSPORT equals passport, and a true/false field equals true or false. A number equals Value only if it is written the same way (0.85 equals 0.85, not 0.850).
  • The four number operators read both sides as numbers, with a dot as the decimal separator. If either side is not a number, the condition is false.
  • in and not in split Value at the commas and trim the spaces; the comparison ignores case. When the field read is itself a list, they check whether that list holds Value as a whole (no splitting).
  • contains on a number or a true/false value is always false.
  • An empty Value is not stored.

Configuration​

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

FieldWhat it doesRequiredFormat / valuesDefaultValidation messages
DescriptionThe name shown on the nodeNoTextConditional—
MatchWhether every condition or any one condition must be trueYesAll conditions (AND) / Any condition (OR)All conditions (AND)—
Import JSON schemaReads a .json file and adds its fields to the Field suggestions. Accepts a JSON schema (its properties, with title as label), a list of fields (fields with key), or a sample object (its top-level names). Each name is turned into results[0].fields.metadata. followed by the name, unless it already starts with results[. The list is stored with the phase.NoA JSON file—Could not read that file as JSON. · No fields were found.
Field (per condition)The path to read — see Fields you can compare. Suggestions: imported fields, then the answers of earlier REST integration phases, labelled Query: …Yes — a condition without one is dropped when savedA pathEmptyThis field reads query …, which no longer exists or is not before this conditional.
Operator (per condition)How to compare — see OperatorsYesOne of the 11 symbols=—
Value (per condition)What to compare with. Hidden for exists and is empty, and removed from the condition when you switch to them.For the 9 comparing operatorsText; a number for the number operators; a comma-separated list for in / not inEmpty—

Changes go into the workflow draft. Save it with Save Draft; processes use them only after you publish.

Buttons and actions​

ButtonWhat happensReversible?
Add conditionAdds an empty condition row. It is stored only once its Field is filled.Yes — remove it
× (Remove condition)Removes the condition at once, without confirmation.Use Undo in the editor toolbar
Import JSON schemaReplaces the stored list of suggested fields with the file's. Conditions already written are not changed.Import another file

Common problems​

MessageCauseWhat to do
Could not read that file as JSON.The imported file is not valid JSONExport the schema again as JSON.
No fields were found.The file is valid JSON but has no field names in a shape the editor readsUse a JSON schema with properties, a fields list, or a sample object.
This field reads query …, which no longer exists or is not before this conditional.The Field reads a REST integration that was deleted, disconnected or moved after this phase. The service would find nothing and route False.Pick the field again from the suggestions, or move the REST integration before this phase. The editor does not stop you publishing.
The process always takes FalseThe path is not in the result (a typo, wrong case, a phase that did not run on this route), the value is compared as text, or no condition has a FieldOpen the run's conditionalEvaluated: the value actually read shows which. Check the path's case and the decimal separator.
A phase after the False output is shown as skippedExpected: the process took True—

The editor shows no publication message specific to this phase.


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