Syntax

Syntax As AMPscript is a server-side language, the code can be included in any location in an email, web page, SMS or push message. Similar to other scripting languages, AMPscript is interpreted and not compiled, which means that it’s interpreted in the order it...

AMPscript Blocks

AMPscript Blocks AMPscript blocks are used to define code for interpretation but do not display output where the code appears in the email or on the page. There are some exceptions to this rule through the provision of two functions, Output and OutputLine, which...

Inline AMPscript

Inline AMPscript Inline AMPscript provides a convenient method of interpreting and executing a function within message content. Unlike AMPscript blocks, inline AMPscript can only be used with a single function, and the function output is displayed where the inline...

Tag-based Syntax

Tag-based Syntax As an alternative to the AMPscript block syntax, the HTML script tag is also supported. This syntax can be beneficial when developing in both Server-Side JavaScript (SSJS) and AMPscript, as it provides a standardized syntax for interpreting both...

Functions

Functions In programming, a function is a named section of a program that takes some input values (or arguments) to perform a specific task and produce an output value. While other scripting languages offer user-defined functions (for example, JavaScript), AMPscript...

AMPscript and Excel

AMPscript and Excel AMPscript functions work in much the same way as they do in Microsoft Excel; that is, parameters are set for a predefined function, which are interpreted and, in turn, return a value. Several AMPscript functions are identical to Excel functions –...