Conditional
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.
| Palette | Nodes › Conditional |
| Outputs | True — the conditions are met. False — they are not, or they could not be evaluated. The output not taken is skipped. |
| Content status | From 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
- 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.
- 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. - How each condition is decided. The Operator compares the value found at the path with the Value you typed — see Operators.
- 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.
- What it passes on. The output is the result it received, unchanged, plus three entries:
branch(trueorfalse),decision(the same as a true/false value) andconditionalEvaluated— 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. - 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:
| Situation | Result |
|---|---|
| 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 result | That condition follows the "missing field" column of Operators. |
| The result is not valid JSON | Every 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.
| Path | Written by | Values |
|---|---|---|
results[0].classification.documentType | Classification, or Extraction with Detect document type | The document type, as the classifier names it |
results[0].classification.confidence | Same | The classifier's confidence, as a number |
results[0].identified | Extraction with Detect document type | true, or false when the type is UNKNOWN or empty |
results[0].zeroShot.documentType | Zero Shot | The document type the zero-shot reading returned |
results[0].fields.metadata.… | Extraction | An extracted field, under the name the extraction gave it |
results[0].fields.fraudBlocked | The extraction, when the service reports it | true / false |
results[0].facematch.score | Facematch | The similarity score of the first document |
facematch.decision | Facematch, or a Cross-check rule with the face comparator | pass, review or notApplicable (no document was face-checked) |
crossCheck.decision | Cross-check | pass or review |
restCall.….ok | REST integration — the part after restCall. is that phase's node id | true / false |
restCall.….found | Same | false when the lookup found nothing |
restCall.….status | Same | The HTTP status the system answered |
restCall.….data.… | Same | A 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.
| Symbol | Operator | True when | Value | Missing field |
|---|---|---|---|---|
| = | equals | The value read equals Value | Required | false |
| ≠ | not equals | The value read differs from Value | Required | true |
| > | greater than | The value read is a number greater than Value | A number | false |
| ≥ | greater or equal | … greater than or equal to Value | A number | false |
| less-than sign | less than | … less than Value | A number | false |
| ≤ | less or equal | … less than or equal to Value | A number | false |
| ∈ | in | The value read is one of the items of Value, a comma-separated list (passport, id_card) | A list | false |
| ∉ | not in | The value read is none of the items of Value | A list | false |
| ⊃ | contains | The value read is text that contains Value, or a list with an item equal to Value | Required | false |
| ? | exists | The field exists and is not null | None | false |
| ∅ | is empty | The field is missing, null, empty text, an empty list or an empty object | None | true |
How values are compared:
- Value is always stored as text. Equality is therefore a text comparison that ignores upper and lower case:
PASSPORTequalspassport, and a true/false field equalstrueorfalse. A number equals Value only if it is written the same way (0.85equals0.85, not0.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.
| Field | What it does | Required | Format / values | Default | Validation messages |
|---|---|---|---|---|---|
| Description | The name shown on the node | No | Text | Conditional | — |
| Match | Whether every condition or any one condition must be true | Yes | All conditions (AND) / Any condition (OR) | All conditions (AND) | — |
| Import JSON schema | Reads 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. | No | A 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 saved | A path | Empty | This field reads query …, which no longer exists or is not before this conditional. |
| Operator (per condition) | How to compare — see Operators | Yes | One 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 operators | Text; a number for the number operators; a comma-separated list for in / not in | Empty | — |
Changes go into the workflow draft. Save it with Save Draft; processes use them only after you publish.
Buttons and actions
| Button | What happens | Reversible? |
|---|---|---|
| Add condition | Adds 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 schema | Replaces the stored list of suggested fields with the file's. Conditions already written are not changed. | Import another file |
Common problems
| Message | Cause | What to do |
|---|---|---|
| Could not read that file as JSON. | The imported file is not valid JSON | Export the schema again as JSON. |
| No fields were found. | The file is valid JSON but has no field names in a shape the editor reads | Use 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 False | The 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 Field | Open 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 skipped | Expected: the process took True | — |
The editor shows no publication message specific to this phase.
Related
- Design and publish a workflow
- REST integration — the
restCallanswers a condition can read - Manual Review — the usual destination of False
- Workflow administration screens
Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation