Ampscript is one of the language of Salesforce Marketing Cloud. Ampscript runs on the servers of Salesforce Marketing Cloud. The code is embedded in the HTML emails, email text messages, landing pages, mobile phone messages, mobile app push notifications.
The code is rendered from top to bottom. What I mean is, it is an interpreted language. We do not need any special compiler to run it.
I mostly use it for email or any Salesforce Marketing Cloud message personalization. To create a personalized message, the Ampscript code needs to be interacting with the data model in the marketing cloud. The data mostly recorded in the Data Extensions of Marketing Cloud. In some case, the data may be in lists, or comes with json payloads thru an API interaction. In my following articles, I will give more information on how to interact with data.
When using Ampscript as Ampscript Block, the code is written between double percentage and squared brackets( %%[ ]%% )
This is an simple syntax of an Ampscript Block:
%%[ var @firstName var @lastName set @firstName = "Mustafa" set @lastName = "Unlukara" ]%%
The Ampscript code, when used in HTML (inline) is written in double percentage chars (%%).
Here is an simple example:
<html> <body> Dear %%=v(@firstName)=%% %%=v(@lastName)=%%,<br />Thank you for choosing our company as your service provider. </body> </html>
Here is the syntax for it:
<script runat="server" language="ampscript"> /* Write your Ampscript code here. */ </script>
Data Management Platforms, aka DMPs, are main platforms for keeping digital data related to digital marketing. Such as, Cookie IDs, browser information and mobile identifiers. They help to market to different customer segments, demographic customers, past browser interactions, customer locations, multiple device usages and many more…
Why to use DMPs?
- First of all, all of your data comes to an unique, single platform. You get a view of your customers over multiple browsers, devices, locations and etc…
- DMP can find you new and identical customers. All big DMPs provide a lookalike statistical modeling to find similar audience(or customer) to your current audience(or customer).
- DMPs provide regular and real-time results. You obtain a long term, regular and continuous look over your customer or lookalike customers via DMP.
These are the top benefits I found to use DMPs.
What are the top DMP Platforms.
Nowadays, these platforms are the most used DMP Platforms.
- Salesforce DMP (Previously known as Krux)
Formerly known as Krux. Salesforce obtained Krux late 2016 and it is now Salesforce DMP. This is a DMP tool that digital marketers capture and unify data from multiple touches. It is backed with Salesforce Einstein artificial intelligence. It has enormous machine learning capabilities that helps marketers to track customers(or lookalike customers) from multiple channels.
OnAudience.com provides a very easy use interface. They provide fast and easy audience segmentation based on popular attributes such as gender, age, interests and etc… This software is getting more attention from digital marketers each year.
Snowflake has a one feature that benefits to digital marketers. It is data management service. It provides a fast and easy data management service opportunity for your data management requirements. This service eliminates need to integrate your data to your DMP or creating data manipulation ahead of using a DMP service. Snowflake has an easy integration tools to gather data from your multiple cloud-based software.
You can connect and feed Lotame with multiple data sources such as email, social data, mobile data, CRM data and etc… In addition to DMP features, Lotame provides tools to enhance your website optimization for your marketing purposes. Lotame also provides an effective first party data onboarding service.
CloudEra is one of the few platforms for any kind of data. CloudEra provides tools for Data Engineering also. It provides a data hub service for your multiple data sources. Also you can keep some of your operational data in CloudEra and share that information with CloudEra provided DMP service, which makes a faster return on results when you need faster results (for instance finding a lookalike customers for your ecommerce site during a short holiday/campaign season).
Nielsen allows you to select from their extensive audience segmentation. They provide personalized advertising and content across multiple channels. Your company users may be able to make analysis on customer journeys.
To write a basic definition, marketing automation is the use of software applications and computer hardware to create processes to replace marketing operations (and tasks) for our marketing purposes.
Software applications in today’s marketing world, has a lion’s share in marketing automation. Expectation from a simple marketing automation software is able to create an email newsletter, with some automatically created content if possible.
Personalization of the message to the customer has lion’s share on the marketing purposes. Personalization, still has a big importance, because managing marketing budget for sending the right message to the right audience at the right time is very important. In today’s world still some parts of the marketing budget goes to the audiences that do not want the message we sent (or simply some of the marketing budget goes to the people who do not want to get messages from us) .
Data manipulation (or data operations) has the lion’s share among the processes. A message created in marketing automation, requires many data points from multiple software systems. A personal message, requires at least the name of the person which may come from our CRM system. We may want to take attention of that person with a better discount on specific products, based on that persons previous purchase history, which may come from our Accounting or Orders software system. Only this single aim requires us to make integration between our Marketing Automation, CRM and Accounting systems. Then, we need to make adequate data manipulation to select the right persons for the right message.
Other reasons, that make Marketing Automation important are; gather traffic to your product or service (or website), convert that traffic to prospective leads, generate sales from those leads and increase your revenue on the previous customers. The best marketing automation tools all of these processes are executed automatically.
A simple business case on how marketing automation works is: A person browses sneakers on your web store. He/she sees a pop-up which says get a 10% discount offer on all sneakers when he/she fills-out a simple form. When the person fills the form, the marketing automation software sends a personalized message (according to the filled form data) in your corporate email template.
Another simple business case is for abandoned shopping cart emails. Sending an email, designed to get attention of people who abandoned their shopping cart in your website. Those people may get a reminder or a small amount of discount to have encourage! to finish their purchase.
There are many examples of how you can use marketing automation. Here are some;
- Automatically sharing your message at different social media accounts.
- Dynamic pricing to your products according to behaviors of people.
- Use all interactions of people with your company for creating right marketing messages.
- Create set of rules and journeys for your visitors, customers and prospective customers.
- Integrate all software in your company such as Accounting, CRM, Service, ERP for your marketing purposes.
- Manage all your leads, sales, marketing and other tools from a single dashboard.
Adobe Campaign, Salesforce Marketing Cloud, Oracle Eloqua and Marketo (now Adobe Marketo) are the best providers of Marketing Automation Software.
Companies save lots of time converting their repetitive marketing tasks to automated processes.
People (customers) tend to respond more and faster, when they get personalized marketing messages. This improves ROI.
Quality of the leads jump over the expectations. The higher of the quality of the leads, the more sales.
Abilities and corporation of sales, service, production and marketing people in the company increases.
The last one in my mind is the awareness to your company. Marketing automation has a huge positive impact on the awareness to your products or services.
If you are user of Salesforce Marketing Cloud, or managing a project that deals with Salesforce Marketing Cloud, you may hear these terms from the tech and developer teams.
- Contact Key
- Contact ID
- Subscriber Key
All of these sounds familiar, and seems to point the same thing, right? I bet you know the answer, these are all related to Contact Data in Salesforce Marketing Cloud.
Let’s look one by one.
This is a unique identifier of the contact, that is related to different channels. So, a single contact key works between the contact itself, the channels and the relationship. The Contact Key is the same for the contact among multiple (different) channels.
Imagine that one of your contact is in your email channel. There is a specific identifier for the contact in email channel, for instance email address (I know what technical architectures think, just assume the simplest case). Then, this contact is also in one of our text message list. This channel uses the mobile phone number as a specific identifier.
As a marketing manager, you want to be consistent among these two channels. You do not want the same person to get an email and text message for the same message.
The Contact Key gives you this ability and consistence. Existence of the contact key gives you the consistence of sending messages thru multiple channels and identify your contacts. Email and Text Message channels in our case.
Contact ID is a unique number for your contacts in Salesforce Marketing Cloud. This number helps uniquely identifying the contact on the back-end system. This is an application level number thru the entire Marketing Cloud system.
This is the most known key among marketers. Subscriber Key identifies the contacts in the Email Studio. Since email is the most used communication channel, Email Studio is the most used app in Salesforce Marketing Cloud. I have never seen anyone who does not heard about the Subscriber Key.
What are the benefits of Subscriber Key ?
- Maintains uniqueness of a single separate contact among all subscriber attributes. (For instance, if two of your contacts use exactly the same email address, you can maintain two different set of subscriber attributes to these persons.) It sounds confusing, let me give a specific real life example. Lets think a wife and a husband shops for different products from your store. Wife purchases and has an interest on kitchen appliances. The husband purchases and has an interest on tech products. They share the same email address. You know, they use the same email, but they want to get marketing emails according to their interests. Yes, you bet, Subscriber Key helps you to identify these two persons.
- Sometimes, a single person may need to get a single communication message for multiple emails he/she owns. You may have both business email address and personal email address of a person. If you want to send marketing messages only on his/her personal email. Then, you need to identify this person on Subscriber Key.
Subscriber Key decision depends on the business purposes. The Subscriber Key must be consistent among all your entire marketing operations.
And keep in your mind, good Marketing Cloud experts never use the email address as Subscriber Key.
Hope this article helped you understanding the differences between Customer Key, Contact ID and Subscriber Key. If you liked my article, please share it with your Social Media, please feel free to write your comments below.
Ampscript is a very easy way to personalize emails dynamically in Salesforce Marketing Cloud.
When you have a “Sendable Data Extension”, we are able to populate the data in the fields by adding fieldname between double percentage (%%) signs.
Here is an example;
Let’s say our Sendable DataExtension contains the following records.
We want to start emails with the following format,
In our data extension, we do not have Proper case for values. Some first name values are missing.
We need to send First names in a proper case, and for the missing values we need to use “Valued Customer” text, instead of sending emails with missing first name.
Here is the Ampscript solution code of the personalization ampscript.
“Valued Customer” is added by IIF statement when the first name value of the customer record is missing.
In this tutorial, I explain how to create a free Salesforce Developer account.
In your internet browser, open website developer.salesforce.com .
This is the address for many of the Salesforce Developer related material. You may browse the page and get familiar with the content provided by Salesforce for Developers. In the future videos, I am going to provide more content and useful details about the Salesforce Development.
For now, we need to create a free Salesforce Developer account.
On the top right side of the developer website, you may see a green “Sign Up” button. Please, click on that button.
On the new page you will see a sign-up form.
In the Name fields, please write your First and Last Name.
In the Email field, you have to use a real email address. This email address is your unique email address in the system. You may need this email to reset your password, system notifications, other communications and get your developer tokens. By the way, if you do not know about tokens, please do not mind it now. Later, we will look into that in more detail.
You may provide your business role and your company name.
Under these, you need to select your Country, and your postal code.
The last field is your username. This field is pretty important and has some tricks. First, you have to use this username to log in to the developer account. And, secondly, you have to use an email format in your username. The simplest username is your real email address. But, you may also use a non-existent and unique email address as well.
What does this mean in your practical life?
Well, if you want to use your Salesforce developer account to learn more and develop on the system, in the future, you may need more than one Salesforce Developer account.
So, to have multiple Salesforce Developer accounts, you may use many unique developer accounts with different usernames. In my case, I have more than a hundred free Developer accounts that I opened during my last 8 years of Salesforce experience. I bet, you may need more than a single developer account soon as you learn more on Salesforce CRM.
Let’s write an email as username. Here, I use my name, a plus sign, a number and my domain name. Here is my format mustafa+103@myDomainName.com
In your email box, you should receive a verification email coming from Salesforce.
In this email, click on to the Verify Account button.
Now, you need to create a strong password to login to your Salesforce developer account. After creating your password, below the page, Salesforce asks you to give an answer of a personal question, for additional security. You may select one of your favorite personal question one and answer it.
Then, click on to the Change my password button.
Here it is. You did it.
Now, you are in your free Salesforce Developer Account. Congratulations.
This is the end of this article. Thanks for reading. If you liked my video and my article and want more videos, please subscribe to my Youtube channel and add your comments below.
Salesforce made a new partnership with Microsoft recently.
Microsoft Azure platform is going to host the Salesforce Marketing Cloud.
The Salesforce and Microsoft new alliance is not only limited to the Marketing Cloud. Now, Salesforce is going to build an integration between its Sales and Service Clouds to Microsoft Teams also. So, the new integration will make life easier for mutual users of both brands on these platforms. The Microsoft Teams users will be able to search their contacts directly in their Teams app in the early months of 2021. Previously, Salesforce created integrations to some other Microsoft platforms like OneNote and Skype for Business.
In one statement Salesforce co-CEOs Marc Benioff and Keith Block said, “We are excited to expand our partnership with Microsoft and bring together Salesforce with Azure and Teams to deliver incredible customer experiences.”
Salesforce currently uses both Amazon Web Services and Google Cloud Platform. The new Microsoft agreement makes Salesforce a big customer for all of the three Cloud Providers. Salesforce mentioned that this new agreement has no impact on its relations with the other two platforms.
This is a huge and meaningful win for Microsoft, just after Microsoft Azure is chosen by the Pentagon.
Today, Salesforce announced its new CMS platform. The main motivation is to provide a tool to distribute your content to any channel or device by using this CMS.
As you know, the current marketing world depends on omnichannel. As users of these marketing tools, we expect consistent customer experience. We expect the same consistency from the email we read, from the store we visit, from the video we watch, from the support team we contact, from the salesperson we met, or even from the message of the CxO of the brand we read on the newspaper.
Salesforce thinks that there is a gap with the current CMS systems that brands use. When brands are interacting with us, Salesforce believes that CMS systems should be more improved when increasing the customer experience when customers are in a customer journey in some way. For instance, if one of the salesperson(or a marketing email, you name it) of the brand offers a unique 10% discount to a user, that user expects that price or promotion while browsing the website of the brand. This is the gap Salesforce focuses to fill with the new CMS.
On the other side, there is another problem with traditional CMS systems. When a marketing team creates a new campaign, it may take days (or even months in some cases) for the developer and designer team to add that campaign info to the website. Salesforce offers a connected system advantage between CRM, Marketing Cloud with CMS.
Simplicity is a keyword.
The new CMS offers brands to create, manage and deliver content easily. Any person in the Marketing team may be able to create a CMS content within the consistency of the CMS structure.
Touches the other Software
Yeap, all Salesforce software used in the company is going to connect with your CMS. The info in a personalized email from Salesforce Marketing Cloud, a unique offer in Salesforce CRM, a special service record in Salesforce Service Cloud will be connected with the CMS piece of the customer touch.
With Salesforce, now the CMS is going to be part of the Customer Experience magic!
Here you can find the list of current Salesforce Marketing Cloud Personalization Strings that are used for Email Data.
|%%xtmonth%%||Full name of the month in which the email is sent|
|%%xtmonthnumeric%%||Current month as a number|
|%%xtday%%||Current date of the month when the email was sent (for example, 22)|
|%%xtdayofweek%%||Current day of the week when the email was sent (for example, Thursday)|
|%%xtyear%%||The current year when the email was sent|
|%%xtshortdate%%||Current date when the email was sent in a short format. For example, 12/13/2010|
|%%xtlongdate%%||Current date when the email was sent in a long format. For example, Monday, December 13, 2010|
|%%linkname%%||Descriptive name of a hyperlink, known as the link alias. This string populates with the value of the link’s alias or the complete URL if no alias is specified at the link level. This personalization string is only available in use with the web analytics connector. This string allows web analytic programs to identify web activity that initiated from an individual link within the email. Link alias values generated via personalization strings, AMPScript, or SSJS does not reflect in the %%linkname%% value.|
|%%emailname_%%||The internal name of the email|
|%%_messagecontext%%||The context in which the customer views the email. Resolves to these values:|
SEND – Display the rendered final message for sending to the subscriber
PREVIEW – Display the send preview options available within the editor
VAWP – Display content
VIEWSENT – Display the non-subscriber link to preview content
FTAF – Display the rendered Forward To a Friend message
LANDINGPAGE – Display a landing page or microsite
VALIDATION – Display information corresponding to the validate option in Marketing Cloud
LINKRESOLUTION – Display resolved dynamic script at click time
SMS – Display SMS message content
SOCIAL – Display Social Forward content
SITE – Display CloudPage content
|%%_MessageTypePreference%%||Resolves to Text or HTML according to the subscriber’s email type preference|
|%%_replycontent%%||The body of the email you sent. This personalization string is used in triggered sends to place the body of an email into a reply email|
|%%_IsTestSend%%||Resolves to True if the email job is marked as a Test Send.|
if _isTestSend == false then
… // this code does not run for test sends
|%%jobid%%||Email send ID (the unique identifier associated with this send of the email, for tracking data purposes)|
|%%_PreHeader%%||Any content with the assigned value for the Preheader attribute of the email message|
Assign the Preheader as a variable –
set @preheader = [_preheader]
and then use it in the Preheader field –
|%%double_opt_in_url%%||Inserts the double-opt-in link in an email.|
As the marketing world connects with more automation systems, the number of interaction points with the end customers increases tremendously each day. End customers that have multiple languages, multiple regions, multiple channels, multiple services get more and more messages through the Marketing Automation systems. A marketer has to deal with multi-vendor solutions that generate huge data each day. These numbers, keeps climbing up and up.
Most of the marketers, want to have a unified view of their data, want to adopt a kind of centralized data house for their end customers’ marketing data. Some very few lucky ones have this opportunity. Some of the CMO’s I personally met, already gave up to have a centralized data house for their marketing data. Some of the companies’ Marketing Automation systems – I used work – create multi-single digit gigabytes of data per system, and XX gigabytes of daily data to store from multiple systems. In addition to this, some of the software systems they use are not capable of backing this amount of data daily.
And now, we are where the Marketing Intelligence (MI) comes in. I know that most of you know Business Intelligence (BI). BI is a tool that makes life easier for short period tactics. It also helps pretty coolly for creating some future business decisions.
What about speed and processing huge volume of data? This is also where BI is not enough and MI comes on to the stage. Marketing Intelligence brings data insights, speed as well as real-time (automated) reporting and visualization.