Content Functions

Use the Content functions to modify and retrieve content from your Marketing Cloud Engagement account. With these functions, you can use AMPscript to interact with content in Content Builder, Classic Content Areas, and your Portfolio.

This section contains information about these AMPscript functions.

Function NameDescription
AttachFile()Attaches a file to an outgoing email message.
BarcodeUrl()Generates a barcode based on an input string.
BeginImpressionRegion()Denotes the beginning of a region to track with impression tracking.
BuildOptionList()Creates a set of <option> tags that you can integrate into an HTML form on a CloudPage.
BuildRowsetFromJson()Creates a rowset from JSON data.
BuildRowsetFromString()Creates a rowset from a character string.
BuildRowsetFromXml()Creates a rowset from XML data.
ContentArea()Returns content contained in the specified content area by referencing its ID.
ContentAreaByName()Returns content contained in the specified content area by referencing its name.
ContentBlockById()Returns the content contained in a content block from Content Builder by referencing its ID.
ContentBlockByKey()Returns the content contained in a content block from Content Builder by referencing its key.
ContentBlockByName()Returns the content contained in a content block from Content Builder by referencing its name.
EndImpressionRegion()Denotes the end of an impression tracking region.
GetPortfolioItem()Returns the content of a file in your Portfolio.
Image()Returns the path to an image from your Portfolio by referencing its ID.
ImageById()Returns the path to an image from Content Builder by referencing its ID.
ImageByKey()Returns the path to an image from Content Builder by referencing its key.
TransformXml()Applies an XSL transform to XML data.
TreatAsContent()Treats a string as though it came in from a content area.
TreatAsContentArea()Treats content from a data extension as though it came from a content area.
WAT() and WATP()Returns the values of a Web Analytics Tracking (WAT) parameter.