How AMPScript Functions Changed with Salesforce Content Builder?
How AMPScript Functions Changed with Salesforce Content Builder?
January 2019

Introduction to AMPScript

AMPscript is a scripting language that you can embed within HTML emails, text emails, landing pages, SMS messages, and push notifications from Mobile Push. The system executes the script at the point where you include it in the message to render content on a subscriber-by-subscriber basis. All AMPscript functions are supported by the Salesforce Marketing Cloud application towards the end of the email send functionality. Salesforce Marketing Cloud enables users to create and manage marketing relationships and campaigns through a customer relationship management (CRM) platform catered to marketers. Please see below examples of AMPScript functions used in Salesforce Content Builder (e.g. – Salesforce Marketing Cloud):

AttachFile
ContentBlockByID
ContentBlockbyName
DataExtensionRowCount

AMPScript Functions Changes within Salesforce Content Builder

Starting mid-2019, Salesforce Content Builder will no longer support certain AMPScript functions such as: ContentArea and ContentAreaByName. Content Area produces content contained in a specified stored area (i.e. – %%=ContentArea(‘11’)=%%; system returns the content of content area 11). In contrast, ContentAreaByName produces content contained in a specified stored content area as well (i.e. – %%=ContentAreaByName(‘mycontents\NY DMV\License Plate Numbers’)=%%; system returns the content of stored area named License Plate Numbers within the NY DMV folder). Salesforce Content Builder enables users to consolidate images, documents, and content through their content management tool in Marketing Cloud.

Alternative AMPScript functions for ContentArea and ContentAreaByName

Email templates containing ContentArea and ContentAreaByName can utilize ContentBlockByName as a replacement function. ContentBlockByName produces content contained in the specified stored content block (i.e. – %%=ContentBlockByName(“ContentBuilder\NY DMV\License Plate Numbers”). The code output would be the License Plate Numbers data. Please see sample code below:

The HTML Code below will ensure that the ContentBlockByName AMPscript function returns the appropriate data for the user within Salesforce Content Builder:

HTML Code

%%[

SET @ContentName = “Content Builder\my contents\NY DMV\License Plate Numbers”

]%%

%%=ContentBlockByName(@ContentName)=%%

*Text highlighted in yellow represent the path of the folder where the data is stored in Salesforce Content Builder

 

To learn more about FinServ Consulting’s services, please contact us at info@www.finservconsulting.com or (646) 603-3799.

 

About FinServ Consulting

FinServ Consulting is an independent experienced provider of business consulting, systems development, and integration services to alternative asset managers, global banks and their service providers. Founded in 2005, FinServ delivers customized world-class business and IT consulting services for the front, middle and back office, providing managers with optimal and first-class operating environments to support all investment styles and future asset growth. The FinServ team brings a wealth of experience from working with the largest and most complex asset management firms and global banks in the world.