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]