# Variable filters, conditionals & safer substitution

Source: https://www.jawsdeploy.net/changelog/variable-filters-and-substitution-modes

Transform deployment variables where they are used, conditionally render configuration, and adopt the new syntax per workspace without changing existing deployments on upgrade.

## What's new

Deployment variables can now be transformed directly inside their `#{...}` references. Extended syntax adds 18 chainable filters for case conversion, trimming, regular-expression replacement, substrings, truncation, number and date formatting, base64, JSON/XML/HTML/URI escaping, and comparisons.

Extended workspaces can also render `if`, `unless`, and `else` blocks. Conditions support truthy values, equality and inequality, filtered expressions, multiline bodies, and nesting.

### Compatibility by workspace

Every workspace now has a substitution syntax setting. Existing workspaces are pinned to **Legacy**, reproducing the original plain-token behavior. New workspaces default to **Extended** unless the creator chooses Legacy in the UI, through `POST /api/workspace`, or through MCP `create_workspace`.

A second setting controls unresolved tokens. **Silent** keeps the old behavior. **Warn** leaves the token in place and records it in the deployment log. **Strict** stops the deployment before an unresolved value is used. A safe rollout is therefore Legacy → Warn → Extended → Strict.

Current agents apply the same syntax and unresolved-token policy when replacing variables inside package files. If an Extended step can replace package-file variables but its target agent is too old, Jaws blocks the step with an update instruction rather than allowing literal filter syntax into deployed configuration.

### Step-template details over REST

The Infrastructure REST API adds [Get step template details](https://www.jawsdeploy.net/rest-api/step-templates-details): `GET /api/step-template/details`. Supply a workspace and either the template ID or its name to retrieve the complete definition, including the version, script language, supported run modes, script body, and JSON property schema. The existing list endpoint continues to return the smaller discovery shape.

The workspace creation endpoint now accepts and returns `variableSyntaxMode`; omission means Extended.

See [Using Variable Filters & Substitution Modes](https://www.jawsdeploy.net/guides/variable-filters-and-modes) for the complete filter reference, conditional syntax, error behavior, agent notes, and migration checklist.

