Handlebars is the templating language of Marketing Cloud Next. This page lists every helper the language catalog knows about, where it came from, which Core API version introduced it, and whether AMPscript can express the same thing.

Catalogued, not runtime-proven

These rows come from the same language catalog that powers the SFMC Language Service and the ESLint rules. Unlike the Engagement AMPscript reference, no helper here has been through a runtime sweep yet — each name links to the official Salesforce reference instead of to a page on this site.

Origin tells you where a helper comes from: a Marketing Cloud Next helper is specific to the platform, a Handlebars built-in is part of the Handlebars language itself, and a Marketing Cloud Next platform entry is exposed by the runtime rather than by the templating layer.

All helpers

Every helper links to the official Salesforce reference — none of them has been through a runtime sweep on this site yet. API version is the Marketing Cloud Next Core API version the helper became available in.

Helper API versionAMPscript Returns Description
add {{add value1 value2}} 65 Add number Returns the sum of two numbers, rounded to 2 decimal places.
and {{and value1 [value2] [...valueN]}} 65 andkeyword boolean Returns true only when all operands are truthy.
char {{char code [repeated]}} 65 Char string Returns the Unicode character for a character code, optionally repeated.
compare {{compare leftValue operator rightValue}} 65 !=operator,<operator,<=operator,>operator,>=operator boolean Compares two values using a specified operator.
concat {{concat value1 [value2] [...valueN]}} 65 Concat string Combines multiple values into a single string. Null values are skipped.
dateAdd {{dateAdd date number interval}} 67 DateAdd string Adds or subtracts an amount of time to a date.
dateDiff {{dateDiff date1 date2 interval}} 67 DateDiff integer Calculates the time difference between two dates in a specified unit.
divide {{divide dividend divisor}} 65 Divide number Returns the quotient of dividing the first value by the second.
eachblock {{#each collection}}…{{/each}} 65 forkeyword string Iterates over arrays, lists, and objects, rendering a block for each element.
equals {{equals value1 value2 [compareAs]}} 65 ==operator boolean Compares two values for equality, optionally by a comparison type.
fallbackinline or block {{fallback value fallbackValue}} 65 IsNullDefaultapproximate any Returns a fallback value when the first argument is null, empty, or throws an exception.
filter {{filter list fieldName comparisonOperator targetValue filterAs}} 65 array Returns a list of items that match a field/operator/value condition.
flatten {{flatten nestedList}} 65 array Flattens a nested list of lists into a single list.
format {{format subject formatString [type] [culture]}} 65 Formatapproximate,FormatDateapproximate string Formats output based on a format string and optional type specification.
formatCurrency {{formatCurrency number [cultureCode]}} 65 FormatCurrencyapproximate string Formats a number as a currency value for a locale.
formatNumber {{formatNumber number formatType [cultureCode]}} 65 FormatNumber string Formats a number as a specific numeric type, such as decimal or percentage.
get {{get collection indexOrKey}} 65 Fieldapproximate,Rowapproximate any Retrieves a value from a list or map by index or key.
getContentBlock {{getContentBlock key}} 67 ContentBlockByKeyapproximate string Retrieves and renders a content block within a template.
hashsubexpression only (hash ...pairs) 67 object Constructs an object from key-value pairs. Used only as a subexpression within other helpers.
ifblock {{#if condition}}…{{/if}} 65 elsekeyword,elseifkeyword,ifkeyword string Conditionally renders a block based on whether a value evaluates to true.
iif {{iif expression leftResult rightResult}} 65 IIf any Returns one of two values based on whether an expression is true or false.
indexOf {{indexOf subject search}} 65 IndexOfapproximate integer Returns the 1-based position of a substring within a string (case-insensitive).
isEmpty {{isEmpty input}} 65 Empty,IsNullapproximate boolean Returns true when a value is null, undefined, or an empty string.
jsonPath {{jsonPath object expression}} 67 BuildRowsetFromJSONapproximate any Queries and filters JSON objects using a JSONPath expression.
length {{length subject}} 65 Length,RowCountapproximate integer Returns the length of a string or the number of elements in an array.
lookup {{lookup object key}} 67 any Dynamically accesses an object property or array element by a variable key.
lowercase {{lowercase subject [culture]}} 65 Lowercase string Converts all letters in a string to lowercase.
map {{map list fieldName}} 65 array Extracts a specific field from each object in a list.
modulo {{modulo value1 value2}} 65 Mod number Returns the remainder after dividing the first value by the second.
multiply {{multiply value1 value2}} 65 Multiply number Returns the product of two numbers, rounded to 2 decimal places.
not {{not value}} 65 notkeyword boolean Returns true when the operand evaluates to false.
now {{now}} 67 Nowapproximate string Returns the current server date and time in UTC. Takes no parameters.
or {{or value1 [value2] [...valueN]}} 65 orkeyword boolean Returns true when at least one operand is truthy.
personalizationResult {{personalizationResult key}} 65 AttributeValueapproximate any Retrieves a personalized value by key from the subscriber context.
properCase {{properCase subject [culture]}} 65 ProperCase string Capitalizes the first letter of each word and lowercases the rest.
query {{query object type [...options]}} 67 LookupOrderedRowsapproximate,LookupOrderedRowsCSapproximate,LookupRowsapproximate,LookupRowsCSapproximate,RetrieveSalesforceObjectsapproximate array Retrieves multiple records from Sales Cloud or marketing object data sources.
queryFirst {{queryFirst object type [...options]}} 67 Lookupapproximate object Retrieves the first record from Sales Cloud, marketing objects, or data graphs matching criteria.
raiseError {{raiseError errorMessage [errorCode]}} 67 RaiseErrorapproximate void Throws an exception with a message and optional error code, halting rendering.
random {{random first second}} 65 Random integer Returns a random integer between two values (inclusive).
repeatblock {{#repeat count}}…{{/repeat}} 65 string Repeats a block a specified number of times, exposing index, first, and last loop variables.
replace {{replace subject search replacement [culture]}} 65 Replaceapproximate string Replaces every occurrence of a substring with another (case-sensitive).
setblock {{#set ...assignments}}…{{/set}} 65 setkeyword,varkeyword,=operator string Performs local variable assignment within the block scope. Variables do not persist outside the block.
slice {{slice list startIndex [endIndex]}} 65 array Returns a portion of a list between two indices (end index exclusive).
sort {{sort list fieldName sortOrder sortAs}} 65 array Sorts a list of objects by a field, order, and type.
substring {{substring subject start [length]}} 65 Substring string Extracts a portion of a string starting from a 1-based position.
subtract {{subtract value1 value2}} 65 Subtract number Returns the difference of subtracting the second value from the first.
timeZoneConversion {{timeZoneConversion date sourceTZ targetTZ}} 67 LocalDateToSystemDateapproximate,SystemDateToLocalDateapproximate string Converts a date from one time zone to another.
trim {{trim subject}} 65 Trim string Removes leading and trailing whitespace from a string.
unlessblock {{#unless condition}}…{{/unless}} 65 string Conditionally renders a block based on whether a value evaluates to false.
uppercase {{uppercase subject [culture]}} 65 Uppercase string Converts all letters in a string to uppercase.
withblock {{#with object}}…{{/with}} 65 string Changes the block context to a specified object so properties can be accessed directly.