DocPipe lets you branch a pipeline by setting conditions on edges. Every edge between two nodes has a condition that decides whether the edge fires when the source completes. By configuring those conditions, you can send a document down different paths based on its content, the previous step’s status, or a custom rule.Documentation Index
Fetch the complete documentation index at: https://docs.docpipe.ai/llms.txt
Use this file to discover all available pages before exploring further.
Edge condition types
Click any edge in the pipeline editor to open the properties panel on the right. The Condition Type selector controls when the edge fires:| Type | Fires when |
|---|---|
| Always | The source node completed (success or failure). Use this for unconditional flow. |
| On success | The source completed successfully. This is the default for new edges. |
| On failure | The source failed. Pair with On success to route errors to a separate handler. |
| Condition | A rule over the source node’s payload evaluates to true. |
| Otherwise | None of the source’s other Condition edges fired. Use this as a fallback. |
Authoring a Condition edge
When you pick Condition as the edge type, the properties panel shows a structured editor with three fields:- Field: the value to compare. Type
{{to autocomplete fields from the source node (for example,{{payload.invoiceType}}). - Operator: the comparison to apply. The dropdown filters operators by the inferred field type, so numeric operators stay hidden when the field is a string.
- Value: the literal to compare against. Hidden for unary operators like is empty that don’t take a value.
Operators
The structured editor surfaces these operators:| Operator | Aliases (raw expression) | Notes |
|---|---|---|
== | eq, equals | Case-insensitive string compare. |
!= | neq, not_equals | Case-insensitive string compare. |
> | gt | Numeric when both sides parse as numbers, lexicographic otherwise. |
< | lt | Same as above. |
>= | gte | Same as above. |
<= | lte | Same as above. |
contains | (none) | Case-insensitive substring match. |
not_contains | notcontains | Inverse of contains. |
is_empty | isempty | Unary. True when the field is missing, null, or an empty string. |
is_not_empty | isnotempty | Unary. Inverse of is_empty. |
Inline popover on edge creation
When you connect two nodes by dragging an edge, an inline popover appears at the edge midpoint with five quick choices:- Always
- On success (preselected)
- On failure
- If… (expands the structured editor inline so you can pick a field, operator, and value without leaving the canvas)
- Otherwise
Branch from a node
To author multiple outgoing branches at once, click the branch action in any node’s hover toolbar. The Add branches modal opens with two rule rows by default:- Each row is a structured field, operator, and value.
- Click Add branch to add more rows.
- Tick Add an Otherwise edge for the fallback case to also create an Otherwise edge for inputs that match no rule.
Otherwise edges
An Otherwise edge fires only when none of the source node’s other Condition edges matched. The scheduler resolves Otherwise edges after evaluating siblings, so you don’t have to write a negation for every condition. A few rules:- A node can have at most one Otherwise edge. Saving a pipeline with two Otherwise edges from the same source raises a validation error.
- Otherwise edges look at sibling Condition edges only. On success, On failure, and Always edges are independent and don’t suppress an Otherwise.
- An Otherwise edge does not fire when the source failed. Use On failure for the failure path.
Example: route by document type
B2B or B2C, only that branch fires. Anything else falls into the review queue.
Edge conditions vs route action
The Route action node and edge conditions both fan a run out into multiple paths but they answer different questions:- Edge conditions decide whether a single edge fires. Use them when you want a few branches with explicit rules and an optional fallback.
- Route action groups, keeps, or drops items in a payload (for example, splitting an invoice with line items into one run per line). Use it when you need to fan out a single document into multiple downstream runs.
Tips
- Configure an Otherwise edge whenever you have a set of mutually exclusive conditions. Without one, runs that match no condition stop at the source node.
- Keep conditions simple. If you need complex boolean logic, chain conditions through intermediate transform or validation nodes that produce a flag in the payload.
- Test each branch with a representative document before activating the pipe.