{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Journeys","product":"Identity Management","type":"markdown"},"seo":{"title":"Expressions: Types","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"expressions-types","__idx":0},"children":["Expressions: Types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An expression result, or any intermediate value within an expression, has a type. The expression type system is modeled after the JSON data model."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-types","__idx":1},"children":["Supported types"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"style":{"minWidth":"100px"}},"children":["Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"style":{"minWidth":"190px"}},"children":["Example"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sequence of characters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"hello\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Numeric value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2.1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Undefined value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Either true or false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Key-value mapping. Each value can be of any valid type except lambda"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{a: 1, b: \"c\"} "]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sequence of values, each of any valid type except lambda"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[2, \"hello\", \"world\"]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["lambda"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Function, which performs a computation based on its parameters.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"A lambda value consists of the following parts: ",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[" ",{"$$mdtype":"Tag","name":"li","attributes":{},"children":["set of parameter declarations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["closure containing all variables that are accessible to the lambda (including parameters and all other variables in enclosing scopes)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["expression that defines how to compute the lambda result based on parameters. See also ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/orchestration/getting-started/expressions/constructors#lambda-constructors"},"children":["Lambda Constructors"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/orchestration/getting-started/expressions/lamda"},"children":["Lambda Invocations"]},"."]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(x)=>2*x "]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"type-coercion","__idx":2},"children":["Type coercion"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A value of one type may sometimes be converted to a value of another type. This is called ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["type coercion"]},". For example, in the expression ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@cos(\"22.3\")"]},", the cosine function is calculated over a string value; however since the string can be coerced into a number, the invocation will succeed. A value coerced into a boolean is called the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["truth-value"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table summarizes valid type coercions:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"To               From -->"},"children":["To               From -->"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"string"},"children":["string"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"number"},"children":["number"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"null"},"children":["null"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"boolean"},"children":["boolean"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"object"},"children":["object"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"array"},"children":["array"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Convert"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=\"null\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=\"true\" or \"false\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON rep"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON rep"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Try to convert"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=1 or 0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=true if !0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["=true"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note:"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Values of type lambda cannot be coerced to any type or from any type."]}]}]},"headings":[{"value":"Expressions: Types","id":"expressions-types","depth":1},{"value":"Supported types","id":"supported-types","depth":2},{"value":"Type coercion","id":"type-coercion","depth":2}],"frontmatter":{"showNextButton":true,"seo":{"title":"Expressions: Types"}},"lastModified":"2025-11-23T13:17:17.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/orchestration/getting-started/expressions/types","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}