Help Centre › Building Processes
A Decision checks one or more conditions and sends the process down its True or False path. When there are more than two outcomes, use a Switch instead. If you are new to process maps, read Working with process maps first.
1. Add a Decision
- On the process map, open the Add step tab and drag Decision onto the canvas. This form opens: {{popups:decisions/add}}
- Give it a name that reads as a question, for example "Over the limit?".
- Click Condition to add a row, and fill in the variable, the operator and the value: {{>key-operator-value-band}}For variables, see Working with variables in RPAs. For operators, see the list below.
- Add more rows if you need them, then choose how they combine (see next section).
- Click Add.
You can also copy an existing Decision and edit it. Double-clicking a step duplicates it.
2. Take the True path when…
When a Decision has more than one row, Take the True path when says how the rows combine:
- All of these (AND): every row must be true. This is the default.
- Any of these (OR): at least one row must be true.
- None of these: no row may be true.
- Exactly one of these: one row, and only one, must be true.
If the answer is no, the process takes the False path.
3. Connect the True and False paths
Drag the Decision into place and draw a connection to the step that follows each answer. See Working with process maps for how.
- The first connection you draw is DEFAULT / TRUE. The second becomes FALSE (amber).
- To change a type, click the connection and pick another: {{popups:activities/labels}}
- Give each connection a label such as "Yes" and "No" so the map reads well.
- On an RPA process you can also set how long the bot waits before the next step: at least, at most, or exactly a number of seconds.
A Decision can have at most three connections out: one TRUE, one FALSE and one EXCEPTION.
4. More than two outcomes: use a Switch
A Decision only has True and False. When a value can lead several ways, for example a different path per bank, use a Switch.
- Open the Add step tab and drag Switch onto the canvas.
- In Switch on, enter the value to check, usually a variable such as
{bank}. - Draw a connection from the Switch to the first step of each path. All of them stay DEFAULT.
- Click each connection and set its label to the value it should match, for example
FNB. One label can hold several values separated by commas, such asABSA, Nedbank. - Leave one connection's label empty to catch every other value.
The bot first looks for an exact match, then a match that ignores capitals and spaces, then takes the connection with no label. If nothing matches and there is no empty label, the step fails and says which value it got and which labels it had.
5. The full list of operators
A condition compares a variable against a value using an operator. The same operators are available when you filter a loop or a trigger.
= / != | Equals / does not equal. != is also written <>; both mean the same. |
> / >= | Greater than / greater than or equal to |
< / <= | Less than / less than or equal to |
between / !between | Between / not between a range, written 1..10 or 1,10. The ends count as inside. |
contain / !contain | Contains / does not contain the text |
startswith / !startswith | Starts with / does not start with the text |
endswith / !endswith | Ends with / does not end with the text |
in / !in | Is / is not one of a comma-separated list, e.g. red,green,blue |
similar / !similar | Is / is not roughly the same text (at least 80% alike), useful when spelling or spacing may vary |
match / !match | Matches / does not match a regular expression (regex), for advanced pattern checks |
empty / !empty | Is empty / is not empty. Takes no value. |
In a trigger or loop filter, a field name that does not exist makes that row fail, except with empty and !empty, where a missing field counts as empty. See Email fields for the names to use with emails.