Email Parsing Functions
Email parsing functions let a system-generated email calculate or format content from fixed values and replacement-tag data. Use them in an Email Manager body when a message needs date arithmetic, numeric calculations, formatting, or error handling.
Write a function expression
Enclose the complete expression in double square brackets and prefix each function name with @.
[[@IFERROR(@FORMATDATE(@ADDDAYS([OrderDate], 1), "MMMM d, yyyy"), "a later date")]]
Functions can contain other functions and are evaluated from the innermost expression outward. Parameters can be replacement tags or fixed values. If an expression has invalid parameters, cannot calculate a result, or otherwise fails, CyberStore returns a blank string unless @IFERROR supplies a fallback.
A replacement tag used as a parameter must be supported by the selected email. Test expressions with realistic data, including missing or blank values.
General function
| Function | Result |
|---|---|
@VOID() | Performs no action. It is primarily available as a fallback or system function. |
Date functions
| Function | Result |
|---|---|
@LATER(date1, date2, ..., daten) | Returns the latest of two or more date/time values. |
@EARLIER(date1, date2, ..., daten) | Returns the earliest of two or more date/time values. |
@DATEDIFF(date1, date2) | Returns a calendar-style difference including years, months, and days. |
@DATEDIFFDAYS(date1, date2) | Returns the difference between two dates in days. |
@ADDDAYS(date, numDays) | Adds days to a date. A negative number subtracts days. |
@ADDMONTHS(date, numMonths) | Adds months to a date. A negative number subtracts months. |
@ADDYEARS(date, numYears) | Adds years to a date. A negative number subtracts years. |
@FORMATDATE(date, "formatString") | Formats a date using a standard .NET date and time format string. |
Math functions
| Function | Result |
|---|---|
@SUM(number1, number2, ..., numbern) | Adds two or more numeric values. |
@SUBTRACT(number1, number2, ..., numbern) | Subtracts subsequent values from the first, from left to right. |
@MULTIPLY(number1, number2, ..., numbern) | Multiplies two or more values. |
@DIVIDE(number1, number2) | Divides the first value by the second. |
@AVERAGE(number1, number2, ..., numbern) | Returns the sum of the values divided by the number of values. |
@MOD(number1, number2) | Returns the remainder when the first value is divided by the second. |
@FORMATNUMBER(number, "formatString") | Formats a number using a standard .NET numeric format string. |
Logical function
| Function | Result |
|---|---|
@IFERROR(@FUNCTION, fallback) | Returns fallback when the nested function produces an error; otherwise, returns the nested function’s result. |
Test an expression
Before saving a production template:
- Confirm every replacement-tag parameter belongs to that email.
- Test nested functions from the inside outward.
- Include zero, negative, blank, and invalid values where applicable.
- Use
@IFERRORwhen blank output would make the message unclear. - Verify formatted dates and numbers for the expected audience and locale.