# Input Access

> The same input in item form: the current item and the list of items.

Source: https://docs.sommatic.ai/en/expressions/reference/input-access/

Each example was run against the deployed expression engine over the [example context](#example-context) at the end of the page.

## `$input.item`

Property · `{ json, binary }` · Source: `Sommatic AI expression engine`

```javascript
$input.item
```

The input of the current node in item form: `json` is the same object as `$json` and `binary` is `$binary` (always `{}`). Useful when an expression is written in the item style of other tools.

### Examples

```javascript
{{ $input.item.json.body.order_id }}
```

Result (string):

```json
"ord_1042"
```

```javascript
{{ Object.keys($input.item) }}
```

Result (list):

```json
[
  "json",
  "binary"
]
```

### Notes

- Inside a `code.js` node, `$input` is a different thing: the input object itself, without the `{ json }` wrapper. See [code nodes](https://docs.sommatic.ai/en/expressions/code-nodes/).

In JSONata: `$$input.item.json.body.order_id`

## `$input.all()`

Function · `list` · Source: `Sommatic AI expression engine`

```javascript
$input.all()
```

Returns the input items as a list of `{ json, binary }`. A node handles one item per execution, so the list always has exactly one element: `$input.all()[0].json` is `$json`. To work with the elements of a list in the data, use the list itself (`$json.body.items`).

### Examples

```javascript
{{ $input.all().length }}
```

Result (number):

```json
1
```

```javascript
{{ $input.all()[0].json.body.email }}
```

Result (string):

```json
"ana.perez@example.com"
```

In JSONata: Functions cannot be called from JSONata; read `$$input.item.json` instead.

## `$input.first()`

Function · `{ json, binary }` · Source: `Sommatic AI expression engine`

```javascript
$input.first()
```

Returns the first input item, `{ json, binary }`: the current item, since there is only one. Equivalent to `$input.all()[0]` and to `$input.item`.

### Examples

```javascript
{{ $input.first().json.body.customer.name }}
```

Result (string):

```json
"Ana Pérez"
```

In JSONata: Functions cannot be called from JSONata; read `$$input.item.json` instead.

## `$input.last()`

Function · `{ json, binary }` · Source: `Sommatic AI expression engine`

```javascript
$input.last()
```

Returns the last input item, `{ json, binary }`: the current item, since there is only one.

### Examples

```javascript
{{ $input.last().json.body.order_id }}
```

Result (string):

```json
"ord_1042"
```

In JSONata: Functions cannot be called from JSONata; read `$$input.item.json` instead.

## `$input.params`

Property · `object` · Reserved · Source: `Sommatic AI expression engine`

> **Reserved.** Not filled by the engine: today it is always `{}`.

```javascript
$input.params
```

Meant to expose the configuration parameters of the node that produced the input. The engine does not pass them: it is always an empty object. To reuse a value from an earlier node's configuration, have that node return it in its output, or repeat it.

### Examples

```javascript
{{ $input.params }}
```

Result (object):

```json
{}
```

In JSONata: `$$input.params`

## `$input.context`

Property · `object` · Reserved · Source: `Sommatic AI expression engine`

> **Reserved.** Not filled by the engine: today it is always `{}`.

```javascript
$input.context
```

Meant to carry context data from the node that produced the input. The engine does not fill it: it is always an empty object. Data that must travel between nodes goes in their output, read with `$json` or `$('…')`.

### Examples

```javascript
{{ $input.context }}
```

Result (object):

```json
{}
```

In JSONata: `$$input.context`

## Example context

The examples run over this data: the input of the current node (`$json`), the nodes that already ran (`$(…)`), the ids of the run and the current node. The clock is fixed at `2026-11-26T14:30:00.000Z` and the server zone is UTC, so `$now` and `$today` give the same values on every page.

```json
{
  "$json": {
    "body": {
      "order_id": "ord_1042",
      "email": "ana.perez@example.com",
      "customer": {
        "name": "Ana Pérez",
        "segment": "gold"
      },
      "priority": "",
      "items": [
        {
          "sku": "A-100",
          "qty": 2,
          "price": 10.5
        },
        {
          "sku": "B-200",
          "qty": 0,
          "price": 4
        },
        {
          "sku": "C-300",
          "qty": 1,
          "price": 25
        }
      ],
      "tags": [
        "new",
        "web",
        "new"
      ],
      "created_at": "2026-11-25T09:15:00Z"
    },
    "headers": {
      "content-type": "application/json"
    },
    "query": {},
    "method": "POST"
  },
  "nodes": {
    "Webhook Receiver": "= $json",
    "Normalize input": {
      "correlation_id": "c-7f3a",
      "channel": "web"
    },
    "Classify": {
      "label": "billing",
      "confidence": 0.92
    }
  },
  "run": {
    "$flow_instance_result_id": "fir-xxxx",
    "$flow_instance_id": "fi-xxxx",
    "$flow_definition_id": "fd-xxxx",
    "$flow_version_id": "fv-xxxx",
    "$flow_slug": "order-intake"
  },
  "node": {
    "node_id": "node-notify",
    "label": "Notify customer"
  }
}
```

The examples of a chained workflow run over a second context: a workflow started by `workflow.chain`, whose `workflow.trigger` node is labelled `Chain Entry Point`.

```json
{
  "$json": {
    "order_id": "ord_1042",
    "customer_email": "ana.perez@example.com",
    "amount": 46,
    "chain_context": {
      "caller_flow_definition_id": "fd-caller-xxxx",
      "caller_flow_instance_id": "fi-caller-xxxx",
      "caller_flow_slug": "order-intake",
      "caller_node_id": "node-chain-billing",
      "correlation_id": "chain-7Hq2Lw9sKd3pXa1mZr4t",
      "root_flow_instance_result_id": "fir-root-xxxx"
    }
  },
  "run": {
    "$flow_instance_result_id": "fir-hop-xxxx",
    "$flow_instance_id": "fi-hop-xxxx",
    "$flow_definition_id": "fd-billing-xxxx",
    "$flow_version_id": "fv-billing-xxxx",
    "$flow_slug": "billing-review",
    "$input": {
      "data": {
        "order_id": "ord_1042",
        "customer_email": "ana.perez@example.com",
        "amount": 46
      },
      "chain_context": {
        "caller_flow_definition_id": "fd-caller-xxxx",
        "caller_flow_instance_id": "fi-caller-xxxx",
        "caller_flow_slug": "order-intake",
        "caller_node_id": "node-chain-billing",
        "correlation_id": "chain-7Hq2Lw9sKd3pXa1mZr4t",
        "root_flow_instance_result_id": "fir-root-xxxx"
      }
    }
  },
  "node": {
    "node_id": "node-create-task",
    "label": "Create review task"
  }
}
```

Examples run against the orchestrator at commit 31e874b.
