Documentation Index
Fetch the complete documentation index at: https://docs.cloudcruise.com/llms.txt
Use this file to discover all available pages before exploring further.
The Transform node runs operations that read from and write to the session context. Use it for data shaping, cleanup, combining fields, accumulating results across a loop, or execution-state updates.
Each operation has a type, a target dot-path under context.*, and (for non-DELETE ops) a value that is a raw JSONata expression. Operations in the same node run top-to-bottom and each one sees the writes of the ones before it.
The value field is raw JSONata, not a template. Do not wrap it in {{...}} — reference variables directly (e.g. context.inputs.email ~> $trim, not {{context.inputs.email}} ~> $trim).
Parameters
| Parameter | Type | Required | Description |
|---|
operations | array | Yes | Ordered list of operations, each { type, target, value? } |
Operation Fields
| Field | Type | Required | Description |
|---|
type | string | Yes | One of SET, DELETE, MERGE, APPEND |
target | string | Yes | Dot-path under context.* where the result is written. Missing intermediate objects are auto-created |
value | string | Yes (except DELETE) | Raw JSONata expression evaluated against the session context |
Operation Types
| Type | Semantics |
|---|
SET | Assign the evaluated value to target, creating the path if it doesn’t exist |
DELETE | Remove the value at target. value is ignored |
MERGE | Evaluate value (must be an object) and shallow-merge it into the object at target |
APPEND | Evaluate value and push it onto the array at target (creates the array if missing). Fails if target exists and isn’t an array |
Examples
Clean up an email before typing it into a form:
{
"id": "abc123",
"name": "Normalize email",
"action": "TRANSFORM",
"parameters": {
"operations": [
{
"type": "SET",
"target": "context.email_clean",
"value": "context.inputs.email ~> $trim ~> $lowercase"
}
]
}
}
Reference it downstream with {{context.email_clean}}.
Combine Fields
Derive a full name from two inputs:
{
"id": "abc123",
"name": "Build full name",
"action": "TRANSFORM",
"parameters": {
"operations": [
{
"type": "SET",
"target": "context.full_name",
"value": "context.inputs.first & ' ' & context.inputs.last"
}
]
}
}
Accumulate Loop Results
Inside a loop body, append processed items into an array:
{
"id": "abc123",
"name": "Collect order summary",
"action": "TRANSFORM",
"parameters": {
"operations": [
{
"type": "APPEND",
"target": "context.collected_orders",
"value": "{'id': context.runtime.current_order.id, 'total': $number(context.runtime.current_order.amount)}"
}
]
}
}
Add metadata to a record that was extracted earlier:
{
"id": "abc123",
"name": "Tag with source",
"action": "TRANSFORM",
"parameters": {
"operations": [
{
"type": "MERGE",
"target": "context.extracted_profile",
"value": "{'extracted_at': $now(), 'source': 'crm'}"
}
]
}
}
Clean Up Before End
Drop scratch paths so they don’t show up in the webhook payload:
{
"id": "abc123",
"name": "Clean scratch",
"action": "TRANSFORM",
"parameters": {
"operations": [
{ "type": "DELETE", "target": "context.internal_scratch" },
{ "type": "DELETE", "target": "context.tmp_html" }
]
}
}
Notes
- Targets must start with
context.. Anything else is rejected by validation because downstream nodes can’t read it.
- Later operations in the same node see earlier writes, so you can derive values in stages within one Transform.