Skip to main content
In Configure statuses in a case template, you shaped child statuses so the lifecycle matches your process. This guide adds automatic transitions: when watched data or steps satisfy a condition, Penbox can move the case into the right status without someone clicking through each change. You will configure both kinds of triggers on one template: a transition when a step reaches completed, and another when a data schema field is defined. The example uses Collect info about new employee; swap step identifiers and data.* paths for your own template. Auto-transition conditions are Penscript-powered. The JSON you put under condition is evaluated with the same Penscript engine as everywhere else in Penbox: you can use any Penscript function, operator, or pattern the language supports (not only the :eval / :defined examples below). When in doubt, start with Penscript, How Penscript works, and the Penscript reference.

What you’ll build

When you finish, your case template will:
  • Open Statuses in Case settings and attach auto-transition conditions to specific child statuses
  • Use watch so the engine knows which data keys or steps to observe
  • Use condition with :eval (expression) or :defined (field present) — and extend with full Penscript where you need richer logic
  • Be ready for running cases whose status stays aligned with form completion and captured fields — after you click Save
Estimated time: 10–15 minutes
1

Open your case template

Go to TemplatesCases, then open the case template you want to automate (for example Collect info about new employee).
Case Templates table listing templates by name, created date, and default owner
2

Open Case settings and Statuses

In Template Edition, click the settings (gear) icon in the upper-right corner.
Case template editor header with settings gear highlighted
In Case settings, under Case lifecycle, select Statuses.
Case settings with Statuses selected and parent statuses Draft through Cancelled
3

Choose the status and understand the condition shape

Click the child status that should be reached automatically when your condition becomes true (for example a custom In Progress child such as Info collected from the new employee, or Closed).In the panel, find Auto-transition condition (optional). Every condition uses the same overall shape:
  1. watch — an array of paths to observe. Use data.… paths for schema values (for example data.bank_name) or steps.… for a step in this template (for example steps.mail-new-employee-1).
  2. condition — rules that must hold for the transition to run. Common patterns include :eval with an expression (often on step state) and :defined to require that a data field has a value. Everything here is Penscript: the same functions and syntax as in flows, templates, and the rest of the docs apply.
See Penscript for variables, logic, dates, arrays, and the full reference — use them inside condition the same way you would in any other expression field.
Child status selected under In Progress with Label and Auto-transition condition fields
Replace steps.mail-new-employee-1 with the technical id of your step (as it appears in the template). Replace data.bank_name with your data schema path.
4

Transition when a step is completed (form finished)

For the status Info collected from the new employee, transition when the first onboarding step has finished — for example when an email + form step reaches completed (the new employee submitted the form).Paste a payload like this into Auto-transition condition (optional):
{
  "watch": [
    "steps.mail-new-employee-1"
  ],
  "condition": {
    ":eval": "{{steps.mail-new-employee-1.status == 'completed'}}"
  }
}
Auto-transition editor watching a mail step with condition on step status
5

Transition when a data field is set

For the Closed status (or any status you choose), transition when bank name is present in case data — for example after Penbox Intelligence extraction or manual entry fills data.bank_name.Select the Closed child (or your target status), then use:
{
  "watch": [
    "data.bank_name"
  ],
  "condition": {
    ":defined": "{data.bank_name}"
  }
}
Closed child status with Auto-transition watching data.bank_name
Click Save on the Statuses screen when both conditions are in place and correct for your template.

Step status values (quick reference)

Mail and mail+form steps expose different status strings. Use the values below when you write :eval conditions that compare your step path (for example steps.mail-new-employee-1.status) to the right value. Mail (email only)
Stagestatus value
Mail not sentpending
Mail sentexecuted
Mail + form (email with a form)
Stagestatus value
Form sentpending
Form openedongoing
Form completedcompleted

You’re done

Your case template can now advance statuses automatically from step progress and from data appearing on the case. Running cases stay closer to reality without extra manual clicks, as long as watch lists everything that should trigger a re-check and condition matches what you intend.

What’s next?

Configure statuses

Add or rename child statuses if you have not already.

Penscript

Expression language for conditions — functions, variables, and reference.

Case automations

Explore broader automation options for cases.

Statuses and lifecycle

Read how parent and child statuses work in Penbox.

Run your first case

Validate behavior on a live case.