Overview
Conditions are Willow's way to support flow control, the execution of different actions depending on the collected data. For example, there may be a need to send the invoice to the company director for approval only if the total price exceeds a certain amount. Or, the invoice is sent for payment to different bank accounts based on the currency used in the invoice.
Each action can be performed or skipped based on the condition configured within that action. If the action is skipped, the workflow continues from the following action in the workflow scheme.

Rules
The set condition button is accessible near the top right corner of the action configuration.

- The action can be set to:
- Always run (default)
- Run only if the condition is met
- A condition may be set on each action, except the Fill in a Form action (because this action is another way to start a workflow, without a file)
- It's set as soon as you click Apply on the Condition Panel (even if later you cancel the action configuration). Also, please note that any changes made before switching to the Condition Panel will stay intact upon returning to the action configuration.
- When it's set, a little condition icon will appear next to the action on the workflow configuration scheme
- A condition is a set of one or more expressions where you can compare numbers, text, dates, dynamic metadata, etc.
- If the condition is calculated to be true, the action is performed; else, it's skipped, and the workflow continues from the next action
- If the condition cannot be calculated for some reason (such as division by zero), the action just fails (without the ability to retry), and the workflow is stopped
- If there is missing data in the condition expression, that expression is always calculated to false. Still, if that expression is a part of the bigger condition with multiple OR clauses, the overall result might still be true.
- Expressions (i.e. one row of the condition) rules:
- Left and right operands of an expression may be metadata values, static text or any combination of these two. Typically, it will be metadata compared to some value.
- Operators that may be used are:
- Equal (=)
- Not equal (≠)
- Less than (<)
- Greater than (>)
- Less than or equal (≤)
- Greater than or equal (≥)
- Contains
- Does not contain
- Starts with
- Ends with
- Does not start with
- Does not end with
- Text comparison is case-insensitive (so. e.g. text = TEXT will return true)
- Arithmetic operators <, >, ≤, ≥ are applicable only to numbers and dates. That means the left and right sides will be calculated, and if both are numbers or dates, they can be compared; otherwise, the condition will fail.
- Note that static dates in the condition must be entered in the organisation language format (e.g. 31/03/2025 for UK, 03/31/2025 for US format)
- Left and right operands may also be arithmetic expressions that use +, -, * and / operations (e.g. Total Amount * 1.05 + 1000.00).
- The expressions are calculated before comparison, but only if both sides are numbers or arithmetic expressions and the arithmetic operator is between them (=, ≠, <, >, ≤, ≥).
- Otherwise, they are considered as text (so, for example, if Total Amount is “1000GBP” (not a number!), the aforementioned value will be “1000GBP * 1.05 + 1000” text (and will typically fail the comparison with a number).
- Operators “contains”, “does not contain”, “starts with”, “ends with”, “does not start with”, “does not end with” work with text values only. If the operand value is anything else, it will be considered as text (e.g. 31/03/2025 will be “31 March 2025” and metadata of the user type will be the user's full name)
- Multiple expressions may be separated with AND/OR logical operators
- Expressions are calculated from top to bottom, without mathematical precedence.
- ORs must be at the top (not after any AND). We do this to prevent unexpected results because of precedence. Typically, all starting ORs will be calculated first, and only then they will be joined with the following expressions.
- Back button (top-right) from the Condition Panel exists only until the condition is modified in any way
- Once the file goes through an action with a condition, it will produce a File History entry on the File View
- We add the File History entry whether the action is performed (i.e. condition was met), skipped (i.e. condition wasn't met) or failed to calculate the condition.
- Show condition label can be clicked to review the condition
- The values at the moment of the comparison will be shown in a light purple rectangle
- Metadata values will be shown in purple, underlined, with a tooltip that shows the title of the metadata property used to retrieve the value
- Date values will be shown in the organisation language format
- Yes/No values will always be shown in English language
- Some special rules about the history items
- WillowSign actions produces multiple history items - Document sent for signing, WillowSign applied, Willow signing completed. Only the first, “Document sent for signing” item will have a condition attached
- For Merge/Split actions, the information about the condition will be in the original file(s) that entered the action, not in the product (output) files
- Condition will not be shown in the file history item for Convert to PDF action, when this action has been automatically added because it was necessary before some other action, such as Redact, Stamp, Auto Sign... If the user adds Convert to PDF action when creating a workflow, the condition will be shown, as with any other workflow action.