Glen Mazza's Weblog

https://glenmazza.net/blog/date/20230421 Friday April 21, 2023

Using Content Builder templates with Marketing Cloud sender profiles

With the announced retirement of Classic Content (CC) in Marketing Cloud, in favor of Content Builder (CB), our project identified sender profiles that needed updating from CC to CB. For our triggered sends, to the subscriber we would add fromEmailName and fromEmailAddress attributes representing the email sender information. Then we would create simple and separate Classic Content templates to use these attributes:

FromEmailNameTemplate:
<ctrl:field name=fromEmailName />

FromEmailAddressTemplate:
<ctrl:field name=fromEmailAddress />

Then when creating a sender profile, under "Sender", "Use the specified information" section, we could activate the above templates as follows:

From Name: %%=ContentAreaByName("FromEmailNameTemplate")=%%
From Email: %%=ContentAreaByName("FromEmailAddressTemplate")=%%

With Content Builder, the template contents are the same, but the template you use is apparently important, as not all types will work. Template type Code Snippet worked for us. Further, within the sender profile definition, there are new functions to use: ContentBlockByName, ContentBlockByKey, and ContentBlockById. They are each defined in the AmpScript Guide. ContentBlockByKey, which uses the customer key of the template, seems to be the easiest way to identify the desired snippet. Note that the keys must be unique enterprise-wide, not just at the business unit level. If you use the by-name method, make sure you specify the path properly.

Sender profile configuration afterwards, using Content Builder:

From Name: %%=ContentBlockByKey("CodeSnippetFromNameKey")=%%
From Email: %%=ContentBlockByKey("CodeSnippetFromAddressKey")=%%

Reminder that SFMC advises to provide a verified fallback address in the Sender Profile in case there are problems with the address returned by the AMPscript snippets.

Posted by Glen Mazza in Marketing Cloud at 03:00AM Apr 21, 2023 | Comments[0]


Calendar
« April 2023 »
Sun Mon Tue Wed Thu Fri Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Today
About Me
Java Software Engineer
TightBlog project maintainer
Arlington, Virginia USA
glen.mazza at pm dot me
GitHub profile for Glen Mazza at Stack Overflow, Q&A for professional and enthusiast programmers
Blog Search


Blog article index
Navigation
About Blog
Blog software: TightBlog 4.0.0
Application Server: Tomcat
Database: MySQL
Hosted on: Linode
SSL Certificate: Let's Encrypt
Installation Instructions