Mailfois
Email platform cheat sheets / Salesforce Marketing Cloud Engagement
Salesforce Marketing Cloud Engagement

Salesforce Marketing Cloud Engagement email coding cheat sheet

The tags and rules you need to code an email or a module for Salesforce Marketing Cloud Engagement: the unsubscribe link, personalisation with a fallback, the view-in-browser and address tags, editable regions and how to get your HTML in. Checked against Salesforce Marketing Cloud Engagement's own documentation on 27 October 2026.

Unsubscribe
<a href="%%unsub_center_url%%">Unsubscribe</a>
First name
%%=AttributeValue("FirstName")=%% (AMPscript)
With a fallback
%%[ SET @fn = AttributeValue("FirstName") IF Empty(@fn) THEN SET @fn = "there" ENDIF ]%%Hi %%=v(@fn)=%%
View in browser
<a href="%%view_email_url%%">View as a web page</a>
Preferences
<a href="%%profile_center_url%%">Update your profile</a> (or %%subscription_center_url%%)
Postal address
%%member_busname%% %%member_addr%% %%member_city%%, %%member_state%% %%member_postalcode%% %%member_country%%

The Salesforce Marketing Cloud Engagement unsubscribe link

Put this in the footer of every marketing email you code for Salesforce Marketing Cloud Engagement:

<a href="%%unsub_center_url%%">Unsubscribe</a>

The law in most countries also wants the unsubscribe to be easy to find and free to use: see the email rules by country.

Personalisation in Salesforce Marketing Cloud Engagement: first name with a fallback

Salesforce Marketing Cloud Engagement uses AMPscript. A first name on its own:

%%=AttributeValue("FirstName")=%%

With a fallback, so an empty field never shows a blank or a raw tag:

%%[ SET @fn = AttributeValue("FirstName") IF Empty(@fn) THEN SET @fn = "there" ENDIF ]%%Hi %%=v(@fn)=%%

Showing something only to some people (an if / else):

%%[ IF AttributeValue("Tier") == "Gold" THEN ]%%Gold offer%%[ ELSE ]%%Standard offer%%[ ENDIF ]%%
  • View in browser: <a href="%%view_email_url%%">View as a web page</a>
  • Preferences: <a href="%%profile_center_url%%">Update your profile</a> (or %%subscription_center_url%%)
  • Postal address: %%member_busname%% %%member_addr%% %%member_city%%, %%member_state%% %%member_postalcode%% %%member_country%%

Making a coded template editable in Salesforce Marketing Cloud Engagement

Content Builder slots: a div with data-type="slot" and a data-key becomes a drop area for blocks, optionally limited by data-max-blocks and data-allowed-blocks, with data-label as its placeholder text.

<div data-type="slot" data-key="hero1" data-max-blocks="1" data-allowed-blocks="imageblock; textblock" data-label="Place hero image here"></div>

Getting your HTML into Salesforce Marketing Cloud Engagement

Content Builder > Create > Template > Paste HTML (paste or browse for an HTML file) for a reusable template with slots, or Create > Email Message > HTML to paste a one-off coded email.

Limits worth knowing

  • Content area names: alphanumeric, under 17 characters, no spaces or capitals.
  • Blocks must sit inside slots; slots allow 2x recursion, 4 objects deep at most.
  • Editing a template does not change emails already made from it.
  • HTML content blocks can add wrapper code; use code snippets to keep code intact.
  • <custom type="header" /> and <custom type="footer" /> add the account header and footer (Paste HTML templates only).

What Salesforce Marketing Cloud Engagement calls things

Every platform has its own words for the same ideas. Salesforce Marketing Cloud Engagement's, in plain English:

