Mapper Validation Index

SiPHON Mapper Statement Validation Index #

Purpose: Use this index as a validation reference for all valid mapper statements and functions.
Version: 2.0
Last Updated: December 2025

 


 

Statement Types #

Static Statements #

  • Type: static
  • Valid Data Types:
    • static:string:{value}
    • static:literal:{value with ${var} interpolation}
    • static:number:{numeric value}
    • static:boolean:{true|false}
    • static:object:{...}
    • static:array:[...]
    • static:null

Escaping Characters (in static:string only)

  • Escape Slash: // → produces /
  • Escape Left Parenthesis: /( → produces (
  • Escape Right Parenthesis: /) → produces )
  • Newline: /n → produces newline character
  • Tab: /t → produces tab character

Data Reference Statements #

  • Type: data
  • Syntax: (data:{source}->{path}:{default statement})
  • Valid Source Types:
    • vars – Workflow variables
    • envVars – Environment variables
    • flowAttributes – Flow-level attributes
    • tasks – Task execution data
    • workflow – Workflow-level data

Task Components

  • tasks->{taskName}->payload
  • tasks->{taskName}->attributes->{attributeName}
  • tasks->{taskName}->metadata->{metadataField}

Valid Task Metadata Fields:

  • startTime
  • runTime
  • endTime
  • payloadSize
  • status

Workflow Components

  • workflow->input->payload
  • workflow->status
  • workflow->metadata->{metadataField}

Valid Workflow Metadata Fields:

  • correlationId
  • workflow
  • workflowVersion
  • executionStartTime
  • flowVersion
  • previousExecution
  • currentTaskName

Scope Statements #

  • Type: scope
  • Syntax: (scope:{identifier})
  • Usage: Only within function arguments for array/filter, array/reduce, array/map, forEach
  • Reference: (scope:{identifier}->{property})
  • Note: Scope does NOT use the data: prefix – use (scope:item->field) not (data:scope->item->field)

Function Statements #

  • Type: function
  • Syntax: (function:{functionName}[{arg1},{arg2},...])

 


 

Complete Function Reference #

Comparison Functions #

equals

Syntax: (function:equals[{value1},{value2}])
Returns: Boolean
Purpose: Test if two values are equal

notEqual

Syntax: (function:notEqual[{value1},{value2}])
Returns: Boolean
Purpose: Test if two values are not equal

greaterThan

Syntax: (function:greaterThan[{value1},{value2}])
Returns: Boolean
Purpose: Test if value1 > value2

greaterThanOrEqual

Syntax: (function:greaterThanOrEqual[{value1},{value2}])
Returns: Boolean
Purpose: Test if value1 >= value2

lessThan

Syntax: (function:lessThan[{value1},{value2}])
Returns: Boolean
Purpose: Test if value1 < value2

lessThanOrEqual

Syntax: (function:lessThanOrEqual[{value1},{value2}])
Returns: Boolean
Purpose: Test if value1 <= value2

 


 

Logical Functions #

and

Syntax: (function:and[{boolean1},{boolean2}])
Returns: Boolean
Purpose: Logical AND operation

or

Syntax: (function:or[{boolean1},{boolean2}])
Returns: Boolean
Purpose: Logical OR operation

 


 

Type Checking Functions #

typeOf

Syntax: (function:typeOf[{value}])
Returns: String
Purpose: Get the type of a value
Possible Returns: “string”, “number”, “boolean”, “array”, “object”, “null”, “undefined”

isNumeric

Syntax: (function:isNumeric[{value}])
Returns: Boolean
Purpose: Check if value can be converted to a number

isString

Syntax: (function:isString[{value}])
Returns: Boolean
Purpose: Check if value is a string

 


 

Array Functions #

array/isArray

Syntax: (function:array/isArray[{value}])
Returns: Boolean
Purpose: Check if value is an array

array/includes

Syntax: (function:array/includes[{array},{value}])
Returns: Boolean
Purpose: Check if array contains value

array/length

Syntax: (function:array/length[{array}])
Returns: Number
Purpose: Get array length

array/lengthNotZero

Syntax: (function:array/lengthNotZero[{array}])
Returns: Boolean
Purpose: Check if array has elements

array/reverse

Syntax: (function:array/reverse[{array}])
Returns: Array
Purpose: Reverse array order

array/join

Syntax: (function:array/join[{array},{separator}])
Returns: String
Purpose: Join array elements into string

array/concat

Syntax: (function:array/concat[{array1},{array2}])
Returns: Array
Purpose: Concatenate two arrays

array/deepJoin

Syntax: (function:array/deepJoin[{array},{separator}])
Returns: String
Purpose: Recursively join nested arrays

array/flatten

Syntax: (function:array/flatten[{array}])
Returns: Array
Purpose: Flatten nested arrays one level

array/filter

Syntax: (function:array/filter[{array},{scope},{predicate}])
Returns: Array
Purpose: Filter array by predicate function

