# Arguments reference

> Source: https://docs.clonepartner.com/reference/arguments/

Tasks declare typed runtime arguments. Job templates can declare create-time arguments with the same metadata and substitute them into task-node arguments.

## Definition

```yaml
arguments:
  day:
    type: string
    description: Dataset partition
    required: true
    enum: [day1, day2, day3]

  limit:
    type: number
    default: 100

  dry_run:
    type: boolean
    default: true

  issue_keys:
    type: string[]
    default: []
```

## Fields

| Field | Purpose |
|---|---|
| `type` | `string`, `number`, `boolean`, `string[]`, or `number[]` |
| `description` | User-facing help |
| `required` | Reject a missing runtime value |
| `default` | Value used when omitted |
| `enum` | Allowed values |
| `widget` | UI picker hint |

Defaults and enum values must match the declared type.

## UI widgets

### Default

Without `widget`, the UI renders an input appropriate to the type. A string or number with `enum` becomes a fixed choice. Array values can be supplied as JSON arrays or comma-separated input and are coerced to arrays.

### `integrated_account`

```yaml
account_id:
  type: string
  required: true
  widget: integrated_account
  connector_slot: truto
  integration: salesforce
```

The mapped Truto connector supplies a searchable, paged account list. The stored value is the integrated account ID.

### `mongo_collection_record`

```yaml
migration_name:
  type: string
  required: true
  widget: mongo_collection_record
  connector_slot: mongo
  mongo_collection: migration_jobs
  mongo_value_field: name
  mongo_label_field: name
  mongo_description_fields: [tenant_id]
  mongo_search_fields: [name, tenant_id]
  mongo_filter:
    status: active
  mongo_sort:
    updated_at: -1
```

The mapped MongoDB connector pages and searches records. `mongo_value_field` is stored; `mongo_label_field` and description fields are display metadata.

## Runtime access

Read task arguments in JSONata:

```yaml
config: |
  {
    "limit": arguments.limit,
    "dry_run": arguments.dry_run
  }
```

Template placeholders use `${NAME}` while a job is instantiated. A template must explicitly map its argument into each task node that needs it.

## Arguments versus variables

- Arguments are caller-supplied or defaulted runtime values.
- Variables are static authored task values.
- `job_config` is a job setting editable between runs.

Never use any of these fields for credentials. Use connector secrets.

See [Design template arguments](/guides/template-arguments).
