Skip to main content
Here is a list of supported operators and functions that you can utilize within the platform in order to create various different formulae or expressions.

Operators

OperatorDescriptionExample
+Adds two fields10+2 is 12
-Subtracts two fields10-3 is 7
*Multiplies two fields5*20 is 100
/Divides two fields20/5 is 4
%Calculates the remainder20%3 is 2
(Used to define mathematical formulas or conditional operations(10+2)*3
)Used to define mathematical formulas or conditional operations(10-2)*4
!Condition is negated!{{Contact.billingcountry}}=‘USA’
!=Not equal to operator{{Contact.billingCountry}}!=‘USA’
=Equal to operator{{Contact.billingCountry}}=‘USA’
<Less than operator{{Deal.value}}<1000
>Greater than operator{{Deal.value}}>1000
<=Less than or equal to operator{{Deal.value}}<=1000
>=Greater than or equal to operator{{Deal.value}}>=1000

Functions

| |
FunctionDescription
absReturns the absolute value
ceilRounds a value to the nearest higher integer
floorRounds a value to the nearest lower integer
maxReturns the greater of two values
minReturns the smaller of two values
sqrtReturns the square root of the input number
ifReturns one of two values depending on the logical condition
lenReturns the number of characters in the provided text
dayofmonthReturns the day of the month for the given date
hourReturns the hour for the given date
minuteReturns the minute for the given date
monthReturns the month for the given date
yearReturns the year for the given date
weekdayReturns the day of the week (1-7) corresponding to the input date, where 1 is Sunday, 2 is Monday, and so on.
&&Returns true when both conditions match
| | Returns true when any condition matches
lowerConverts all characters in a text to lowercase
upperConverts all characters in a text to uppercase
trimRemoves extra spaces before and after the text
substringReturns the part of text from the start position to the given length
tostringReturns string representation of the object
replaceReplaces a character every time it appears in the text
newdateCreates a date from the year, month, day, and time
datepartReturns just the date for the DateTime value
timepartReturns just the time for the DateTime value
adddateReturns a new date by adding (year/day/month/hour/min) to the given date
subdateReturns a new date by subtracting (year/day/month/hour/min) from the given date
nowReturns a date/time representing the current time
datecompCompares two dates and returns the difference of days in minutes
tonumberReturns a number from the given string

Date Time Functions

FunctionInternalHelp Tooltip
newdatenewdate(year, month, day, hour, minute, am/pm)Creates a date from the year, month, day, and time. e.g. newdate(2020, 02, 01, 06, 30, ‘PM’) gives 01/02/2020 06:30 PM
datepartdatepart(date-time)Returns just the date for the DateTime value. e.g. datepart(newdate(2020,02,03,06,30,‘PM’)) returns “03/02/2020”
timeparttimepart(date-time)Returns just the time for the DateTime value. e.g. timepart(newdate(2020,02,03,06,30,‘PM’)) returns “06:30 PM”
adddateadddate(datetime, number, ‘date period’)Returns a new date by adding (year/day/month/hour/min) to the given date. e.g. adddate(newdate(2020,02,03,06,30,‘PM’), 2, ‘month’) returns 03/04/2020 06:30 PM
subdatesubdate(datetime, number, ‘date period’)Returns a new date by subtracting (year/day/month/hour/min) from the given date. e.g. subdate(newdate(2020,02,03,06,30,‘PM’), 2, ‘month’) returns 03/12/2019 06:30 PM
nownow()Returns a date/time representing the current time.
datecompdatecomp(date time 1, date time 2)Compares two dates and returns the difference of days in minutes.
dayofmonthdayofmonth(datetime)Returns the day of the month. e.g. dayofmonth(newdate(2020,02,03,06,30,‘PM’)) returns 03.
hourhour(datetime)Returns the hour for the given date. e.g. hour(newdate(2020,02,03,06,30,‘PM’)) returns 18.
minuteminute(datetime)Returns the minute for the given date. e.g. minute(newdate(2020,02,03,06,30,‘PM’)) returns 30.
monthmonth(datetime)Returns the month. e.g. month(newdate(2020,02,03,06,30,‘PM’)) returns 02.
yearyear(datetime)Returns the year. e.g. year(newdate(2020,02,03,06,30,‘PM’)) returns 2020.
weekdayweekday(datetime)Returns the day of the week (1–7) corresponding to the input date, where 1 is Monday, 2 is Tuesday, and so on. (Ex: Friday returns ‘5’)

Conditional & Logical Operators

FunctionInternalUsageHelp Tooltip
ifConditionalif(logical_condition, value_if_true, value_if_false)Returns one of two values depending on the logical condition. e.g.if({{Contact.billingCountry}}=‘USA’,‘Yes’,‘No’)returns Yes if the country is USA.
&&And operator( {{Contact.billingCountry}} == ‘USA’ && {{Deal.value}} > 5000 )Returns true when both conditions match.
| | | |Or operator| ( {{Contact.billingCountry}} == ‘USA’ | {{Contact.billingCountry}} == ‘Canada’ )Returns true when any condition matches.