Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Personalize Content with Merge Fields

Learning Objectives

After completing this unit, you’ll be able to:

  • Add merge fields to personalize email components.
  • Insert customer data into merge fields.
  • Create and save expressions to standardize how merge field data appears.
  • Combine merge fields with dynamic content variations to deepen personalization.
Note

In this unit, we show you the steps to use merge fields and for personalization and create expressions in Marketing Cloud Next. We don’t have a hands-on challenge in this unit, so your work won’t be verified, but you can follow along and try out the steps.

Make Dynamic Content Even More Meaningful with Merge Fields

At Northern Trail Outfitters (NTO), Isabelle set up dynamic content to deliver different versions of an email to each audience. Now she wants to take it a step further by using merge fields to personalize the details inside each version. With merge fields, she can automatically insert customer and event data—such as names or locations—so messages are more relevant to each recipient. Here you’ll practice adding merge fields to tailor your messages to your customers.

Add Merge Fields to Email Components

Now that your email includes dynamic variations, you can add merge fields to make each version specific to the recipient. Merge fields pull values, such as a customer’s name, directly from your connected data into the content. In this example, you add a data graph-based merge field, which is the recommended approach for most email personalization scenarios in Marketing Cloud Next.

Try it out for yourself by following these steps:

  1. Open your August Birthday Campaign email.
  2. Select the Data Sources tab and confirm that the default data graph you set up earlier is connected.
  3. Create a paragraph.
    1. In the body of the email, select the section with the call-to-action button, then click the plus icon at the bottom of the section, and add a paragraph.
    2. Enter a short greeting, such as Hello! and then enter some body text, such as Join us for your next adventure.
    3. Place your cursor after “Hello” in the greeting.
  4. Add a data graph attribute.
    1. In the paragraph toolbar, select { }, then click Add Merge Field.
    2. Select your data graph, then click in the Search Resources search bar and select Primary Objects, then select First Name.
    3. Enter Explorer in the Default Text field and click Done.
    4. You should now be able to view the merge field First Name in your paragraph text.
  5. Save your changes.

With your first merge field in place, let’s pull in even more customer details from your connected data.

Use Customer and Event Data in Merge Fields

Personalize your email even further with details from your connected data sources. Customer attributes, like where someone lives or how they interact with NTO, help you tailor the message so it’s timely and relevant. You’ll add this merge field to the same paragraph you personalized with a first name.

Add another merge field by following these steps:

  1. Adjust your text.
    1. In your email, select the paragraph component you added in the previous step.
    2. Place your cursor between the word “adventure” and the period.
    3. Enter a space, the word in, and another space before the period.
  2. Add another merge field.
    1. In the paragraph toolbar, select { } then click Add Merge Field.
    2. Select your data graph, then click in the Search Resources search bar and select Related Objects.
    3. Select Unified Indv Contact Point Address MKT, then select Unified Link Contact Point Address MKT, then Contact Point Address, then City.
    4. Click Next.
    5. Enter your home townin the Default Text field and click Done.
    6. You should now see the merge field appear in your paragraph text.
  3. Save your changes.

After completing this step, your email includes meaningful customer details, like the city where each recipient lives, drawn directly from your connected data sources.

Create and Save Expressions

Sometimes the data you need isn’t just a single field—it’s a specific version of that field, such as the most recent value or a sorted result. That’s where saved expressions come in. A saved expression defines which single value to return from your data when more than one value is possible. It uses filters and sorting—such as most recent or highest value—so merge fields consistently reference the correct data.

Because expressions are saved, you can reuse them across emails and channels for consistent personalization. For example, Isabelle uses a saved expression to pull in a customer’s most recent purchase, so she always references the correct product without rebuilding that logic each time.

icon=true

Creating saved expressions requires a data graph and the appropriate Marketing Cloud and CMS permissions. To create an expression, you may need to edit your data graph again to add additional fields.

To create a saved expression:

  1. From the Marketing app Home, click Go to Content under Create Branded Content.
  2. Click Add and select Content.
  3. Select Expression and click Create.
  4. Enter a title, an optional description, select a data source and an attribute.
  5. Click Save, then Publish (if available).

To use the saved expression you just created:

  1. Return to your campaign email editor.
  2. Select the component you want to update in the canvas.
  3. Place your cursor where you want the personalized value to appear.
  4. In the toolbar, select { }.
  5. Select Saved Expressions.
  6. Choose the saved expression from the list.
  7. Save your changes.

Now you can apply the same data logic anywhere you personalize content—without having to rebuild it each time.

Combine Merge Fields with Dynamic Content

Now that you’ve added merge fields and built dynamic variations, it’s time to bring the two together. Combining these features lets you tailor both the structure of your message and the details within it—so each audience sees a version designed specifically for them, filled with information that’s personal and relevant.

For example, in Isabelle’s NTO Member Birthday Perks email, customers with August birthdays receive a special birthday variation, and inside that variation, their first name and city populate automatically for a personalized experience.

Here’s how to combine merge fields with your dynamic variations:

  1. In your August Birthday Campaign email, select the paragraph component you’ve been working on in the canvas.
  2. Create a variation linked to your existing targeting rules.
    1. Click New Variation in the properties sidebar.
    2. Under Recent Personalization Points, select the August Birthdays personalization point you created earlier. Note the identifier Current next to this personalization point. It’s important to select a current personalization point otherwise, you may be prompted to clone rather than use an existing personalization point.
    3. Make sure Link the personalization point to this component or field… is selected (this is the default), then click Save.
  3. Customize the variation content.
    1. Modify the text as desired.
    2. Switch between Default and General August Birthdays to verify that the content updates accordingly.
  4. Save your changes.

When you’re finished, your email blends rule-based content with personalized data for a message that relates to your customer on multiple levels.

Three views of the email editor, including a view of an email with the default variation, another view of the default variation email with merge fields, and another of the August Birthdays variation email with merge fields to illustrate layered personalization.

Let’s Recap

By pairing merge fields with your dynamic variations, you’ve created a personalized message like the one Isabelle sends at NTO. This layered approach brings your audience closer to your brand with every email. Ahead, you’ll learn how to review, test, and refine your work before sending.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios