Overview
Have you ever wanted to customize the from name and from email in your Marketing Cloud emails? If so this demo is meant for you. This feature uses AMPscript mixed with some account configuration in order to make this work. For this demo, we want to pull dynamic from name and from email from our content DE and use that within our new custom Dynamic Sender Profile. Objects you’ll be building are:
- Create 1 test sendable DE.
- Create 1 test content DE.
- Create 1 Dynamic From Name code snippet.
- Create 1 Dynamic From Email code snippet.
- Create 1 Dynamic Sender Profile.
- Create 1 test email to preview and send with.
Sendable Data Extension
This is the sendable data extension. You’ll notice that each subscriber has a language preference. We’ll match the subscribers language preference against the language field in the content DE so that we can return the correct From Name and From Email to use in our Dynamic Sender Profile. You can download the sample data for this tutorial by clicking here.
Content Data Extension
This is the content data extension. You’ll notice that each row contains custom content for dynamic from name and from email. We’ll use the subscribers language preference to return the correct from name and from email to use inside our Dynamic Sender Profile. You can download the sample data for this tutorial by clicking here.
Dynamic From Name Code Snippet
This code snippet uses the subscriber’s language preference to do a lookup on the content DE to pull back the dynamic from name, which is then used in the new Dynamic Sender Profile. You’ll also notice that immediately following the lookup we are outputting that value to the snippet via %%=v(@fromName)=%%.
Dynamic From Email Code Snippet
This code snippet uses the subscriber’s language preference to do a lookup on the content DE to pull back the dynamic from email, which is then used in the new Dynamic Sender Profile. You’ll also notice that immediately following the lookup we are outputting that value to the snippet via %%=v(@fromEmail)=%%.
Dynamic Sender Profile Setup
This is wher you will create your new custom dynamic sender profile. You can create a new sender profile by navigating to: Admin > Send Management > Sender Profiles > Create. This is where we want to use the TreatAsContent() and ContentByKey() to insert our DynamicFromName and DynamicFromEmail code snippets into the From Name and From Email fields. Please use the two strings below:
- %%=TreatAsContent(ContentBlockByKey(‘DynamicFromName’))=%%
- %%=TreatAsContent(ContentBlockByKey(‘DynamicFromEmail’))=%%
Important Note!
It’s important that your dynamic from email addresses use a authenticated @domain address. Otherwise, your email sends will more than likely fail on the backend. For example, if the authenticated @domain for your account is @company.com and your dynamic from email addresses use some other @domain.com then you’ll run into deliverability issues. Please make sure to consider the following items below before using Dynamic Sender Profiles.
- Please ensure all your dynamic from email addresses use an authenticated @domain address.
- Please consult your deliverability specialist beforehand to minimize risk.
- Please consult your account executive to ensure enhanced sender profiles is enabled on your account.
Hi Everyone! Feel free to pull the full code from the link below. I hope this helps.
Dynamic Sender Profiles with AMPscript
https://gist.github.com/nmaratasdev