📢 Attention Salesforce Certified Trailblazers! Maintain your credentials and link your Trailhead and Webassessor accounts by April 19th. Learn more.
close
Start tracking your progress
Trailhead Home
Trailhead Home

Advance Your Personalization Skills

Learning Objectives

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

  • Personalize content using a dynamic content block.
  • Add external content using a custom content block.

Advanced Content Blocks

Content Builder makes it easy to use basic content block types, such as HTML and image blocks. But Leung wants to create dynamic content with a higher degree of personalization. That’s where advanced block types, such as dynamic content blocks and custom content blocks, come in. 

Dynamic Content Rules!

NTO’s next requirement is to display a different image based on the value of the subscriber’s gender attribute.

  • If the value equals female, display an image of a woman’s jacket.
  • If the value equals male, display an image of a man’s jacket.
  • Otherwise, display an image of a unisex jacket.

For this type of personalization, Leung uses a dynamic content block combined with a business rule. A dynamic content block displays content according to the rules you define. 

Business rules contain four elements: attribute, operator, value, and content.

Element
Description
Attribute
The profile element, such as Gender or Follows_on_Twitter, used to determine which subscribers see the dynamic content.
Operator
The operator used to compare the value of a subscriber’s attribute to the value specified in the rule. Operators include: contains, is empty, and is before.
Value
The attribute value used to determine which subscribers see the content associated with the rule. For the combination of the Gender attribute and the ‘is equal to’ operator, you might use the values male, female, non-binary, and so on.
Content
The content to display for a subscriber who meets the attribute requirement you defined. For example, if the value of the Gender attribute equals female, then display an image of a woman’s jacket.

Before she creates the block, she has to find out where the gender attribute is stored. Content Builder stores attributes in subscriber lists or data extensions. Subscriber lists are lists of contacts and data extensions are akin to database tables. In this case, the gender attribute is in a data extension. 

In preparation, she also browses the Content Builder repository and locates the three jacket images she intends to use in the block.

Let’s see how Leung adds the Dynamic Content block. 

  1. Open the email in edit content mode
  2. Drag the Dynamic Content block to the email canvas. Content block icons in the email editor with a red circle around the icon for the Dynamic Content block.
  3. Click Browse and select the unisex jacket image. This is the image that displays when no rule is matched. In this case, when the value of the gender attribute is not equal to female or male.

The dynamic content block configuration form with a red circle on the Browse button

Next, she’ll configure the business rule to display an image of a woman’s jacket whenever the value of the gender attribute equals female. 

1. Click Create Rule 1.

The dynamic content block configuration form with a red circle on the Create Rule 1.

2. Specify the data source for the attribute used in the rule. Supported data sources include profile attributes, data extensions, and audiences. The data Leung requires is in a data extension, so she selects Data Extension or Audience.

The Create Rule form with Data Extension or Audience circled in red.

3. Click OK.

4. Select the appropriate data extension. In this instance, Leung selects NTO_All_Subscribers.

5. From the attribute library, select Gender and drag it to the Filter editor.

The Create Dynamic Content Rule form with the attribute Gender circled in red.

6. Select is equal to from the operator dropdown list (2).

7. Enter female in the value field (3). 

The Create Dynamic Content Rule form with callouts on the attribute, operator and value fields.

8. Click Select to continue configuring the rule.

9. Click Browse and select the image to display if the rule evaluates to true. In this case, Leung selects the woman’s jacket image.

10. Click Save.

Leung follows the same steps to define the rule that displays the man’s jacket image when the value of the gender attribute is equal to male. 

When she’s done, Leung clicks Done Editing (1) and Save Block (2).

Rule configuration form with the Save Block and Done Editing buttons circled in red.

The dynamic block is fully configured to display a more relevant image that aligns with the subscriber’s profile.

Forecast the Weather with Custom Content Blocks

NTO customers love the outdoors. They believe there’s no such thing as bad weather, but the wrong outfit can ruin a day on the trails. To help customers decide what gear to purchase, NTO’s fourth requirement is to display local weather conditions in the email.

Most of NTO’s requirements can be met using standard content block types, but this one requires a bit more work. Custom content blocks to the rescue! Custom content blocks allow you to do anything from display live stock prices, embed Google Maps, add text over images, or even check the weather.

Leung recently collaborated with a developer to create a reusable app that displays weather conditions. She uses the app on this project to display personalized weather conditions for an email subscriber’s home city. She uses a custom content block to reference the app.

1. Select Administration from to the Content Builder Settings dropdown menu.

The Content Builder Settings dropdown menu with a red circle around the Administration menu item.

2. Select Installed Packages from the Account dropdown menu.

The Content Builder Account dropdown menu with a red circle around the Installed Packages menu item.

3. Click New on the Installed Packages page.

 Installed Packages page with the New button circled in red.

4. When the New Package Details form loads, enter Local Weather in the Name field, enter a description, and click Save.

The New Package Details form with the Save button circled in red.

5. When the Installed Packages details page loads, click Add Component.

6. When the Add Component form loads, click Custom Content Block.

7. When the Add Custom Content Block form appears, enter the Name, Description, and Endpoint URL. Leung gets the endpoint URL from the app developer. It’s the app’s URL that the developer set up at example.com.

8. Click Save.

The Add Custom Content Block form with the Save button circled in red.

9. Confirm that the custom component is listed as an installed package in the administration interface.

The Installed Packages page with a listing for the Local Weather package.

Leung opens the NTO email in edit content mode and sees the new custom content block type, Local Weather. Success!

Content block icons in the email editor with a red circle around the custom Local Weather block.

Next, Leung adds the block to the email and configures personalization. She drags the Local Weather block to the email canvas. By default, the block displays the weather for the city listed in the Location form field. In this example, that's Buenos Aires.

The block configuration form for the weather app.

However, for this project, NTO wants the block to display the weather for the subscriber’s home city. To accomplish that, she must edit the block’s HTML code. 

1. Navigate to the block’s HTML Editor tab.

2. Highlight Buenos Aires in the HTML code.

The HTML editor showing the HTML code for the local weather block.

3. Click %% to open the Personalization dropdown list.

4. Select City.

Leung notes that the HTML code has changed from this:

<img src="https://weather-sfmc-cb.example.com/weather.png?loc=Buenos Aires&amp;amp;template=simple&amp;amp;units=metric" width="200" height="200">

To this: 

<img src="https://weather-sfmc-cb.example.com/weather.png?loc=%%city%%&amp;amp;template=simple&amp;amp;units=metric" width="200" height="200">

The static reference to Buenos Aires is gone. The personalization variable, %%city%%, now retrieves the subscriber’s home city and passes it to the weather app. The app then fetches that city’s weather data and creates a portable network graphics (PNG) file to display in the custom content block.

Leung pictures an “Aha moment” for subscribers when they see personalized weather in their email. The best part is that you don’t have to be or befriend an app developer to add custom blocks to your emails. Instead, you can use any available app from AppExchange.  

There’s yet another personalization method Leung is excited to showcase: predictive intelligence. In the next unit, she uses predictive intelligence to create unique email experiences that take subscriber behavior into account.

Resources

retargeting