For the managed package runtime, create expressions to set calculated values and evaluate data across multiple fields using a Formula or Aggregate element. For example, if you are accepting information for a qualifying life event you may want to create a formula that determines if the date entered for the qualifying life event is within thirty days of today's date.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
For a list of available functions, see Omniscript Functions (Managed Package).
Formula and Aggregate elements support the following constants and types:
-
Omniscript elements and JSON nodes, passed in as merge fields—for example, %Element1% or %JSONnode1%
-
Numbers and integers—for example, 5 + 3.145
-
String literals wrapped in quotes—for example, ' "ABC" + "DEF" '
-
Booleans—for example, true || false
-
Arrays—for example, "[1,2, 3, 4, 5]"
-
Dates—for example, 2/3/24
Formulas with a Data Type of Date are interpreted according to the Date Format, using the Day.js library. To prevent a date from being interpreted, set the Data Type to Text.
-
Null
- Supported Formula Operators (Managed Package)
For the managed package runtime, formula fields in Omniscript support the following operators: - Omniscript Functions (Managed Package)
For the managed package runtime, you can add functions to the Aggregate and Formula elements in Omniscripts. - Create a Formula or Aggregate in an Omniscript (Managed Package)
For the managed package runtime, run functions against element data with the Formula and Aggregate elements.