Skip to main content

Convert a currency

Stepcurrency-convertcontrol

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

At a glance​

PropertyValue
Step namecurrency-convert
ResourceClusterStep (lumen.ai/v1alpha1)
Palette group, categorycontrol, business
Credits0.5 credits each time it succeeds
Side effectsno
Installation must providenothing

Inputs​

PropertyValue
Needsnothing
Producesfields
Works onitem one document at a time

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.

Outputs​

A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.

OutputType
convertednumber
ratenumber
rateDatedate

Settings​

Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.

SettingTypeDefaultDescription
amountrequiredstring-Amount is the number to convert.minLength 1; maxLength 64
fromrequiredstring"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
torequiredstring"ILS"To currencyone of ILS, USD, EUR, GBP, JPY, CHF, AUD, CAD, DKK, NOK, SEK, ZAR, JOD, EGP, LBP
dateModestring"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
datestring-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

The full JSON Schema of these settings: currency-convert.schema.json.

Example​

Convert 1,250 USD to shekels

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

Use it in a flow​

A node that runs currency-convert goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.

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