Transformation Step

Manipulate and derive new data fields in RiskOS™ workflows using stateless Transformation functions like CONCAT, SPLIT, and more.

The Transformation step in RiskOS™ lets you manipulate data within a workflow using a set of predefined, stateless functions. Transformations do not maintain state; they operate only on the data provided as inputs at the time of execution.

For example, you can use the CONCAT function to combine firstName and surName into a single fullName variable. That new variable becomes immediately available to downstream steps, simplifying logic and reducing duplication.


How transformations work

Each transformation is a predefined, stateless operation: given the same inputs, it always produces the same output, and it keeps no memory between runs. A Transformation step has three parts:

  • Inputs — You supply each input as either a Value (a static string or number) or a Variable (a payload field or the output of an earlier step). The step passes inputs to the function in the order listed for that function, so order matters.
  • Output — The function returns a single typed value: a string, number, Boolean, array, or — for pass-through functions such as COPY — any type. RiskOS™ stores that value in the output field you name, which downstream steps reference as $outputFieldName.
  • Type handling — In general, if an input is missing or is not the type a function expects, the function returns a safe default rather than failing the workflow: string functions return an empty string, numeric functions return 0, and Boolean functions return false.

Placement in a workflow

  • A Transformation step can be placed anywhere in a workflow, depending on your logic.
  • Common patterns include:
    • Right after the Input step to normalize incoming data.
    • Before a Condition step to prepare data for evaluation.
    • After an Enrichment step to parse out specific data.

Configure a Transformation step

  1. Add the Transformation step to your workflow, then click the step to open the side panel.

  2. Select a Function from the dropdown (see the Available functions section).


  1. Provide input parameters for the function:
    • Value: For static values (e.g., strings, numbers).
    • Variable: For dynamic inputs, such as payload fields or outputs from prior steps.
  2. Specify the output field name.
    • The function’s result is stored in this field.
    • Use it later with $[output_field_name].
    • Example: If you name the output field fullName, reference it downstream as $fullName.
📘

Note:

You can customize the Transformation step’s label by editing the text field at the top of the side panel.


Available functions

📘

Note:

This catalog lists supported stateless functions. Check release notes regularly to confirm the latest set of functions available in your environment.

Each row lists a function's inputs, output type, how it works, and a worked example (shown as inputs → output).

String functions

TransformationInputOutputHow it worksExample
STARTSWITHString + substringBooleanReturns true if the string begins with the substring. Leading whitespace in the string is ignored."hello world", "hello"true
ENDSWITHString + substringBooleanReturns true if the string ends with the substring. Trailing whitespace is ignored."hello world", "world"true
LENGTHStringNumericReturns the number of characters in the string."Socure"6
CONTAINSString + substringBooleanReturns true if the substring appears anywhere in the string."Socure", "cur"true
TO_LOWER_CASEStringStringConverts every character in the string to lowercase."SOCURE""socure"
CONCATMultiple stringsStringJoins the input strings, in order, into a single string."123 ", "Main St""123 Main St"
SPLITString + separatorArraySplits the string into an array of substrings wherever the separator occurs."a,b,c", ","["a", "b", "c"]
FIRST_NString + numeric valueStringReturns the first n characters of the string."Socure", 3"Soc"
REVERSEStringStringReturns the string with its characters in reverse order."abc""cba"
JARO_WINKLER_DISTANCETwo stringsNumericReturns a similarity score from 0 (no similarity) to 1 (identical) using the Jaro-Winkler algorithm. Does not normalize the inputs, so case and word order affect the score."martha", "marhta" → score close to 1
SIAMESE_JARO_WINKLER_DISTANCETwo stringsNumericSame 01 Jaro-Winkler score, tuned for names. Normalizes the inputs, splits them into tokens, and sorts the tokens alphabetically before comparing, so word order does not matter."Ryan Reisling", "Reisling Ryan" → score close to 1
SUBSTRINGString + start + end positionsStringReturns the portion of the string between the start position (inclusive) and the end position (exclusive). Positions are zero-based."Socure", 0, 3"Soc"

