Advance Your Personalization Skills
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.
||The profile element, such as Gender or Follows_on_Twitter, used to determine which subscribers see the dynamic content.
||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.
||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.
||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.
- Open the email in edit content mode
- Drag the Dynamic Content block to the email canvas.
- 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.
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.
- Click Create Rule 1.
- 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.
- Click OK.
- Select the appropriate data extension. In this instance, Leung selects NTO_All_Subscribers.
- From the attribute library, select Gender and drag it to the Filter editor.
- Select is equal to from the operator dropdown list (2).
femalein the value field (3).
- Click Select to continue configuring the rule.
- Click Browse and select the image to display if the rule evaluates to true. In this case, Leung selects the woman’s jacket image.
- 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).
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.
- Select Setup from the settings dropdown menu.
- Search in the Quick Find field for
- Click on Installed Packages and then click New on the Installed Packages page.
- When the New Package Details form loads, enter
Local Weatherin the Name field, enter a description, and click Save.
- When the Installed Packages details page loads, click Add Component.
- When the Add Component form loads, click Custom Content Block.
- 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.
- Click Save.
- Confirm that the custom component is listed as an installed package in the Setup interface.
Leung opens the NTO email in edit content mode and sees the new custom content block type, Local Weather. Success!
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.
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.
- Navigate to the block’s HTML Editor tab.
- Highlight Buenos Aires in the HTML code.
- Click %% to open the Personalization dropdown list.
- 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;template=simple&amp;units=metric" width="200" height="200">
<img src="https://weather-sfmc-cb.example.com/weather.png?loc=%%city%%&amp;template=simple&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.