Index of AMPscript Functions
We organized the functions in this reference guide into categories based on the types of data that each function interacts with. For example, you can find information about AMPscript functions that manipulate dates and times in the Date & Time Functions category.
This table lists all of the existing AMPscript functions on a single page in alphabetical order. The purpose of this index is to make it easier to explore and discover AMPscript functions that you might not have encountered otherwise.
Function Name | Description | Category |
---|---|---|
Add() | Returns the sum of two numbers. | Math |
AddMscrmListMember() | Adds a record to a Microsoft Dynamics CRM marketing list. | Microsoft Dynamics CRM |
AddObjectArrayItem() | Adds an object to an array in a Marketing Cloud Engagement API object. | SOAP API |
AttachFile() | Attaches a file to an outgoing email message. | Content |
AttributeValue() | Returns the value of an attribute. | Utilities |
AuthenticatedEmployeeId() | Returns the employee ID of the current Marketing Cloud Engagement user. | Sites |
AuthenticatedEmployeeNotificationAddress() | Returns the email address of the current Marketing Cloud Engagement user. | Sites |
AuthenticatedEmployeeUserName() | Returns the username of the current Marketing Cloud Engagement user. | Sites |
AuthenticatedEnterpriseID() | Returns the enterprise ID of the current authenticated landing page user. | Sites |
AuthenticatedMemberID() | Returns the member ID of the authenticated landing page user. | Sites |
AuthenticatedMemberName() | Returns the member name of the authenticated landing page user. | Sites |
BarcodeUrl() | Generates a barcode based on an input string. | Content |
BeginImpressionRegion() | Denotes the beginning of a region to track with impression tracking. | Content |
BuildOptionList() | Creates a set of <option> tags that you can integrate into an HTML form on a landing page. | Content |
BuildRowsetFromJson() | Creates a rowset from JSON data. | Content |
BuildRowsetFromString() | Creates a rowset from a character string. | Content |
BuildRowsetFromXml() | Creates a rowset from XML data. | Content |
Char() | Returns a character when passed an ASCII character code. | String |
ClaimRow() | Returns the first unclaimed row from a data extension. | Data Extensions |
ClaimRowValue() | Searches a data extension for an unclaimed row and returns a value from that row. | Data Extensions |
CloudPagesURL() | Returns a CloudPages URL with an encrypted query string. | Sites |
Concat() | Concatenates strings of text. | String |
ContentArea() | Returns content contained in the specified content area by referencing its ID. | Content |
ContentAreaByName() | Returns content contained in the specified content area by referencing its name. | Content |
ContentBlockById() | Returns the content contained in a content block from Content Builder by referencing its ID. | Content |
ContentBlockByKey() | Returns the content contained in a content block from Content Builder by referencing its key. | Content |
ContentBlockByName() | Returns the content contained in a content block from Content Builder by referencing its name. | Content |
CreateMscrmRecord() | Creates a record in a Microsoft Dynamics CRM entity. | Microsoft Dynamics CRM |
CreateObject() | Creates a Marketing Cloud Engagement API Object. | SOAP API |
CreateSalesforceObject() | Creates a record in a Sales Cloud or Service Cloud object. | Salesforce |
CreateSmsConversation() | Creates an SMS conversation. | SMS |
DataExtensionRowCount() | Returns the number of rows in a data extension. | Data Extensions |
DateAdd() | Adds a specified time value to a date. | Date & Time |
DateDiff() | Returns the difference between two dates or times. | Date & Time |
DateParse() | Returns a DateTime object from a date string. | Date & Time |
DatePart() | Extracts a date part from a date or timestamp string. | Date & Time |
DecryptSymmetric() | Decrypts encrypted data using the supplied algorithm and encryption values. | Encryption |
DeleteData() | Deletes rows from a data extension in CloudPages, microsites, landing pages, and SMS messages. | Data Extensions |
DeleteDE() | Deletes rows from a data extension in emails. | Data Extensions |
DescribeMscrmEntities() | Returns the logical and display names of all Microsoft Dynamics CRM entities. | Microsoft Dynamics CRM |
DescribeMscrmEntityAttributes() | Retrieves information about the attributes of a Microsoft Dynamics CRM entity. | Microsoft Dynamics CRM |
Divide() | Returns the result of dividing the first parameter by the second parameter. | Math |
Domain() | Returns the domain part of an email address. | Utilities |
Empty() | Tests to see if a variable has a value. | Utilities |
EncryptSymmetric() | Encrypts plain text data using the supplied algorithm and encryption values. | Encryption |
EndImpressionRegion() | Denotes the end of a region to track using impression tracking. | Content |
EndSmsConversation() | End an active SMS conversation. | SMS |
ExecuteFilter() | Executes a data filter and returns an unordered rowset that contains the results. | Data Extensions |
ExecuteFilterOrderedRows() | Executes a data filter and returns an ordered rowset that contains the results. | Data Extensions |
Field() | Returns a specific field from a data row. | Data Extensions |
Format() | Formats a string in the specified format. | String |
FormatCurrency() | Formats a number as a currency value. | Utilities |
FormatDate() | Formats a string as a date value. | Date & Time |
FormatNumber() | Formats a number as a numeric type. | Utilities |
GetJwt() | Creates JSON Web Tokens. | Encryption |
GetJwtByKeyName() | Creates JSON Web Tokens. | Encryption |
GetPortfolioItem() | Returns the content of a file in your Portfolio. | Content |
GetPublishedSocialContent() | Returns content to share on a social media site. | Social |
GetSendTime() | Returns a timestamp for the beginning or end of a send. | Date & Time |
GetSocialPublishUrl() | Returns HTML code for sharing a content region on a supported social network. | Social |
GetSocialPublishUrlByName() | Returns HTML code for sharing a content region on a supported social network. | Social |
Guid() | Returns a Globally Unique Identifier (GUID). | Utilities |
HttpGet() | Returns the content from a specified URL. | HTTP |
HttpPost() | Sends data to a URL using the POST method. | HTTP |
HttpPost2() | Sends data to a URL using the POST method with additional error handling. | HTTP |
Iif() | Returns one parameter if a condition is true, and a different parameter if it’s false. | Utilities |
Image() | Returns the path to an image from your Portfolio by referencing its ID. | Content |
ImageById() | Returns the path to an image from Content Builder by referencing its ID. | Content |
ImageByKey() | Returns the path to an image from Content Builder by referencing its key. | Content |
IndexOf() | Returns the position at which a substring occurs within a string. | String |
InsertData() | Inserts rows into a data extension in CloudPages, microsites, landing pages, and SMS messages. | Data Extensions |
InsertDE() | Inserts rows into a data extension in emails. | Data Extensions |
InvokeCreate() | Invokes the Create method on an API Object. | SOAP API |
InvokeDelete() | Invokes the Delete method on an API Object. | SOAP API |
InvokeExecute() | Invokes the Execute method on an API Object. | SOAP API |
InvokePerform() | Invokes the Perform method on an API Object. | SOAP API |
InvokeRetrieve() | Invokes the Retrieve method on an API Object. | SOAP API |
InvokeUpdate() | Invokes the Update method on an API Object. | SOAP API |
IsEmailAddress() | Tests whether an email address is well formed. | Utilities |
IsChtmlBrowser() | Returns a value that indicates if a device’s user agent is a CHTML browser. | HTTP |
IsNull() | Tests whether the value of a variable or function is null. | Utilities |
IsNullDefault() | Lets you create default values for empty fields in Smart Capture forms. | Sites |
IsPhoneNumber() | Tests whether the supplied parameter is a valid North American phone number. | Utilities |
Length() | Returns the number of characters in a string. | String |
LiveContentMicrositeUrl() | Returns a link to view live content on a microsite. | Sites |
LocalDateToSystemDate() | Converts a local datetime string to the system time. | Date & Time |
LongSfid() | Returns an 18-character Salesforce ID when provided with a 15-character ID. | Salesforce |
Lookup() | Returns a value from a data extension. | Data Extension |
LookupOrderedRows() | Returns rows from a data extension sorted in ascending or descending order (case-insensitive). | Data Extensions |
LookupOrderedRowsCS() | Returns rows from a data extension sorted in ascending or descending order (case-sensitive). | Data Extensions |
LookupRows() | Returns an unordered rowset from a data extension (case-insensitive). | Data Extension |
LookupRowsCS() | Returns an unordered rowset from a data extension (case-sensitive). | Data Extension |
Lowercase() | Returns the provided string using only lowercase letters. | String |
MD5() | Converts a string to a 128-bit hexadecimal MD5 hash. | Encryption |
MicrositeUrl() | Returns a microsite URL with an encrypted query string. | Sites |
Mod() | Returns the remainder after dividing the first parameter by the second parameter. | Math |
Multiply() | Returns the product of two numbers. | Math |
Now() | Returns the current system timestamp. | Date & Time |
Output() | Returns the result of an AMPscript function. | Utilities |
OutputLine() | Returns the result of an AMPscript function followed by a newline character. | Utilities |
ProperCase() | Returns specified string with the first letter of each word capitalized. | String |
QueryParameter() | Retrieves a value from a URL query string. | Sites |
RaiseError() | Raises an error and stops the processing of an email job. | Utilities |
Random() | Returns a random number within a defined range. | Utilities |
Redirect() | Redirects landing page visitors to a different URL. | Sites |
RedirectTo() | Creates a link using data from an attribute, data extension field, or variable. | HTTP |
RegExMatch() | Searches for a pattern in a string by using a regular expression. | String |
Replace() | Replaces every occurrence of one substring with a different substring. | String |
ReplaceList() | Replaces one or more substrings with another string. | String |
RequestHeader() | Retrieves the header from an HTTP request for a landing page. | HTTP |
RetrieveMscrmRecords() | Retrieves data from Microsoft Dynamics CRM entities. | Microsoft Dynamics CRM |
RetrieveMscrmRecordsFetchXml() | Returns the attributes specified in a Fetch XML query. | Microsoft Dynamics CRM |
RetrieveSalesforceJobSources() | Returns a rowset that contains information about a send. | Salesforce |
RetrieveSalesforceObjects() | Returns a rowset with that contains data that matches the criteria you specify. | Salesforce |
RequestParameter() | Returns the value of a parameter from a form field or landing page URL parameter. | Sites |
Row() | Returns a row from a rowset or array. | Data Extensions |
RowCount() | Returns the number of rows in a rowset or array. | Data Extensions |
SetObjectProperty() | Sets a value for an object created by the CreateObject() function. | SOAP API |
SetSmsConversationNextKeyword | Sets the keyword in an SMS conversation. | SMS |
SetStateMscrmRecord() | Sets the state and status of a Microsoft Dynamics CRM record. | Microsoft Dynamics CRM |
SHA1() | Converts a string to a 160-bit hexadecimal SHA-1 hash. | Encryption |
SHA256() | Converts a string to a 256-bit hexadecimal SHA-2 hash. | Encryption |
SHA512() | Converts a string to a 512-bit hexadecimal SHA-2 hash. | Encryption |
StringToDate() | Converts a date string to a .NET datetime object. | Date & Time |
StringToHex() | Converts each character in a string to its hexadecimal equivalent. | String |
Substring() | Returns a portion of a string, beginning at a specified character position. | String |
Subtract() | Returns the result of subtracting the second parameter from the first parameter. | Math |
SystemDateToLocalDate() | Converts the system time to a local datetime string. | Date & Time |
TransformXml() | Applies an XSL transform to XML data. | Content |
TreatAsContent() | Treats a string as though it came in from a content area. | Content |
TreatAsContentArea() | Treats content from a data extension as though it came from a content area. | Content |
Trim() | Removes white space from the beginning and end of a string. | String |
UpdateData() | Updates data in a data extension in CloudPages, microsites, landing pages, and SMS messages. | Data Extensions |
UpdateDE() | Updates data in a data extension in emails. | Data Extensions |
UpdateMscrmRecords() | Updates one or more records in a Microsoft Dynamics CRM entity. | Microsoft Dynamics CRM |
UpdateSingleSalesforceObject() | Updates a record in a Salesforce object. | Salesforce |
Uppercase() | Returns the provided string using only uppercase letters. | String |
UpsertContact() | Upserts contact data. | Content |
UpsertData() | Upserts data in a data extension in CloudPages, microsites, landing pages, and SMS messages. | Data Extensions |
UpsertDE() | Upserts data in a data extension in emails. | Data Extensions |
UpsertMscrmRecord() | Upserts a Microsoft Dynamics CRM record. | Microsoft Dynamics CRM |
UrlEncode() | Modifies a string to only include characters that are safe to use in URLs. | HTTP |
v() | Outputs the value of a variable. | Utilities |
WAT() and WATP() | Returns the values of a Web Analytics Tracking (WAT) parameter. | Content |
WrapLongURL() | Returns a shortened URL when provided with a long URL. | HTTP |