SmartFields
SmartFields are named placeholders you drop into a step configuration, and AutoFlow resolves them when the step runs. A token like {{customer.no}} reads the customer's number out of the flow's context just before the step runs; the step itself sees the resolved text. They are how a Decision compares values from an upstream step, how an Insert Record fills field values, how a Sleep step picks its duration, and how an HTTP Request composes a URL or body.
Two concepts cover most of what you need to know:
- A SmartField has a type. A value SmartField resolves to a piece of text (a name, a number, a date). A reference SmartField resolves to a record – useful for downstream steps that need to operate on the record itself, like Modify Record or Delete Record.
- References can be drilled into. Once you point a SmartField at a record, you can pick a field on that record (
{{customer.name}}), or – if that field also references another table – drill further ({{customer.salesperson.email}}). The picker walks the chain for you.
Where the SmartFields actually come from depends on the flow:
- The trigger registers SmartFields when it fires (a webhook trigger, for example, exposes the parsed payload).
- Each step registers its outputs as SmartFields under the step's name (
parser.amount,httpRequest.responseBody,findRecords.results). - The flow's own SmartField definitions (the Edit SmartFields dialog, see below) declare additional fields that are computed from the flow's records – typically reference SmartFields onto Business Central tables like Customer or Item.
The step slug
The step's name in {{slug_field}} is the step's slug – a short, lower-kebab identifier auto-generated from the step description when the step is first inserted (Send Email → send-email, then send-email-1 if the slug is already taken). The slug is purely an internal identifier; it never appears while the flow is running.
Each step's configuration page exposes the slug as a plain field directly under the step description, so you can rename it whenever the auto-generated name is awkward. The constraints are: no underscores (the parser splits on the first _), at most 15 characters, and it must be unique within the flow. When you rename a slug, every {{old-slug_*}} reference inside the flow definition is rewritten in place – downstream steps keep working without any manual fix-up.
This page walks through the two surfaces you use to manage and reference SmartFields:
- The Edit SmartFields dialog, opened from a flow card or version, where you author the flow's own SmartField definitions.
- The SmartField picker, opened with the assist-edit (...) button on any SmartField-friendly field on a step configuration page, where you pick an existing SmartField to insert into your input.
Edit SmartFields (from the flow card)
Open a flow and click Edit SmartFields in the action bar. The dialog is also available from a flow version page when you want to inspect the SmartFields stored on that specific version.
The action operates on the flow's draft version. If the flow is currently Published, AutoFlow first creates a draft from the published version and edits the draft – exactly the same convention as the flow editor itself. The published version stays untouched until you publish the draft.
What the dialog shows
The dialog opens on the SmartField Sets list. Each row is one Business Central table for which the flow defines SmartFields.
| Column | Meaning |
|---|---|
| Table No. | The underlying object id of the BC table. Hidden by default – use it if the table caption alone is ambiguous. |
| Caption | The table's caption, for example Customer or Sales Header. The drill-down opens the Set's card. |
| SmartFields | How many SmartFields are registered for this table. The drill-down opens the Set's card. |
To add a new Set, type into the empty row at the bottom of the list, pick a table from the assist-edit on the Table field, and save. The Set is created on the flow's draft definition; it is not stored anywhere outside the flow.
Inside a Set: SmartField definitions
Open a Set (drill-down on either the Caption or SmartFields column) to land on the SmartField Set card. The card has two parts:
- A General group at the top showing the table this Set is bound to.
- A SmartFields list part underneath, where each row is one SmartField definition.
For each definition you fill in:
- SmartField Name – the token name. This is what you write inside
{{ }}later. Names are scoped to the Set, so two different tables can both have anameSmartField without colliding. - Type – Value (resolves to a piece of text) or Reference (resolves to a record).
- Caption – read-only summary of what the field resolves to. Drill down on this column to pick:
- For a Value field: the BC field on the Set's table whose content the SmartField returns. The picker is the standard Fields Lookup.
- For a Reference field: the BC table that the SmartField points to, plus the filters used to look up the right record when the flow runs (see below).
The Format String column on a Value definition is optional and lets you control how the resolved value is rendered (BC's standard format strings – useful for dates and decimals).
Format suffix on a placeholder
You can also pin the format on a per-use basis without changing the definition. Append ;<format> to the placeholder:
{{order.posted;9}}– numeric short-form (9is BC's predefined ISO date/datetime format).{{order.posted;<Year4>-<Month,2>-<Day,2>}}– BC's text format strings, in full.
The inline suffix wins over the SmartField's per-definition Format String.
For binary SmartFields (BLOB, Media, MediaSet, Media Reference), three tokens are available:
| Suffix | What you get |
|---|---|
;base64 | The raw bytes as a base64 string. Also the default if you omit the suffix — {{invoice.attachment}} inside a JSON envelope renders as base64. |
;utf8 | The bytes interpreted as UTF-8 text. Use when the source field holds text bytes (a stored XML, JSON, or plain-text file). |
;utf16 | The bytes interpreted as UTF-16 text. |
A bare {{field}} body on the HTTP Request step is special — see the HTTP Request page for raw-bytes upload mode.
Reference filters
A Reference SmartField does not just name a target table – it also has to describe which row of that table to return. You configure that on the Table Lookup card that opens when you drill the Caption column of a Reference field.
The card has:
- Ref. Table – the table the reference points to. Drill down to pick.
- Filters – a list part where each row is one filter that narrows down the target table.
Each filter row has a Field (a column on the referenced table), a Lookup Type, and either a Lookup Text or a Lookup Field:
- Const – the filter value is the literal text in Lookup Text. Use this for fixed values:
Type = Item,Blocked = ''. - Field – the filter value is read from a field on the parent table (the Set's table) when the flow runs. The drill-down on Lookup Field picks that field.
- Filter – the filter value is a free-form filter expression in Lookup Text. Use this for ranges (
>=01.01.2026), wildcards (@ABC*), or any other BC filter syntax.
Together, these filters tell AutoFlow how to find the referenced record from the parent record when the flow runs – for example, "the Customer whose No. equals the Sales Header's Sell-to Customer No.".
Save
The dialog is modal: when you close it, the SmartField definitions are written back to the flow's draft version in one transaction. There is no separate Save button – closing is the commit. AutoFlow uses the new definitions the next time the draft runs.
The SmartField picker (from a step config page)
Many step configuration pages have one or more fields that accept SmartFields – the URL on an HTTP Request, the input on a Parser, the condition on a Decision, the reference on a Modify or Delete Record, the duration on a Sleep, the message on an Error step, and so on. On every such field, the assist-edit (...) button opens the SmartField picker.
The picker shows the full set of SmartFields available at the position of the step – that is, everything the trigger and every upstream step have registered, plus the flow's own SmartField definitions for any tables those upstreams reference.
Browsing the list
The dialog renders a flat list at first – each row is one SmartField with its name and type:
| Column | Meaning |
|---|---|
| Variable Name | The bare token (customer, responseBody, parser_amount). |
| Table | For reference fields, the BC table the reference resolves to. Empty for value fields. |
Use the Filter box at the top of the picker to narrow the list down by typing – handy when an upstream registers dozens of outputs.
Drilling into a reference
A reference SmartField is browsable. Click into it and the list switches to the fields you can read from that reference – that is, the value and reference SmartFields the flow has registered on that table. From a Reference, you can:
- Pick a value field – the picker returns a chained token like
customer.name. - Drill into another reference – keep walking the chain (
customer.salesperson.email). - Pick the reference itself – use the Select Reference Itself action when you want the record, not a field on it. That is the right choice when filling the Reference input of a Modify Record / Delete Record / PDF Print step.
The breadcrumb above the list shows the path you've drilled into so far. Use Back to step out one level.
Adding a SmartField on the fly
When you are deep in a reference and notice that the field you want is not registered yet, the picker has a + SmartField action that opens the SmartField Set card for the table you are currently browsing. Add the new definition there, close the card, and the picker refreshes – your new SmartField is now part of the list and can be picked like any other.
At the root level (no reference selected), + SmartField opens the full SmartField Sets list – the same view you reach via Edit SmartFields from the flow card. Use this when you need to register a brand-new table.
Confirming a pick
When you have the SmartField you want highlighted, click Copy & Close. The picker:
- Closes the dialog.
- Copies the chosen placeholder onto the OS clipboard, already wrapped in
{{ }}where appropriate.
You then paste (Ctrl+V) into the field that triggered the picker. AutoFlow does this round-trip via the clipboard rather than writing into the field directly so that the picker is non-destructive – you can compose a longer expression by pasting the token in the middle of existing text without overwriting anything.
A handful of fields take a SmartField selector rather than a token – for example, the For Each Loop's Selector, the Parser's record reference, or the PDF Print's Reference. The wire form is the same picker output ({{name}}) used everywhere else; just paste the placeholder as-is. The step's resolver decides whether to substitute the placeholder (for scalar values) or pass it through verbatim to the consuming step (for references, arrays, and unresolvable names) – see the field's tooltip on the configuration card for the expected shape.
When to use which surface
- You want to pick an existing SmartField for a step input → open the picker from the assist-edit (...) on that input.
- You want to add or change the SmartFields the flow exposes for one of its tables → use Edit SmartFields on the flow card. You can also reach the same editor from the picker via + SmartField, which is convenient mid-configuration.
- You want to inspect or edit the SmartFields stored on a specific version → open the flow version and click Edit SmartFields. The dialog operates on that version directly – there is no draft-spawning here, so be deliberate when the version you opened is the published one.