Within the toolbox is a group of tools that help control the workflow's direction and flow.
What is the IF tool used for?
The IF tool can be used to check if a particular condition is true and will then allow you to branch your workflow depending on the result.
For example, if you are running a legal matter and the subtype is 'Dust Disease', we may want to follow one path for the workflow, but if the subtype is 'Slip', it may follow a different one.
Prerequisites
Before you use the IF clause, you must put the item(s) you want to check into a variable.
For example, if you are checking the subtype, you may want to put the subtype of the matter into a variable (you could use the Load Work Item tool to do this).
In a condition, refer to a variable by its Identifier with the ctx prefix. For example, refer to a variable with the identifier subTypeId as ctx.subTypeId or ctx["subTypeId"]. Both forms work in the same way. From Clio Operate 7.13, you can insert the variable from a list instead of typing it. See Insert a variable into a condition below.
Configuration
| Action Name | A descriptive name for the action indicating its purpose | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Condition |
The condition that is being checked. From Clio Operate 7.13, you can select the Insert variable tag button ( Some examples:
|
||||||||||||
| Label | Defines the label the output that will be shown on the if clause (the place you can link your lines to on the workflow diagram).
|
An IF action can also set a variable that another action then consumes. For an example that selects a document template from the result of an IF action, see Prepare Document - Workflow Toolbox.
Insert a variable into a condition
From Clio Operate 7.13, the Condition field has an Insert variable tag button (</>). The button opens a list of the variables in the workflow. You select a variable instead of typing its identifier. Selecting from the list prevents typing errors in variable names.
The list displays the Display Name of each variable. If a variable has no display name, the list displays its Identifier. Clio Operate inserts the identifier in the format ctx["identifier"].
- In the visual workflow, select the If action.
- In the Condition list panel, place the cursor in the Condition field at the point where the variable goes.
- Select the Insert variable tag button (
</>) beside the field. - Select the variable from the list.
- Complete the rest of the condition, for example
ctx["claimValue"] > 100000.
Clio Operate inserts the variable at the cursor and keeps the text that is already in the field. If the variable replaces existing text, delete that text first. Each condition row has its own button, including rows that you add with Add condition.

Clio Operate does not check the condition when you save the workflow. An error in the expression, for example a missing bracket, causes an error only when the workflow runs. If you change the Identifier of a variable later, conditions that use the variable are not updated. Test the workflow after you change a condition.