The ideaSalesforce Marketing Cloud Engagement calls itWorth knowing
One-off sendUser-Initiated Email (Send Flow)The guided steps for sending a one-off email to a chosen audience from Email Studio. Replaces the older “Guided Send”.
Automated journeyJourneyA multi-step plan moving contacts individually through messages, waits and decision points. An Automation Studio “automation” is different, scheduled batch data jobs, not journeys.
Trigger / entryEntry SourceWhere contacts entering a journey come from, a data extension, an API call, a date. The API and glossary call the same thing an “Entry Event”.
Static groupListA fixed collection of subscribers; everyone also sits on the All Subscribers list. Lists are legacy Email Studio, almost all modern work uses data extensions.
Dynamic groupData FilterA saved rule set applied to a data extension or list to produce a narrower audience. Output is refreshed only when rerun, it is not live.
Customer recordContactOne individual across all channels, identified by a Contact Key. “Subscriber” is the older, channel-specific record for the same person.
Custom fieldAttributeA field of information about a contact, organised in Contact Builder into attribute groups. Email Studio “profile attributes” are a separate, older set of fields.
Behavioural eventAPI EventAn entry source where your systems push contacts into a journey. There is no general behavioural event store, events mainly exist to start journeys.
Reusable blockContent BlockA reusable piece of content built once in Content Builder and dropped into many emails. Deleting a block moves it to the Recycle Bin and breaks live emails.
TemplateTemplateA reusable email layout with editable content areas, stored in Content Builder. Editing a template does not update emails already built from it.
Personalisation languageAMPscriptSalesforce’s scripting language embedded in emails and pages to personalise per recipient. Nothing to do with Google AMP. It only runs at send time, never in a browser.
Fallback valueDefault ValueA value saved on an attribute for when data is missing; richer fallbacks are hand-coded in AMPscript. Personalization strings have no fallback option, empty fields render blank.
A/B testA/B TestingSending two versions to test audiences, then rolling out the winner. Inside journeys the equivalent is Path Optimizer, a separate feature.
SuppressionSuppression ListA do-not-contact list of subscriber keys blocked from your sends. Matches on subscriber key, not email address, duplicate keys still receive mail.
Frequency cappingEinstein Engagement FrequencyAI working out the right number of emails per contact, applied via a Frequency Split. The feature actually named “Frequency Capping” is a different Distributed Marketing control.
TransactionalTransactional Messaging APIThe current API for receipts and confirmations, managed as Transactional Send Journeys. Email Studio’s older triggered sends are now officially “classic”.
Preference centreProfile Center / Subscription CenterHosted pages where subscribers update details and choose which categories they receive. “Preference Center” belongs to Account Engagement (Pardot), a different product.
Send-time optimisationEinstein Send Time OptimizationAI picking the best hour within the next day to message each contact. A journey activity only, it cannot be added to a plain Email Studio send.
ReportingAnalytics BuilderThe reporting app holding standard reports on email, journey and contact performance. Intelligence Reports is a separate paid add-on.
Imported data tableData ExtensionA custom database table holding whatever data you choose, the main audience and data store. It extends nothing, and must be marked “Is Sendable” before you can email it.
API-triggered sendTriggered Send DefinitionA saved email set-up that an external API call fires for one recipient at a time. Outbound webhooks are a different feature, Event Notification Service (ENS).
Draft vs liveDraft / RunningJourney statuses, plus Scheduled, Stopped, Sent and Canceled. You “Activate” a journey rather than publish it, and edits need a new version.

What we couldn't confirm

We only list what Salesforce Marketing Cloud Engagement's documentation says. These points weren't clear from it, so test them in your account:

  • That a commercial send is blocked without an unsubscribe or profile centre link (the glossary says Transactional classification skips the check).
  • Paste HTML templates may need enabling by the account relationship manager.
Do it in Mailfois. Ask Mailfois, your email marketing assistant, writes modules and whole templates for Salesforce Marketing Cloud Engagement with these tags, fallbacks and editable regions already in place. Studio adds the unsubscribe and privacy links before you copy the code, and Brand Guard flags merge tags left without a fallback. How Ask Mailfois works

Questions

What is the unsubscribe tag in Salesforce Marketing Cloud Engagement?

%%unsub_center_url%%.

How do I add a first name with a fallback in Salesforce Marketing Cloud Engagement?

Salesforce Marketing Cloud Engagement uses AMPscript. A first name is %%=AttributeValue("FirstName")=%%, and with a fallback: %%[ SET @fn = AttributeValue("FirstName") IF Empty(@fn) THEN SET @fn = "there" ENDIF ]%%Hi %%=v(@fn)=%%

How do I add a view-in-browser link in Salesforce Marketing Cloud Engagement?

Use %%view_email_url%%.

How do I get a custom HTML email into Salesforce Marketing Cloud Engagement?

Content Builder > Create > Template > Paste HTML (paste or browse for an HTML file) for a reusable template with slots, or Create > Email Message > HTML to paste a one-off coded email.

Sources

Checked by Mailfois against Salesforce Marketing Cloud Engagement's documentation on 27 October 2026. Platforms rename things often: spotted something out of date? Email [email protected].

Other platforms

Mailchimp · Klaviyo · HubSpot Marketing Hub · Braze · Adobe Marketo Engage · Bloomreach Engagement · Brevo · Constant Contact · Campaign Monitor · Dotdigital · Iterable · Resend

Code for Salesforce Marketing Cloud Engagement without looking up the tags.

Start with Ask Mailfois