Functions functions

Functions are the building blocks of dynamic journey expressions in Adobe Journey Optimizer. They enable you to transform, calculate, validate, and manipulate data in real-time to create personalized customer experiences. With over 60 functions organized into intuitive categories, you can build sophisticated conditions, perform complex calculations, and make data-driven decisions at every step of the customer journey.

Understanding functions

Functions in journey expressions follow a consistent syntax pattern:

<function name>(<expression as param 1>, <expression as param 2>, … ,<expression as param N>)

Key characteristics:

  • Multiple signatures: A function can have different signatures (different sets of ordered parameters) to accommodate various use cases
  • Type-specific returns: Each function has a specific returned type (string, integer, boolean, date, list, etc.)
  • Zero to N parameters: Functions can accept 0-N expressions as ordered parameters, providing flexibility in how you use them

Why use functions?

Functions empower you to:

  • Create dynamic conditions - Branch journey paths based on real-time data evaluation
  • Personalize at scale - Tailor content and experiences using customer data and behavioral insights
  • Automate decisions - Build intelligent logic without manual intervention
  • Transform data - Convert, format, and manipulate data types to ensure compatibility
  • Perform calculations - Execute mathematical operations and statistical analysis
  • Validate inputs - Check data quality and completeness before taking action

Functions by category

Browse functions organized by their primary purpose to quickly find the right tool for your needs.

Adobe Experience Platform aep-functions

Audience segmentation and targeting

Evaluate audience membership to create personalized journey paths based on customer segments defined in Adobe Experience Platform.

Function
Description
inAudience
Check if an individual belongs to a specific audience

View Adobe Experience Platform function details →

Aggregation functions aggregation-functions

Statistical calculations and data summarization

Perform calculations on sets of values to derive insights such as averages, counts, sums, and min/max values. Essential for data-driven decision making.

Function
Description
avg
Calculate average value
count
Count non-null elements
countOnlyNull
Count null values only
countWithNull
Count all elements including nulls
distinctCount
Count unique non-null values
distinctCountWithNull
Count unique values including nulls
max
Find maximum value
min
Find minimum value
sum
Calculate total sum

View all aggregation functions →

Conversion functions conversion-functions

Data type transformation

Convert data between different types (string, integer, decimal, boolean, date, duration) to ensure compatibility across operations and data sources.

Function
Description
toBool
Convert to boolean
toDateOnly
Convert to date only (no time)
toDateTime
Convert to date with time
toDateTimeOnly
Convert to date-time without timezone
toDecimal
Convert to decimal number
toDuration
Convert to duration
toInteger
Convert to integer
toString
Convert to string

View all conversion functions →

Date functions date-functions

Date and time manipulation

Work with dates, times, and timezones to create time-based conditions, schedule actions, and perform temporal calculations.

Function
Description
currentTimeInMillis
Get current time in milliseconds
inLastDays
Check if date is within last N days
inLastHours
Check if date is within last N hours
inLastMonths
Check if date is within last N months
inLastYears
Check if date is within last N years
inNextDays
Check if date is within next N days
inNextHours
Check if date is within next N hours
inNextMonths
Check if date is within next N months
inNextYears
Check if date is within next N years
now
Get current date-time
nowWithDelta
Get current time with offset
setHours
Set specific hours in date-time
setDays
Set specific days in date-time
updateTimeZone
Update timezone of date-time

View all date functions →

List functions list-functions

Collection manipulation and analysis

Filter, sort, transform, and analyze arrays and lists to work with complex data structures and perform set operations.

Function
Description
distinct
Get unique values (excludes nulls)
distinctWithNull
Get unique values (includes nulls)
filter
Filter list based on criteria
getListItem
Get item at specific index
in
Check if value exists in list
intersect
Find common elements between lists
limit
Limit number of items returned
listSize
Get size of list
serializeList
Convert list to string
sort
Sort list elements

View all list functions →

Math functions math-functions

Mathematical operations

Perform numerical calculations and transformations for data processing and business logic.

Function
Description
random
Generate random number (0-1)
round
Round to nearest integer

View all math functions →

String functions string-functions

Text manipulation and validation

Process, transform, search, and validate text data for dynamic content creation and conditional logic.

Function
Description
concat
Concatenate strings
contain
Check if string contains substring
containIgnoreCase
Check contains (case-insensitive)
endWith
Check if string ends with suffix
endWithIgnoreCase
Check ends with (case-insensitive)
equalIgnoreCase
Compare strings (case-insensitive)
indexOf
Find first occurrence position
isEmpty
Check if string is empty
isNotEmpty
Check if string is not empty
lastIndexOf
Find last occurrence position
length
Get string length
lower
Convert to lowercase
matchRegExp
Match regular expression
notEqualIgnoreCase
Check not equal (case-insensitive)
replace
Replace first occurrence
replaceAll
Replace all occurrences
split
Split string into array
startWith
Check if string starts with prefix
startWithIgnoreCase
Check starts with (case-insensitive)
substr
Extract substring
trim
Remove leading/trailing spaces
upper
Convert to uppercase
uuid
Generate UUID

View all string functions →

Next steps

Now that you understand the available functions, explore:

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76