Utility Functions

Overview AMPscript includes several miscellaneous functions which provide conditional evaluation, variable output and other utilities.

String Functions

Overview The string AMPscript functions are generally used to perform any string operation, including parsing, converting, concatenating, trimming and matching.

AttributeValue

AttributeValue This function returns the value of an attribute based on the context of the Contact or Subscriber. These values are derived from a field or attribute related to the Contact or Subscriber that the message is sent to. These can include the following data...

AuthenticatedEmployeeUserName

AuthenticatedEmployeeUserName This function returns the username of the authenticated Marketing Cloud account user who is accessing the page. This is useful when creating customized pages for child Business Units (a feature available in earlier Enterprise 2.0...

Char

Char This function returns the ASCII character for the specified ASCII character code. Arguments Char(1,2) Ordinal Type Required Description 1 Number True Character code 2 Number False Number of times to repeat the ASCII character returned Example %%[ var @greeting...

Domain

Domain This function returns the domain of an email address. Argument Domain(1) Ordinal Type Required Description 1 String True The email address NOTE: If the argument passed to the function is not a valid email address, the function will return a null output. Example...