array/reduce

Syntax: (function:array/reduce[{array},{scope},{reducer},{initial}])
Returns: Any
Purpose: Reduce array to single value

array/map

Syntax: (function:array/map[{array},{scope},{transformer}])
Returns: Array
Purpose: Transform each array element

array/new

Syntax: (function:array/new[])
Arguments: NONE – Takes no arguments
Returns: Array (empty [])
Purpose: Create new empty array ONLY

array/append

Syntax: (function:array/append[{array},{element}])
Returns: Array
Purpose: Append element to array

array/getElement

Syntax: (function:array/getElement[{array},{index}])
Returns: Any
Purpose: Get element at index (supports negative indices)

array/unique

Syntax: (function:array/unique[{array}])
Returns: Array
Purpose: Remove duplicate values

array/splice

Syntax: (function:array/splice[{array},{start},{deleteCount},{items...}])
Returns: Array
Purpose: Remove/replace elements

array/slice

Syntax: (function:array/slice[{array},{start},{end}])
Returns: Array
Purpose: Extract array section

array/sort

Syntax: (function:array/sort[{array},{scope},{comparator}])
Returns: Array
Purpose: Sort array with custom comparator

array/sortNumeric

Syntax: (function:array/sortNumeric[{array}])
Returns: Array
Purpose: Sort array numerically (ascending)

array/sortString

Syntax: (function:array/sortString[{array}])
Returns: Array
Purpose: Sort array alphabetically (ascending)

 


 

Object Functions #

object/new

Syntax: (function:object/new[])
Arguments: NONE – Takes no arguments
Returns: Object (empty {})
Purpose: Create new empty object ONLY

object/mutate

Syntax: (function:object/mutate[{object},{updates},{exclusions}])
Returns: Object
Purpose: Merge objects with selective field exclusion

object/contains

Syntax: (function:object/contains[{object},{key}])
Returns: Boolean
Purpose: Check if object has key

object/excludes

Syntax: (function:object/excludes[{object},{key}])
Returns: Boolean
Purpose: Check if object does not have key

object/hasOwnProperty

Syntax: (function:object/hasOwnProperty[{object},{key}])
Returns: Boolean
Purpose: Check if object has own property (not inherited)

object/getProperty

Syntax: (function:object/getProperty[{object},{key}])
Returns: Any
Purpose: Get property value (handles special characters)

object/addProperty

Syntax: (function:object/addProperty[{object},{key},{value}])
Returns: Object
Purpose: Add property to object

object/removeProperty

Syntax: (function:object/removeProperty[{object},{key}])
Returns: Object
Purpose: Remove property from object

 


 

String Functions #

string/startsWith

Syntax: (function:string/startsWith[{string},{prefix}])
Returns: Boolean
Purpose: Check if string starts with prefix

string/endsWith

Syntax: (function:string/endsWith[{string},{suffix}])
Returns: Boolean
Purpose: Check if string ends with suffix

string/split

Syntax: (function:string/split[{string},{delimiter}])
Returns: Array
Purpose: Split string into array

string/substring

Syntax: (function:string/substring[{string},{start},{end}])
Returns: String
Purpose: Extract substring

string/replace

Syntax: (function:string/replace[{string},{pattern},{replacement}])
Returns: String
Purpose: Replace pattern with replacement (supports regex)

string/match

Syntax: (function:string/match[{string},{pattern}])
Returns: Array
Purpose: Match string against regex pattern

string/toLowercase

Syntax: (function:string/toLowercase[{string}])
Returns: String
Purpose: Convert to lowercase

string/toUppercase

Syntax: (function:string/toUppercase[{string}])
Returns: String
Purpose: Convert to uppercase

string/concat

Syntax: (function:string/concat[{string1},{string2}])
Returns: String
Purpose: Concatenate strings

 


 

Math Functions #

math/add

Syntax: (function:math/add[{number1},{number2}])
Returns: Number
Purpose: Addition

math/subtract

Syntax: (function:math/subtract[{number1},{number2}])
Returns: Number
Purpose: Subtraction

math/multiply

Syntax: (function:math/multiply[{number1},{number2}])
Returns: Number
Purpose: Multiplication

math/divide

Syntax: (function:math/divide[{number1},{number2}])
Returns: Number
Purpose: Division

math/modulus

Syntax: (function:math/modulus[{number1},{number2}])
Returns: Number
Purpose: Modulo operation

math/power

Syntax: (function:math/power[{base},{exponent}])
Returns: Number
Purpose: Exponentiation

math/floor

Syntax: (function:math/floor[{number}])
Returns: Number
Purpose: Round down to nearest integer

math/ceil

Syntax: (function:math/ceil[{number}])
Returns: Number
Purpose: Round up to nearest integer

math/random

Syntax: (function:math/random[])
Returns: Number
Purpose: Random float between 0 and 1

math/randomInteger

