# Convert a currency

> Converts an amount at the Bank of Israel's representative rate for the day. A weekend or a holiday uses the last published rate.

Source: https://docs.go-lumen.ai/de/reference/steps/currency-convert

## Auf einen Blick

| Eigenschaft | Wert |
| --- | --- |
| **Schrittname** | `currency-convert` |
| **Ressource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palettengruppe, Kategorie** | control, business |
| **Credits** | **0.5** Credits bei jedem Erfolg |
| **Externe Wirkung** | nein |
| **Die Installation muss bereitstellen** | nichts |

## Eingaben

| Eigenschaft | Wert |
| --- | --- |
| **Braucht** | nichts |
| **Liefert** | `fields` |
| **Arbeitet auf** | item: einem Dokument nach dem anderen |

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe [Dokumente und Daten](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#documents-and-data).

## Ausgaben

Ein späterer Knoten verweist auf eine Ausgabe als `{nodeId.field}` in einem Text oder als `nodeId.field` in einer Bedingung.

| Ausgabe | Typ |
| --- | --- |
| `converted` | number |
| `rate` | number |
| `rateDate` | date |

## Einstellungen

Wird unter `config:` im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie `{nodeId.field}` enthalten.

| Einstellung | Typ | Standardwert | Beschreibung |
| --- | --- | --- | --- |
| `amount` (erforderlich) | string |  | Amount is the number to convert. (minLength 1; maxLength 64) |
| `from` (erforderlich) | string | `"USD"` | From and To are ISO 4217 codes: ILS or one the Bank of Israel publishes a rate for (fx.Currencies; a test keeps the lists in step). (one of ILS, USD, EUR, GBP, JPY, CHF, AUD, CAD, DKK, NOK, SEK, ZAR, JOD, EGP, LBP) |
| `to` (erforderlich) | string | `"ILS"` | To currency (one of ILS, USD, EUR, GBP, JPY, CHF, AUD, CAD, DKK, NOK, SEK, ZAR, JOD, EGP, LBP) |
| `dateMode` | string | `"latest"` | DateMode says which day the rate is of: latest (the default), date (the day in Date) or field (a day an earlier step found, a placeholder in Date). Left out it follows Date as before: empty is the latest, else the day Date names. (one of latest, date, field) |
| `date` | string |  | Date is the day of the rate, YYYY-MM-DD, or a placeholder for one. A day with no rate (a weekend, a holiday) takes the last one published before it. (maxLength 32) |

Das vollständige JSON Schema dieser Einstellungen: [currency-convert.schema.json](https://docs.go-lumen.ai/schemas/steps/currency-convert.schema.json).

## Beispiel

```yaml title="config"
amount: '{amount}'
date: "2026-10-01"
dateMode: date
from: USD
to: ILS
```

## Im Flow verwenden

Ein Knoten, der `currency-convert` ausführt, steht unter `spec.nodes` eines [Flow](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#the-flow-as-yaml). Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: currency-convert-example
  namespace: tenant-acme
spec:
  displayName: "Convert a currency"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [currency-convert]
  nodes:
    - id: currency-convert
      stepRef: {name: currency-convert}
      config:
        amount: '{amount}'
        date: "2026-10-01"
        dateMode: date
        from: USD
        to: ILS
```
