Transformation Step

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.


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 Available functions below).


  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.

String functions

TransformationInputOutputDescription
STARTSWITHString + substringBooleanTrue if a string starts with the substring (ignores leading whitespace).
ENDSWITHString + substringBooleanTrue if a string ends with the substring (ignores trailing whitespace).
LENGTHStringNumericReturns the string length.
CONTAINSString + substringBooleanTrue if the string contains the substring.
TO_LOWER_CASEStringStringConverts to lowercase.
CONCATMultiple stringsStringJoins strings into one.
SPLITString + separatorArraySplits string into an array of substrings.
FIRST_NString + numeric valueStringReturns the first n characters.
REVERSEStringStringReverses a string.
JARO_WINKLER_DISTANCETwo stringsNumericCalculates similarity using Jaro-Winkler distance. This function does not normalize the input strings.
SIAMESE_JARO_WINKLER_DISTANCETwo stringsNumericCalculates similarity using Jaro-Winkler distance optimized for names; normalizes input, tokenizes, and alphabetically sorts tokens (so "Ryan Reisling" ≈ "Reisling Ryan").
SUBSTRINGString + start + end positionsStringExtracts substring between two positions.

Numerical functions

TransformationInputOutputDescription
DIVISIONTwo numbersNumericReturns quotient.
MULTIPLICATIONTwo numbersNumericReturns product.
SUMOne or more numbersNumericReturns total.
MODULUSTwo numbersNumericReturns remainder.
SUBTRACTTwo numbersNumericReturns the difference.
RANDOM_NUMBERMin + max valuesNumericReturns a random number within range.

Array functions

TransformationInputOutputDescription
IS_IN_ARRAY_ANYString(s) + arrayBooleanTrue if any element is in the array.
IS_IN_ARRAY_ALLString(s) + arrayBooleanTrue if all elements are in the array.
JOINArrayStringJoins array elements into a space-separated string.
ARRAY_LENGTHArrayNumericReturns the number of elements.
COUNT_DISTINCTArrayNumericReturns the number of unique items.

Date functions

TransformationInputOutputDescription
DATE_DIFF_IN_DAYSTwo dates (ISO) or date + “today”NumericDays between two dates.
CALCULATE_AGEDate of birth (ISO)NumericAge in years.
TIME_DIFF_IN_SECSTwo timestamps (ISO)NumericSeconds between two timestamps.

Special functions

TransformationInputOutputDescription
GEO_DISTANCE_LAT_LONGTwo lat/long coordinate pairsNumericDistance (in km) between two coordinates.
EXTRACT_EMAIL_HANDLEEmail addressStringReturns the part after “@”.
EXTRACT_EMAIL_USEREmail addressStringReturns the part before “@”.
IS_NULLAnyBooleanTrue if the value is null.
COPYAnyAnyCopies input to output.
DECLARE_CUSTOM_VARIABLEAnyAnyDeclares a custom variable to use later (e.g., as input to another step).
INSPECT_VALUEAnyAnyShows the value and type of a given variable name. Useful for workflow debugging.

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.