Syntax: (function:math/randomInteger[{min},{max}])
Returns: Number
Purpose: Random integer in range

 


 

Control Flow Functions #

forEach

Syntax: (function:forEach[{array},{scope},{body}])
Returns: Null
Purpose: Execute statement for each array element

if

Syntax: (function:if[{condition},{trueBranch},{falseBranch}])
Returns: Any
Purpose: Conditional execution

loop

Syntax: (function:loop[{count},{scope},{body}])
Returns: Null
Purpose: Execute statement count times

ternary

Syntax: (function:ternary[{condition},{trueValue},{falseValue}])
Returns: Any
Purpose: Conditional value selection

throw

Syntax: (function:throw[{message},{level}])
Returns: Never (throws error)
Purpose: Throw error with message
Valid Levels: “error”, “warn”, “info”

 


 

DateTime Functions #

date

Syntax: (function:date[{format},{timezone}])
Returns: String
Purpose: Get current date/time formatted
Format Examples: “yyyy-MM-dd”, “HH:mm:ss”, “unix”, “unixms”

assignDate

Syntax: (function:assignDate[{year},{month},{day},{hour},{minute},{second},{millisecond}])
Returns: String
Purpose: Create specific date/time

 


 

JSON Functions #

json/parse

Syntax: (function:json/parse[{jsonString}])
Returns: Any
Purpose: Parse JSON string to value

json/stringify

Syntax: (function:json/stringify[{value}])
Returns: String
Purpose: Convert value to JSON string

 


 

Type Conversion Functions #

toString

Syntax: (function:toString[{value}])
Returns: String
Purpose: Convert value to string

toNumber

Syntax: (function:toNumber[{value}])
Returns: Number
Purpose: Convert value to number

 


 

Utility Functions #

assign

Syntax: (function:assign[{target},{value}])
Returns: Any
Purpose: Assign value to data reference (workflow state)

output

Syntax: (function:output[{value}])
Returns: Any
Purpose: Return value (used for wrapping in control flow)

hmacSha256

Syntax: (function:hmacSha256[{message},{secret}])
Returns: String
Purpose: Generate HMAC-SHA256 hash

 


 

Quick Validation Checklist #

Statement Type Validation #

  • Is the statement type one of: static, data, scope, function?
  • Does the syntax match the pattern for that statement type?

Static Statement Validation #

  • Is the data type one of: string, literal, number, boolean, object, array, null?
  • For string: Are special characters properly escaped?
  • For number: Is the value numeric?
  • For boolean: Is the value true or false?

Data Statement Validation #

  • Is the source type one of: vars, envVars, flowAttributes, tasks, workflow, scope?
  • Is a default statement provided?
  • Does the default match the expected data type? (string→(static:string:), number→(static:number:0), array→(static:array:[]), object→(static:object:{}), unknown→(static:null))
  • For tasks: Does it use valid components (payload, attributes, metadata)?
  • For workflow: Does it use valid components (input, status, metadata)?

Function Statement Validation #

  • Is the function name in the complete function list above?
  • Does the function call have the correct number of arguments?
  • Are arguments of the correct type?
  • If a function is required but you have a static or data statement, wrap it with (function:output[...]) – This is commonly needed for the 3rd argument in array/map

Common Invalid Statements (Do NOT Use) #

  • ❌ (function:array/forEach[...]) – Use forEach (no array/ prefix)
  • ❌ (function:ternary/if[...]) – Use ternary or if, not combined
  • ❌ (static:date:...) – Use (function:date[...]) instead
  • ❌ (data:task->...) – Use tasks (plural), not task
  • ❌ (data:scope->item->field) – Scope does NOT use data prefix – Use (scope:item->field)
  • ❌ (function:object/new[{properties}]) – object/new takes NO arguments, creates empty {} only – Use static:object:{...} for objects with properties
  • ❌ (function:array/new[{values}]) – array/new takes NO arguments, creates empty [] only – Use static:array:[...] for arrays with values
  • ❌ Field names with escaping – Field names NEVER require escaping
  • ❌ (function:if/else[...]) – Use if with three arguments, not if/else

 


 

Usage Notes #

For AI Agents: When generating mapper statements:

  1. Validate statement type exists in this index
  2. Validate function name exists in function reference
  3. Check argument count matches function signature
  4. Verify data source types are valid
  5. Remember escaping only applies to static:string values
  6. Field names in data paths never need escaping

For Developers: This index can be used to:

  • Validate mapper expressions before execution
  • Build autocomplete/IntelliSense systems
  • Create mapper expression validators
  • Generate test cases
  • Document available functionality

 


 

End of Validation Index

 

Advanced Concepts #

For more information about any of these items, see the complete documentation in this knowledge base, which include descriptions and examples for each function/statement in the mapper language (see: Mapper Documentation and Mapper Examples).

Was it helpful ?
Updated on February 24, 2026
en_USEnglish