Numerical functions

TransformationInputOutputHow it worksExample
DIVISIONTwo numbersNumericDivides the first number by the second and returns the quotient. Returns 0 if the divisor is 0.10, 25
MULTIPLICATIONTwo numbersNumericReturns the product of the two numbers.2, 36
SUMOne or more numbersNumericReturns the total of the input numbers.2, 35
MODULUSTwo numbersNumericDivides the first number by the second and returns the remainder.10, 31
SUBTRACTTwo numbersNumericSubtracts the second number from the first and returns the difference.10, 37
RANDOM_NUMBERMin + max valuesNumericReturns a random number between the minimum and maximum values.1, 10 → for example 7

Array functions

TransformationInputOutputHow it worksExample
IS_IN_ARRAY_ANYString(s) + arrayBooleanReturns true if at least one of the input values is present in the array."b", ["a", "b", "c"]true
IS_IN_ARRAY_ALLString(s) + arrayBooleanReturns true only if every input value is present in the array."a", "d", ["a", "b", "c"]false
JOINArrayStringJoins the array elements into a single space-separated string.["John", "Smith"]"John Smith"
ARRAY_LENGTHArrayNumericReturns the number of elements in the array.["a", "b", "c"]3
COUNT_DISTINCTArrayNumericReturns the number of unique elements in the array.[1, 1, 2]2

Date functions

TransformationInputOutputHow it worksExample
DATE_DIFF_IN_DAYSTwo dates (ISO) or date + “today”NumericReturns the number of whole days between the two dates. Pass "today" as the second value to compare against the current date."2026-01-01", "2026-01-31"30
CALCULATE_AGEDate of birth (ISO)NumericReturns the age in whole years from the date of birth to today."1990-06-15" → age in years
TIME_DIFF_IN_SECSTwo timestamps (ISO)NumericReturns the number of seconds between the two timestamps."2026-01-01T00:00:00Z", "2026-01-01T00:01:00Z"60

Date functions expect ISO 8601 dates (YYYY-MM-DD). A compact YYYYMMDD value such as "19900615" is not a valid ISO date, so CALCULATE_AGE cannot parse it and does not return a valid age. To convert a YYYYMMDD value inside the workflow, split it with SUBSTRING and rejoin it with CONCAT before calling CALCULATE_AGE: SUBSTRING($dob, 0, 4), SUBSTRING($dob, 4, 6), and SUBSTRING($dob, 6, 8) return the year, month, and day, then CONCAT($year, "-", $month, "-", $day) produces "1990-06-15".


Special functions

TransformationInputOutputHow it worksExample
GEO_DISTANCE_LAT_LONGTwo lat/long coordinate pairsNumericReturns the distance in km between two latitude/longitude coordinate pairs.two coordinate pairs → distance in km
EXTRACT_EMAIL_HANDLEEmail addressStringReturns the domain portion of the address (everything after @)."[email protected]""example.com"
EXTRACT_EMAIL_USEREmail addressStringReturns the local portion of the address (everything before @)."[email protected]""jane"
IS_NULLAnyBooleanReturns true if the value is null or absent.nulltrue
COPYAnyAnyCopies the input value unchanged into the output field."abc""abc"
DECLARE_CUSTOM_VARIABLEAnyAnyStores a value in a named variable so later steps can reuse it (for example, as input to another step)."US""US" (stored as a variable)
INSPECT_VALUEAnyAnyReturns a variable's value together with its detected type. Use it to debug what a variable holds at a point in the workflow.inspects a variable's value and type

Best practices

  • Place transformations where they add clarity or efficiency — e.g., normalize data early, simplify condition checks, or prep values before decisions.
  • Use clear names for output fields so they’re self-explanatory in downstream steps.
  • Validate transformation results with test payloads to avoid logic errors.

Did this page help you?