Data Steps and Contracts
Two steps in the Utilities section of the Agent Library get data into shape before an agent or another system works on it: Prepare cleans records and Map builds the fields the next step expects. Both are run by the platform with plain rules, not by a model: the same input always gives the same output. Any step can also carry a data contract that checks what it is given and what it hands on.
Set them up in the step's Run & test tab. Paths use the same form as every other step setting: {{inputs.<name>}} for a run input and {{steps.<step>.<field>}} for an earlier step's result, by the step's id or its name. A release check names a Prepare or Map step whose settings are incomplete.
Prepare
| Setting | What it does |
|---|---|
| Records to prepare | Where the records are: a list of records from an earlier step (a result holding rows, records, items, value or data is unwrapped), or CSV text with a header row (,, ; or tab). |
| Fields to normalise | Each field and how to read it (below). Fields not listed are kept, with their text trimmed. |
| Remove duplicates by | Field names, comma-separated. Records with the same values in all of them are kept once: the first one. |
| Enrich from a lookup list | A list from an earlier step (for example an HTTP Request that read your system), the field in these records to match, the field in the list to match it to, and which fields to add. |
How a field can be read:
| Read as | What it accepts | Gives |
|---|---|---|
| Text | Anything | The text, trimmed, with runs of spaces made one |
| Number | 1,234.50, $1,234, SGD 1 200, S$ 99.90, (450.00) (negative), 12%. Choose 1.234,50 when the decimal mark is a comma | A number |
| Date | 2026-03-04, 04/03/2026, 4 Mar 2026, March 4, 2026, 20260304, with an optional time. Choose day first (the default), month first or year first for 04/03/2026 | YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS with a time |
| Quantity | 1,200 kg, 3.5 t, 12 in. A bare number is taken to be in the unit you choose | A number in that unit |
| Yes / no | yes, no, y, n, true, false, 1, 0 | true or false |
Quantities convert within one kind only: mass (mg, g, kg, t, lb, oz), length (mm, cm, m, km, in, ft, yd, mi) or volume (ml, cl, l, m3, cbm, gal). An impossible date such as 31/02/2026 is not corrected.
A value that cannot be read becomes empty, and the result lists it under issues with its record number, field and reason, so nothing is guessed. Up to 10,000 records.
The result:
{
"rows": [{ "invoiceNo": "INV-1", "date": "2026-03-04", "amount": 1200, "name": "Acme Pte Ltd" }],
"count": 1,
"removedDuplicates": 1,
"enriched": 1,
"unmatched": 0,
"issues": [],
"summary": "Prepared 1 record, removed 1 duplicate(s), 1 enriched, 0 with no match."
}Later steps read {{steps.<step>.rows}}. Enrichment adds a field only where the record's own value is empty, and enriched and unmatched appear only when a lookup list is set.
Map
Each output field has a name (a dotted path such as invoice.total builds nested fields), where its value comes from, and optionally:
| Option | What it does |
|---|---|
| Transform | Text, Number or Date (read as in Prepare), Yes / no, Join a list (with a separator, , by default) or Pick from a list (first, last, a position, or a field name taken from each item) |
| Default | Used when the value is missing or cannot be read |
| Required | The step fails, naming the field, when there is still no value |
Set For each record in to a list ({{steps.<step>.rows}}) to build one output per record; the fields then read item.<field>. Up to 200 fields and 10,000 records.
Later steps read {{steps.<step>.value.<field>}} (one object) or {{steps.<step>.value}} (the list). Values that could not be read are listed under issues.
Records
A Records step reads your organisation's business records from the systems you have connected and hands the ones that match to the next step. It reads through the Object Graph, so the same record held in two systems arrives as one record.
| Setting | What it does |
|---|---|
| What to read | Party, Invoice, Bill, Payment, Order, Shipment, Ticket or Document |
| Only the records where | Filters: a field, a comparison and a value. Every filter must hold. Up to 10 |
| Records to hand on | 1 to 200 (50 unless you change it). The result says how many matched in all |
Filters are applied by the platform, not by a model. A number is compared as a number, a date as a date (write it as 2026-11-30, or the word today), anything else as text without regard to case. A record that lacks the field matches only is empty and is not. A value can use a placeholder such as {{inputs.<name>}}.
For overdue invoices: dueDate is less than today, and amountDue is more than 0.
The step hands on records, each with its field values, _sources (the systems it came from) and _conflicts (fields on which those systems disagree), plus matched and found.
- It reads what the run's owner can read through their own connections, and never changes anything.
- Records a site agent keeps on your network are not read; the result says they were left there.
- If one system could not be read, the result is marked
incompleteand names it. If none could be read, the step fails and can be retried, so an empty answer is never mistaken for "there are none".
Memory
A Memory step keeps a value from one run and reads it back in a later one, for example the last invoice number processed or a running list of flagged vendors.
| Setting | What it does |
|---|---|
| What this step does | Read, Remember (replace the value), Add to a list or Forget |
| Name | The name the value is kept under: lowercase letters, digits, dot, dash or underscore |
| Value to remember | Text with placeholders such as {{steps.<step>.<field>}}. A single placeholder keeps its shape |
| Items to keep | For Add to a list: the newest items kept, 1 to 200 (20 unless you change it) |
| Remembered for | This workflow only, All my workflows or My whole organisation |
A Read step hands on found, and value when there is one. With This workflow only or All my workflows, memory belongs to the person whose run it is: a scheduled or triggered run is its workflow owner's. It is not shared between people. My whole organisation is one value per name for the organisation: every member's runs read and write the same value, and a run that does not belong to an organisation cannot use it and fails with a message saying so. A value can be up to 32,000 characters. A rehearsal does not write, and under No-Retention Mode nothing is kept and nothing is read; the step says so in its result. See and clear what is remembered in the Vault, under Memory.
Data contracts
Every step's Run & test tab has Data contract (optional): an Input schema and an Output schema, each a JSON Schema (draft-07). Leave both empty and the step is not checked, as before.
- Input is checked before the step runs. For a first step it is the run inputs. For a step with one step before it, it is that step's result. With several, it is each result under its step's name in lower case with underscores (
Read Invoicebecomesread_invoice). - Output is checked after the step runs, against its result as later steps see it. A Code or Map step's result is
{ "value": … }, so describevaluein its schema.
A value that does not match stops the step. It is marked failed, and the run report names each field and what was wrong with it, for example:
"Check invoice" failed its data check on its input: "total" is missing; "invoiceNo" should be text, not a number. The step did not run.
The step's When this step fails setting then applies as for any other failure, and a failed check is never retried. A schema whose text cannot be read is caught by the release check. Simulated runs are not checked.
Example input schema for a step that needs an invoice number and a total:
{
"type": "object",
"required": ["invoiceNo", "total"],
"properties": {
"invoiceNo": { "type": "string" },
"total": { "type": "number", "minimum": 0 },
"dueDate": { "type": "string", "format": "date" }
}
}