Marketing Cloud Next runs a subset of the AMPscript surface that Engagement offers. This page lists only the functions the catalog marks as available on Next, together with the Core API version they arrived in and the Handlebars helper that covers the same job.

Every function has its own Next page

The API version column comes from the language catalog that also powers the SFMC Language Service and the ESLint rules. Each function links to a page that documents how it behaves in Marketing Cloud Next, proven by rendering the calls in a Next email (2026-11-22 and 2026-11-23). Each page ends with a Marketing Cloud Engagement section that says whether Engagement gives the same result or differs, and how. Behaviour that needs subscriber, send or data context could not be rendered in a preview email; those pages say so.

Supported functions

Verified means the function completed a runtime sweep on a live Engagement CloudPage and has a reference page — the name links to it. A name without the badge is listed from the language catalog and has not been proven here; use ampscript.guide for those until a sweep reaches them.

FunctionAPI versionHandlebars Returns Description
Add()differs 67 add number Computes the sum of two numeric values.On Next a quoted numeric argument such as Add("15", "27") or a negative literal such as Add(-5, 3) makes the email fail to render, while unquoted non-negative numbers work. Integer sums wrap at 32 bits: Add(2147483647, 1) renders -2147483648.
Base64Decode() 68 base64Decode string Decodes a Base64-encoded string. The decoded bytes are read as UTF-8 unless encoding names another character encoding, and any value that is not well-formed Base64 aborts the page instead of returning an empty or partial result.Next accepts a value whose trailing = padding is missing: Base64Decode("SGVsbG8") returns "Hello" where Engagement stops the email.
Base64Encode() 68 base64Encode string Encodes a value as a Base64 string. The bytes encoded are the UTF-8 representation of the input unless encoding names another character encoding.Next rejects the encoding names UTF-16BE and ISO-8859-1 when the email is saved; UTF-8, UTF-16, UTF-32 and ASCII give the same Base64 as Engagement.
BeginImpressionRegion()differs 68 impressionRegion void Marks the start of an impression tracking region. The region name must be a literal — a variable argument aborts the page.In Handlebars, the block helper impressionRegion replaces this function together with EndImpressionRegion: the region name goes on the opening tag and the closing tag ends the region. A variable as the region name does not abort on Next: SET @r = "dyn-region" BeginImpressionRegion(@r) followed by X rendered "X", where Engagement fails the page.
BuildRowsetFromJSON()differs 67 jsonpath rowset Parses a JSON string and returns a rowset.Malformed JSON with flag 0 renders instead of aborting the page. An empty-string or unset payload with flag 1 made the Next preview fail (HTTP 500) where Engagement returns zero rows; a batch of "{ not json " with the flags true, "true" and "1" made the Next preview fail (HTTP 500).
BuildRowSetFromString()differs 68 buildRowSetFromString rowset Splits a delimited string into a single-column rowset.With the separator "::", RowCount alone still returned 3, but also reading a field made the Next preview fail (HTTP 500). Field(Row(@rows, 0), 1) written inline renders "true" on Next instead of aborting.
BuildRowSetFromXML()differs 68 buildRowSetFromXml rowset Parses an XML string using an XPath expression and returns a rowset.Saving the CMS email strips the tags from XML written as an AMPscript string literal, so the function receives only the text and returns 0 rows; build the markup at runtime (for example with Char(60) and Char(62)) or read it from data. Malformed XML with the flag "1" made the Next preview fail (HTTP 500) where Engagement returns zero rows.
Char()differs 68 char string Returns the character for the given numeric character code. Codes above 255 are not rejected — they resolve to the matching Unicode character.On Next only codes 0 to 255 render. The codes above 255 tested so far (256, 8364, 9731, 65601, 128512) and a negative code stopped the email with an error, where Engagement returns the matching Unicode character or wraps the code.
ClaimRow() 68 claimRow row Atomically claims an unclaimed row in a data extension by setting a key column value.
ClaimRowValue() 68 claimRow string Atomically claims a row and returns a specific column value from it, or a caller-supplied fallback when no unclaimed rows remain.Handlebars has no one-call counterpart: claimRow takes named arguments and returns the whole row, so read the wanted column from that row and wrap the call in fallback to supply a default when no row is left.
Concat() 67 concat string Concatenates two or more string values.Next rejects a call with only one argument when the email is saved, so pass at least two values. A boolean renders as its text on Next: Concat(true, false) gives "truefalse" where Engagement gives an empty string.
ContentBlockByID()differs 67 — string Retrieves and renders a Content Builder content block by its numeric ID.A missing block with errorOnMissingContentBlock 0 does not fall back on Next: the preview failed with HTTP 500 instead of rendering the default content and setting the status variable to -1; a batch with false, "false" and "0" also failed. Rendering a found block was not tested on Next.
ContentBlockByKey()differs 67 getContentBlock string Retrieves and renders a Content Builder content block by its customer key.A missing block with errorOnMissingContentBlock 0 does not fall back on Next: the preview failed with HTTP 500 instead of rendering the default content and setting the status variable to -1; a batch with false, "false" and "0" also failed. Rendering a found block was not tested on Next.
ContentBlockByName()differs 67 — string Retrieves and renders a Content Builder content block by its folder path and name.A missing block with errorOnMissingContentBlock 0 does not fall back on Next: the preview failed with HTTP 500 instead of rendering the default content and setting the status variable to -1; a batch with false, "false" and "0" also failed. Rendering a found block was not tested on Next.
DateAdd()differs 67 dateAdd date Adds a whole number of intervals to a date value. Only the five documented units are accepted and every other unit, including seconds and weeks, aborts the page — as does a non-integer amount or a date the engine cannot parse.Next renders two cases that abort on Engagement: the S (seconds) unit, where adding 30 to 2026-03-04 13:52:07 gives 2026-03-04T13:52:37, and a decimal amount, where 1.5 with D adds one whole day.
DateDiff()differs 67 dateDiff number Counts how many boundaries of the requested unit lie between two dates, by truncating both to that unit and subtracting — so a 23-hour gap that crosses midnight counts as 1 day, while 23 hours within one day counts as 0. Finer units than the one requested are ignored rather than rounded.Next counts complete elapsed units instead of crossed boundaries, so 2026-12-31 23:59 to 2027-01-01 00:00 gives 0 years, months and days where Engagement gives 1 each. The S unit renders seconds (59) where Engagement aborts, and the result fed into Add() prints with a decimal (24.0).
DateParse()differs 67 — date Parses a date string into a date value. A string the parser cannot read aborts the page instead of returning a sentinel, and an ambiguous day-first string such as 5/8/2026 is silently read month-first rather than rejected. An offset or GMT marker in the input is honoured and converted to the account time zone.On Next an offset or GMT marker is converted to UTC rather than the account time zone (2026-03-04T09:05:07Z renders 3/4/2026 9:05:07 AM, Engagement 3:05:07 AM), and useUtc has no effect in any spelling. An unreadable string or a Unix timestamp is returned unchanged where Engagement aborts.
DatePart()differs 68 datePart string Extracts one component from a date. The hour is reported on a 12-hour clock with no AM/PM indicator, so 19:35 yields 7 and any time at midnight — including a date with no time part at all — yields 12. Month and day come back zero-padded to two digits while hour and minute do not.Only the upper-case codes Y, M, D, H and MI were confirmed to render on Next. monthName made the email fail to render, so the month name is not available. The other long names and lower-case spellings were only tested in batches that also contained monthName, so their status is open. Wrapping the result in Length() also failed.
Divide()differs 67 divide number Divides the first number by the second.Only the string "true" is read as 1 on Next, so Divide("true", 1) renders 1 where Engagement aborts; other text such as "abc" still fails.
Domain()differs 68 domain string Returns everything after the first at sign, without validating the address or the domain. A value with no at sign, an empty string and a number all return an empty string.
Empty() 67 isEmpty boolean Returns true when the value is an empty string, an unset variable, or an undeclared variable. Whitespace, the number 0, the string "0" and the string "false" are all treated as present.Next rejects at save a call whose argument is a literal or a function call, such as Empty(""), Empty(0) or Empty(Now()), with an AMPscript syntax error; hold the value in a variable first.
EndImpressionRegion()differs 68 impressionRegion void Marks the end of an impression tracking region.In Handlebars, the closing tag of the impressionRegion block helper ends its region; there is no argument for ending every open region at once.
Field()differs 67 get string Retrieves the value of a named field from a rowset row. The two-argument form aborts the page when the column is absent; pass the optional third argument as 0 (or false) to get an empty string for a possibly-missing column instead.For a missing column, true, 1 or "true" as third argument render "true" and "1" renders "false" instead of aborting, while falsy flags render "false" instead of "". Field(row, 0) renders "true" instead of aborting. The two-argument form on a missing column renders "" for a JSON-built row but still aborts for a BuildRowSetFromString row.
Format()differs 67 format string Formats a number, a date or a string with a .NET format pattern. The third parameter only accepts Date or the empty string; the documented value Number aborts the page.The documented third-parameter value Number renders on Next (Format(1234.555, "C2", "Number") gives $1,234.56) where Engagement aborts; an invented value such as Banana still fails. A single-argument call is rejected at save.
FormatCurrency()differs 67 formatCurrency string Formats a number as a currency amount for a locale, choosing the symbol, the separators and the symbol position from that locale. Rounding is half-up.An empty or unknown locale ("" or zz-ZZ) renders the raw number 1234.555 without currency formatting, and the language-only locale de shows the generic sign ¤ instead of €. A single-argument call is rejected at save.
FormatDate()differs 67 format string Formats a date according to a date pattern, a time pattern and a locale. The two pattern arguments use separate, case-insensitive token sets: in the date pattern mm means month, and minutes are only reachable from the time pattern.Next uses a different date formatter. The .NET standard single-letter formats (such as d, M, D, f, F, g, G, o, r and Y) render as on .NET, but some custom tokens follow Java rules: mm is minutes and MM the month even in dateFormat, zz gives GMT, and a locale code turns D into the day of the year (63 for 4 March). ddd and dddd give the short and full day name (Wed, Wednesday). Omitting dateFormat returns the G standard format (e.g. "5/15/2026 1:23:45 PM"). An empty dateFormat puts a leading space before the time output, and h alone in timeFormat renders where Engagement aborts.
FormatNumber()differs 67 formatNumber string Formats a number with a standard or custom .NET numeric pattern, optionally for a locale. Rounding is half-up.An unrecognised pattern such as qqqq returns the unformatted number on Next, where Engagement echoes the pattern itself. A single-argument call is rejected at save.
GUID()differs 68 guid string Generates a new globally unique identifier. Every call returns a different value, so store the result in a variable when the same identifier is needed twice.
IIf()differs 67 iif string Returns one of two values based on a boolean expression (inline if). Only a real comparison or a boolean-returning function selects the true branch; a plain string or number always selects the false branch. Only the selected branch is evaluated, so a call that would abort the page is safe in the branch that is not taken.On Next a plain non-empty string condition such as "0", "hello" or three spaces selects the true branch, where Engagement selects the false branch. Both branches are evaluated: a RaiseError in the branch not taken still makes the render fail (HTTP 500), so an aborting call is safe in neither branch.
IndexOf()differs 67 indexOf number Returns the 1-based position of a substring, matching case-insensitively. An undocumented third argument selects which occurrence to locate.Next rejects the undocumented third occurrence argument when the email is saved, whatever its value. An empty search string returns 1 instead of 0, and a number or boolean literal as either argument (IndexOf(9876543, "65")) stops the email with an error.
IsEmailAddress()differs 68 isEmailAddress boolean Checks a value against email address syntax only; it never tests whether the mailbox or domain exists. Surrounding whitespace and a domain without a top-level domain are both rejected.An address whose domain has no dot, such as tomas.q@example, returns true on Next, where Engagement returns False. Surrounding whitespace is still rejected.
IsNull()differs 67 isEmpty boolean Returns true only for a genuine null, which in practice means a data extension field with no value. An unset or undeclared variable, an empty string, whitespace and every ordinary value all return false, so this is not a general emptiness test.IsNull(Concat(@value)) is rejected at save with an AMPscript syntax error, while IsNull(Now()) saves and renders false.
IsNullDefault()differs 68 isNullDefault string Returns the value if not null, otherwise returns the default. Outside a Smart Capture form the default is never reached: on a CloudPage every empty-ish input returns the empty string instead, so it cannot be used as a general fallback.
Length()differs 67 length number Returns the number of characters in a string.A number or boolean literal stops the email with an error on Next: Length(12345) and Length(true) fail where Engagement returns 5 and 0. Pass numbers as quoted text.
Lookup() 67 queryFirst string Returns a single field value from the first matching row in a data extension. A no-match returns an empty string.In MCN, search arguments must be provided in column/value pairs - an odd count causes an error. Tested in a Next email on a marketing object: filters on the key field and on non-key number and boolean fields return the field of the matching record, and a number key accepts the value as a string or a number.
LookupOrderedRows() 68 query rowset Returns a sorted rowset of matching rows from a data extension.In a Next email every tested call on a marketing object made the preview fail with HTTP 500: row counts 0, 1 and 5, sorting with ASC, DESC, lowercase desc or no direction, and filters on key and non-key fields. LookupRows with the same filters works.
LookupRows()differs 68 query rowset Returns a rowset of all matching rows from a data extension.Tested in a Next email on a marketing object: filters on the key field and on a non-key field return the matching rows, and no match gives RowCount 0. A number key accepts the value as a string or a number. In a test where the filter matched two records, only one row was returned. When the same field appears in two pairs, only the last pair is used.
Lowercase()differs 67 lowercase string Converts a string to all lowercase characters.A boolean renders as its text on Next: Lowercase(true) gives "true" where Engagement gives an empty string. The Turkish capital I with dot (U+0130) becomes i plus a combining dot (2 characters) instead of a plain i.
MD5()differs 68 md5 string Returns the MD5 hash of the input value. The bytes hashed are the UTF-8 encoding of the input unless charSet names another encoding, and a number or date argument is hashed as the text it renders as.Next rejects the charSet names UTF-16BE, UTF-32, ASCII and ISO-8859-1 when the email is saved; only UTF-8 and UTF-16 (any letter case) are accepted, with the same digests as Engagement.
Mod()differs 67 modulo number Returns the remainder after dividing the first number by the second (modulo).On Next a zero divisor, a quoted argument such as Mod("10", "3"), and Mod(3, 10) all make the email fail to render. A decimal result is printed without Engagement's rounding noise (Mod(-500.123, 12.456) gives -1.883) but a whole result from a decimal divisor keeps a trailing .0 (Mod(10, 3.5) gives 3.0).
Multiply()differs 67 multiply number Computes the product of two numeric values.Only the string "true" is read as 1 on Next, so Multiply("true", 1) renders 1 where Engagement aborts; other text such as "abc" still fails.
Now()differs 67 now date Returns the current system date and time in Central Standard Time, with no daylight-saving adjustment. Every call within one render returns the same instant.Next rejects Now() with any argument when the email is saved (AMPscript syntax error), whatever the spelling of the flag, so persistFormat cannot be used there.
Output()differs 67 — void Writes the result of a nested function call into the rendered content. A string literal, a bare variable or a number renders nothing at all, without raising an error.Next rejects at save any Output call with a nested function argument, such as Output(Concat("x")), even inside a branch that never runs, and also the zero-argument form; multi-argument calls were only tested with nested functions. A string literal, a variable or a number saves and renders nothing, where an Engagement email rejects Output by name.
OutputLine()differs 67 — void Writes the result of a nested function call into the rendered content, followed by a carriage return and line feed. A string literal, a bare variable or a number renders only the line break. The break is not an HTML line break, so an HTML view keeps everything on one line unless the content sits inside a preformatted element.Next rejects at save any OutputLine call with a nested function argument, such as OutputLine(Concat("A")), as well as the zero-argument form; multi-argument calls were only tested with nested functions. A string literal, a variable or a number saves and writes only a bare line feed, not the carriage return plus line feed Engagement writes.
ProperCase()differs 67 propercase string Converts a value to proper (title) case. Every letter after the first of a word is forced to lower case, so existing internal capitals are lost.A boolean renders as its text on Next: ProperCase(true) gives "True" where Engagement gives an empty string. A word starting with the German sharp s is capitalised to "SS" (ProperCase of "ßtrasse" gives "SStrasse", 8 characters) where Engagement keeps "ß".
RaiseError() 67 raiseError void Raises a runtime error, optionally skipping the current subscriber or returning an API error. Outside a send it is not a graceful abort: on a landing page it discards everything already written and answers the same generic failure any other aborting call gives, with the message nowhere in the response.
Random()differs 67 random number Returns a random integer between the two specified values (inclusive). Both bounds must be whole numbers; a decimal bound aborts the page. The bounds may be supplied in either order.On Next decimal bounds render instead of aborting (Random(1, 2.5) gave 2, Random(1.2, 1.8) gave 1), while bounds in reverse order such as Random(3, 1) or quoted bounds such as Random("1", "2") make the email fail to render.
RegExMatch()differs 68 regExMatch string Returns the first occurrence of a regular expression match in a string, selected by capture group. Matching is case-sensitive unless the IgnoreCase option is passed.MC Next uses a different regex engine that excludes .NET-only constructs. Options must be literal comma-separated text and can only be IgnoreCase, Multiline, Singleline, IgnorePatternWhitespace, or ExplicitCapture. In Next emails a group index written as a number literal stops the email with an error; pass the index as quoted text ("0"), which renders the same result as Engagement. A named group written literally failed because saving strips <name>; write the < and > of the group with Char(60) and Char(62), then the group name works as on Engagement.
Replace()differs 67 replace string Replaces all occurrences of a substring with a new value, matching case-insensitively. The source is scanned once, so text formed by a replacement is not replaced again.Next rejects the two-argument form when the email is saved, so always pass the replacement. A number or boolean literal in any argument, such as Replace("a-b", "-", 7), stops the email with an error; pass such values as quoted text.
ReplaceList()differs 67 — string Replaces every occurrence of each supplied search value with one common replacement value, matching case-insensitively. The search values are applied one after another in the order given, so text produced by an earlier replacement can still be matched by a later one.A number or boolean literal in any argument, such as ReplaceList(101101, "9", "0"), stops the email with an error on Next where Engagement treats it as text. Pass such values as quoted text.
RetrieveSalesforceObjects() 67 query rowset Retrieves records from a connected Salesforce Sales or Service Cloud object via Marketing Cloud Connect and returns them as a rowset. Requires an active Marketing Cloud Connect integration; a call against an unknown object name aborts the page.On Next, Empty() over a rowset with no matching records returns false (Engagement True); test RowCount(@rows) == 0 instead. The operators =, !=, >, >=, < and <= passed as literal strings work, several field/operator/value triplets are combined with AND, and a date compared with = accepts "yyyy-MM-dd". LIKE matches the value anywhere in the field and ignores % wildcards. An operator built with Char() fails: Char(60) made the preview fail with HTTP 500, and Concat(Char(60),"=") was rejected at publish with HTTP 400.
Row() 67 get row Returns a specific row from a rowset by its 1-based index. Index 0 (or any out-of-range index) aborts the page rather than returning an empty row.The difference shows when reading the row: Field(Row(@rows, 1), 1) on BuildRowSetFromString("North**South**East**West", "**") renders "true" on Next instead of "North". Row(@rows, 0) still aborts when assigned to a variable first, but written inline inside Field it rendered "true".
RowCount() 67 length number Returns the number of rows in a rowset.
SHA1()differs 68 sha1 string Returns the SHA-1 hash of the input value. The bytes hashed are the UTF-8 encoding of the input unless charSet names another encoding, and a number or date argument is hashed as the text it renders as.Next rejects charSet "ASCII" when the email is saved; UTF-8 and UTF-16 give the same digests as Engagement.
SHA256()differs 68 sha256 string Returns the SHA-256 hash of the input value. The bytes hashed are the UTF-8 encoding of the input unless charSet names another encoding, and a number or date argument is hashed as the text it renders as.Next rejects charSet "ASCII" when the email is saved; UTF-8 and UTF-16 give the same digests as Engagement.
SHA512()differs 68 sha512 string Returns the SHA-512 hash of the input value. The bytes hashed are the UTF-8 encoding of the input unless charSet names another encoding, and a number or date argument is hashed as the text it renders as.Next rejects charSet "ASCII" when the email is saved; UTF-8 and UTF-16 give the same digests as Engagement.
StringToDate()differs 67 — date Converts a date string to a date value. Behaves identically to DateParse for every input format, but takes no second argument, so DateParse is the only one of the two that can return the instant in UTC. A string the parser cannot read aborts the page instead of returning a sentinel, and an ambiguous day-first string such as 5/8/2026 is silently read month-first rather than rejected.On Next the value renders in the same US short-date form as on Engagement, and DatePart(), FormatDate() and DateDiff() accept it directly. An offset or GMT marker is converted to UTC rather than the account time zone (2026-03-04T09:05:07Z gives 3/4/2026 9:05:07 AM, Engagement 3:05:07 AM), and an unreadable string is returned unchanged where Engagement aborts.
StringToHex()differs 68 stringToHex string Converts a string to its hexadecimal representation. The bytes rendered are the UTF-8 encoding of the input unless charSet names another encoding.Next rejects the charSet names UTF-16BE, UTF-32, ASCII and ISO-8859-1 when the email is saved; UTF-8 and UTF-16 give the same hex as Engagement.
Substring()differs 67 substring string Extracts a portion of a string starting at the given index for the specified length. A start position below 1 is treated as the first character.Where Engagement is lenient, Next stops the email with an error: a start of 0 or below, a start past the end, a start or length written as quoted text ("7"), and a number or boolean source. A decimal start or length is truncated (Substring("Hello World", 2.5, 3) gives "ell") where Engagement aborts.
Subtract()differs 67 subtract number Computes the difference between two numeric values.On Next a quoted numeric argument such as Subtract("50", "15") or a negative literal such as Subtract(-5, 3) makes the email fail to render, while unquoted non-negative numbers work.
Trim()differs 67 trim string Removes leading and trailing whitespace from a value. Tabs, line breaks and the non-breaking space count as whitespace.Next does not strip the non-breaking space (Char(160)), and Trim(12345) or Trim(true) stops the email with an error. Runs of spaces typed in a string literal are collapsed to one before AMPscript runs, so build them with Char(32) when the count matters.
Uppercase()differs 67 uppercase string Converts a string to all uppercase characters. The German sharp s remains unchanged rather than expanding to SS.On Next the German sharp s expands to "SS": Uppercase("Straße") gives "STRASSE" (7 characters) where Engagement keeps "STRAßE". A boolean renders as its text: Uppercase(false) gives "FALSE" where Engagement gives an empty string.
URLEncode()differs 68 encodeURIComponent string URL-encodes a string for safe inclusion in a URL. By default only the part after a question mark is touched, so a value that is not a URL passes through unchanged unless the third argument is switched on.In Handlebars, encodeURIComponent encodes only what follows the address, such as a query string, which is what this function does by default; use encodeURI to encode a whole string. Neither helper takes the two switches of this function. With both switches off, Next gives the same result as Engagement. A switch value of 2 counts as on in Next, so URLEncode("spring sale", 2, 2) gives "spring%20sale" where Engagement leaves the text unchanged.
v()differs 67 — string Outputs a value inline, normally a variable reference. A string or number literal and a nested function call are accepted as well, each rendering its own value.