Skip to main content

Control when a step runs and proceeds

Use Workflow Options — Step Run Condition and Step Finish Condition — to control when a step runs and when it proceeds

Control when a step runs and proceeds

Some workflow steps should not run for every work item. Others should run, but should not proceed to the next step until the work item is in a certain state.

Workflow Options on a step lets you declare both rules with the same condition builder used elsewhere in Thunk (for example in tests):

  1. Step Run Condition — only run this step if the work item meets the condition; otherwise proceed to the next step.

  2. Step Finish Condition — only proceed to the next step if the work item meets the condition; otherwise do not continue.

Thunk checks these conditions directly against the work item's values — not by AI judgment in directions. A Step Finish Condition can also include optional AI checks for things a condition cannot express, such as whether an uploaded document is the right kind of document (see Add AI checks to a finish condition below). Both are different from a tool’s Availability condition, which only limits when a tool can be used inside a step that still runs.

Workflow Options with no conditions set

Where to find it

  1. Open your thunk and select a workflow step.

  2. From a work item, open the step’s Settings tab. (When authoring the workflow plan, open the step’s details panel.)

  3. Expand Workflow Options.

Step Run Condition

Use this when the decision is based on work-item property values you can express as a condition — for example:

  • Only process work items where Amount is greater than a threshold

  • Skip a step when a required field is empty

  • Only run a follow-up step when a prior-step result field has a specific value

Prefer this over writing “skip this step if …” in directions when you want a deterministic skip (same property values → same skip/run behavior, no AI call on skipped work items).

Set, edit, or clear a run condition

Conditions can use most properties on the work item (including columns that are not bound as inputs for this step). Some system bookkeeping columns are not offered in the picker. If the work item has no properties yet, the panel shows that no properties are available.

When properties are available:

  1. Under Step Run Condition, choose Add Condition.

  2. In the dialog, pick one or more column / operator / value rows (combined with and / or as shown).

  3. Choose Save.

The panel shows a short summary of the saved condition. Use Edit Condition to change it, or Clear to remove it so every work item runs the step again.

Workflow Options with a saved run condition

What happens when a work item is skipped

For a work item that does not meet the run condition:

  • The step is marked done without agent work for that work item

  • The work item advances to the next step in the plan

  • The step’s chat records an agent message: Step skipped because the run condition did not pass., followed by a short breakdown of each condition (for example a bullet like - Priority = "High" → false (was "Low")).

Agent chat message when a step is skipped by the run condition

When a condition is set and the work item does match, the step runs normally. The step chat may also show an agent message: Run condition passed; running this step., with the same kind of per-condition breakdown.

Skip this step for test work items

Below the run-condition controls is a separate toggle: Skip this step for test work items.

Turn this on when a step should not run during automated test re-runs — typically side-effecting steps such as sending email or writing to an external system. On a re-run of a work item that carries test assertions, that step is skipped and the work item advances; the step chat records an agent message: Step skipped because this is a test row. (“Test row” here means a test work item.)

Skip this step for test work items toggle turned on
Agent chat message when a step is skipped for a test work item

You can use a run condition and the test toggle on the same step. The test skip applies when the work item is a test work item being re-run; the run condition applies to whether the work item’s properties match your condition.

Tip: on a test re-run, the step you start from may still execute; the toggle is most useful for later steps in the plan that should stay quiet under test.

Step Finish Condition

Use this when the step should run, but the workflow should not proceed to the next step until the work item reaches a required state — for example, only proceed when ReviewState is Complete.

This uses the same Add Condition dialog as the run condition. It is a hard stop on automatic proceed (similar in spirit to requiring a human to finish the step). A person can still finish the step manually from the step controls.

Set, edit, or clear a finish condition

  1. Under Step Finish Condition, choose Add Condition.

  2. Build the condition the same way as a run condition, then Save.

Workflow Options with a finish condition

What happens when the agent tries to proceed

When the agent is ready to finish the step and move on:

  • If the work item matches, the workflow can proceed automatically when a human is not required to finish the step. The agent’s conclude message includes: Finished step because finish conditions were met, with a link that opens Workflow Options → Step Finish Condition, plus a short list of how each condition evaluated against the work item’s values.

  • If the work item does not match, the step stays open. The conclude message includes: Did not finish step because finish conditions were not met, with the same link to Step Finish Condition and the same evaluation breakdown. Finish the step manually when ready, or let a later run try again once the data matches.

Add AI checks to a finish condition

Some requirements cannot be written as a column / operator / value condition. For example, an expense workflow expects a receipt in its Receipt file property, but someone uploads a washing-machine manual instead. The file is present, so a condition on the property passes, yet the work item is wrong.

AI checks cover this. Each one is something an AI model must judge true before the step can proceed.

Quickest option — check outputs against their descriptions. Under Step Finish Condition, turn on Check that outputs match their property descriptions. That's it: no dialog. An AI model compares each of the step's output values with its property's type and description. File and image properties are checked by their content, so a manual uploaded where the description says "a PDF of an expense receipt" is caught. This works best when your output properties have clear descriptions.

Your own statements. For anything the descriptions don't say:

  1. Under AI checks, choose Add AI Checks.

  2. Write one statement per line — for example The Receipt is an expense receipt, not some other document.

  3. If a statement is about what a file contains, pick that property under Show the checker these files' content so the model reads the file itself, not just its link.

  4. Choose Save.

Clear removes your statements; it does not turn off the descriptions check, which has its own switch.

AI checks run when the agent tries to finish the step, after any finish condition above. If every check passes, the workflow can proceed as usual. If any check fails, or the model cannot confirm it, the step stays open exactly as it does for an unmet finish condition. The conclude message shows Did not finish step because finish conditions were not met followed by one line per check, for example - AI check "The Receipt is an expense receipt, not some other document" → failed — the document is a washing machine manual.

Things to know:

  • Each AI check costs one AI model call each time the agent tries to finish the step.

  • If the AI model cannot be reached, that check is shown as could not run (not blocking) and does not hold up the work item.

  • Use a regular condition when a rule can say it (for example Total > 0): it is free, instant, and always gives the same answer.

Tips and common mix-ups

  • You can use most work-item columns — you do not need to bind a column as an input for this step first.

  • A Step Run Condition skips the whole step. A tool Availability condition only controls whether that tool is offered while the step still runs.

  • Writing “skip this step if …” or “only proceed when …” in directions asks the AI to decide; Workflow Options decides for you.

  • The run condition is checked when the work item enters the step. The finish condition is checked when the agent tries to finish the step and move on.

  • Writing “only proceed if the document is a receipt” in directions asks the agent to police itself; a finish condition AI check is a separate model check the step cannot skip.

  • Clearing a condition restores the default (every work item runs; the workflow can proceed when this step’s work is done).

Did this answer your question?