Chaining

Chaining When using Einstein Email Data Strings, strings can be chained together into a single string. The example below illustrates that for a ProductName attribute with a value Vintage Cruiser Bike, Vintage is changed to Classic and the product name is displayed in...

Order of Operations

Order of Operations Like other scripting languages, AMPscript is interpreted from top to bottom, which means that variables have to be declared and set before they can be used. However, email components are interpreted in the following order: Preheader HTML body Text...

Execution Context

Execution Context When creating web-based content — either landing pages, Web Collect or Smart Capture forms — the execution context of the page (‘load’ or ‘post’) can be detected by the global, read-only variable @@ExecCtx. The variable...

Marketing Cloud API Functions

Overview These AMPscript functions provide a means for interacting with the Marketing Cloud SOAP API in the context of a microsite page, CloudPage or MobileConnect SMS message. While they are more verbose than the regular AMPscript functions, these API functions do...

Using Variables

Using Variables Variables aren’t required in AMPscript. It’s possible to achieve the same result by just using functions, conditional statements and operators. However, without variables: functions and constants would need to be defined multiple times,...

Script Blocks

Script Blocks Script blocks can also be included within code blocks to whether the containing code should be interpreted. Two attributes can be included in a script block: name and type. Example 1 In the example below, the HTTPGet function will only be executed if the...