Handoff to Sommatic App
Terminal node: hands a finished workflow's result to a Sommatic AI App.
Terminal handoff: creates a task for a user that carries an app-open descriptor (app slug, route, input, launch mode) and returns the descriptor so the run result can open the app.
How it works
- Resolves the config and merges it over the incoming payload (config wins);
{{ }}ininput_mappingare resolved on the server. - Builds the descriptor:
app_slugfromtarget.app_slug,route_pathfromtarget.route(default/),launch_modefromtarget.launch_mode(defaultcommand-center) andinput_payloadfrominput_mapping(default{}). - Checks
app_slug,organization_id,assigneeandtask_title. - Posts a task with a user assignee, status
queued,sourceworkflowandmetadata.app_handoff_descriptor; the backend claims it for that user.task_typedefaults toreviewandtask_prioritytomedium. - Returns
{ app_handoff_descriptor, task_id, task_title }at the top level throughout, where the run result can pick up the descriptor; opening the task later relaunches the app pre-filled.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-handoff-approval",
"label": "Hand off to approval desk",
"operator_slug": "sommatic.app.handoff",
"operator_version": "1.0.0",
"config": {
"target": {
"app_slug": "sommatic-approval-desk",
"route": "/",
"launch_mode": "command-center"
},
"input_mapping": {
"order_id": "{{ $json.order_id }}",
"amount": "{{ $json.amount }}"
},
"organization_id": "<organization_id>",
"assignee": "[email protected]",
"task_title": "Approve order {{ $json.order_id }}"
}
}{
"ok": true,
"port": "out",
"app_handoff_descriptor": {
"app_slug": "sommatic-approval-desk",
"route_path": "/",
"input_payload": {
"order_id": "ord_123",
"amount": 1250
},
"launch_mode": "command-center"
},
"task_id": "task-xxxxxxxxxxxxxxx",
"task_title": "Approve order ord_123"
}Configuration
-
targetobject Required -
-
app_slugstring Required -
Slug of the Sommatic AI App to hand off to (e.g. my-review-app).
-
routestring Optional -
Route opened inside the app (e.g. /new-sentence). Defaults to /.
-
launch_modestring Optional -
How the app is opened when a live session exists.
-
-
input_mappingobject Optional -
Payload pre-filled into the app, resolved server-side from {{...}} expressions.
-
organization_idstring Required -
Organization that owns the created Task.
-
assigneestring Required -
Identity (email) the Task is assigned to.
-
task_titlestring Required -
Title of the durable HITL Task created for the handoff.
-
task_typeobject Optional -
Task type descriptor. Defaults to review.
-
task_priorityobject Optional -
Task priority descriptor. Defaults to medium.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
task_type - The default object is
{ id: 1, name: "review", title: "Review" }, while the backend catalog listsreviewwith id 12. Settask_typeexplicitly if your inbox filters by id. -
target - Undeclared top-level fallbacks are also read:
app_slug,route,launch_mode,input_payload,title,typeandpriority.
Output ports
out default The task was created. The run is meant to end here; it does not suspend.
{
"port": "out",
"app_handoff_descriptor": {
"app_slug": "sommatic-approval-desk",
"route_path": "/",
"input_payload": {
"order_id": "ord_123",
"amount": 1250
},
"launch_mode": "command-center"
},
"task_id": "task-xxxxxxxxxxxxxxx",
"task_title": "Approve order ord_123"
}error A required field is missing or the backend call failed.
{
"port": "error",
"error": "Missing 'assignee'"
}In expressions
What a later node can read from this node's output with $("Handoff to Sommatic App").item.json.<path> (write your node's label instead of Handoff to Sommatic App). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Handoff to Sommatic App").item.json.app_handoff_descriptor | ||
$("Handoff to Sommatic App").item.json.task_id | ||
$("Handoff to Sommatic App").item.json.task_title | ||
$("Handoff to Sommatic App").item.json.port | — | |
$("Handoff to Sommatic App").item.json.app_handoff_descriptor.app_slug | — | |
$("Handoff to Sommatic App").item.json.app_handoff_descriptor.route_path | — | |
$("Handoff to Sommatic App").item.json.app_handoff_descriptor.input_payload | — | |
$("Handoff to Sommatic App").item.json.app_handoff_descriptor.launch_mode | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Missing 'target.app_slug' | error | No target.app_slug (nor a top-level app_slug). |
Missing 'organization_id' | error | Not in the config nor in the payload. |
Missing 'assignee' | error | The handoff always needs a user identity (email). |
Missing 'task_title' | error | task_title (or title) is empty. |
Backend did not return a task id | error | The backend answered without result.id. |
Request failed with status code <status> | error | The backend rejected the task. |
services.apiManager.uri is not resolved in dependencies.config — check Link Loom Cloud environment config. | error | The orchestrator has no backend address configured. This is a service configuration problem, not a node problem. |
Input contract
-
targetobject Optional -
input_mappingobject Optional -
organization_idstring Optional -
assigneestring Optional -
task_titlestring Optional
Output contract
-
app_handoff_descriptorobject Optional -
task_idstring Optional -
task_titlestring Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "sommatic.app.handoff",
"name": "Handoff to Sommatic App",
"category": "hitl",
"version": "1.0.0",
"description": "Terminal node: hands a finished workflow's result to a Sommatic AI App. Creates a durable HITL Task carrying the open descriptor and, if a live Command Center session is subscribed, opens the app instantly. Symmetric counterpart of sommatic.app.execute (app-as-gate); this is app-as-terminal — the workflow ends and does not resume.",
"capabilities": [
"ui",
"human",
"terminal"
],
"config_schema": {
"type": "object",
"required": [
"target",
"organization_id",
"assignee",
"task_title"
],
"properties": {
"target": {
"type": "object",
"title": "Target App",
"required": [
"app_slug"
],
"properties": {
"app_slug": {
"type": "string",
"title": "App Slug",
"description": "Slug of the Sommatic AI App to hand off to (e.g. my-review-app)."
},
"route": {
"type": "string",
"title": "Route Path",
"description": "Route opened inside the app (e.g. /new-sentence). Defaults to /.",
"default": "/"
},
"launch_mode": {
"type": "string",
"title": "Launch Mode",
"description": "How the app is opened when a live session exists.",
"default": "command-center"
}
}
},
"input_mapping": {
"type": "object",
"title": "Input Payload",
"description": "Payload pre-filled into the app, resolved server-side from {{...}} expressions."
},
"organization_id": {
"type": "string",
"title": "Organization",
"description": "Organization that owns the created Task."
},
"assignee": {
"type": "string",
"title": "Assignee",
"ui_widget": "user_picker",
"description": "Identity (email) the Task is assigned to."
},
"task_title": {
"type": "string",
"title": "Task Title",
"description": "Title of the durable HITL Task created for the handoff."
},
"task_type": {
"type": "object",
"title": "Task Type",
"description": "Task type descriptor. Defaults to review."
},
"task_priority": {
"type": "object",
"title": "Task Priority",
"description": "Task priority descriptor. Defaults to medium."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"target": {
"type": "object"
},
"input_mapping": {
"type": "object"
},
"organization_id": {
"type": "string"
},
"assignee": {
"type": "string"
},
"task_title": {
"type": "string"
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"app_handoff_descriptor": {
"type": "object"
},
"task_id": {
"type": "string"
},
"task_title": {
"type": "string"
}
}
},
"ports": [
{
"port_id": "out",
"label": "Out",
"is_default": true,
"description": "Handoff delivered (Task created; app opened if live session)."
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "sync",
"tags": [
"ui",
"terminal",
"handoff"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"target",
"organization_id",
"assignee",
"task_title"
],
"properties": {
"target": {
"type": "object",
"title": "Target App",
"required": [
"app_slug"
],
"properties": {
"app_slug": {
"type": "string",
"title": "App Slug",
"description": "Slug of the Sommatic AI App to hand off to (e.g. my-review-app)."
},
"route": {
"type": "string",
"title": "Route Path",
"description": "Route opened inside the app (e.g. /new-sentence). Defaults to /.",
"default": "/"
},
"launch_mode": {
"type": "string",
"title": "Launch Mode",
"description": "How the app is opened when a live session exists.",
"default": "command-center"
}
}
},
"input_mapping": {
"type": "object",
"title": "Input Payload",
"description": "Payload pre-filled into the app, resolved server-side from {{...}} expressions."
},
"organization_id": {
"type": "string",
"title": "Organization",
"description": "Organization that owns the created Task."
},
"assignee": {
"type": "string",
"title": "Assignee",
"ui_widget": "user_picker",
"description": "Identity (email) the Task is assigned to."
},
"task_title": {
"type": "string",
"title": "Task Title",
"description": "Title of the durable HITL Task created for the handoff."
},
"task_type": {
"type": "object",
"title": "Task Type",
"description": "Task type descriptor. Defaults to review."
},
"task_priority": {
"type": "object",
"title": "Task Priority",
"description": "Task priority descriptor. Defaults to medium."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"target": {
"type": "object"
},
"input_mapping": {
"type": "object"
},
"organization_id": {
"type": "string"
},
"assignee": {
"type": "string"
},
"task_title": {
"type": "string"
}
}
}{
"type": "object",
"properties": {
"app_handoff_descriptor": {
"type": "object"
},
"task_id": {
"type": "string"
},
"task_title": {
"type": "string"
}
}
}[
{
"port_id": "out",
"label": "Out",
"is_default": true,
"description": "Handoff delivered (Task created; app opened if live session)."
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
uihumanterminal- Tags
uiterminalhandoff
Notes and limits
- It does not suspend or wait: whatever is connected to
outruns right away. Use it as the last node of the run. - The task
context.workflow_instance_idandcontext.trace_idare sent empty: the worker reads them from fields the runtime does not set, so the task is not linked to the run. - Not idempotent: every execution creates a new task. There are no retries on the HTTP call.
- The worker returns its fields at the top level of the envelope, without
data, so the engine uses the whole envelope (including theportkey) as the payload of the next node. - The worker does not set
ok(the example showstrue); the engine routes only byport.
Reviewed against the orchestrator code · 31e874b · 2026-11-26