What is a Sender Profile?
A sender profile specifies the information that is displayed in the recipient’s inbox and drives where a message will be sent if they click ‘reply’. To set up the sender profile in the Salesforce marketing cloud we need four different things:
- From Name – Specifies the name from whom mail is sent, which will be displayed in the inbox of the recipient.
- From Email – Specifies the email with the SAP domain from whom mail is sent, which will be displayed in the inbox. This can be auto-verified if your domain is registered.
- Reply Name – Specifies if any email response is sent, and to whom shall this be addressed.
- Reply Email – Specifies if any email response is sent, to whose inbox the response arrives.
Use Case: The client requires us to have a dynamic sender profile so at the time of sending, to personalize the communication sent to a user we need to use the Opportunity owner Name and Email is used as the sender address and if responses are received, they should be sent to actual email address.
Special note: If SAP (Sender authentication Package) with a custom domain is used then the email will be something like this:
From Name: Opportunity Owner Name
From Email: OwnerName@e.clientname.com (here e.clientname.com is SAP domain)
Reply Name: OwnerName
Reply Email: ownername@clientname.com (this is the actual email address of the sender)
To Populate the Dynamic Sender profile, follow the steps below
How to build a Dynamic Sender Profile?
The idea behind a dynamic sender profile is to have from Name, From Email, Reply Name and Reply Email addresses dynamically populated. We must specify the “from name” and “from address” in one of the following:
- Sendable data extension: The data extension to which email is sent must have the values in the column.
- Using Content blocks: Using a content block that fires some code in the background.
A. Follow the below steps to create a Dynamic Sender Profile using Sendable Data Extension:
1. Create fields in the sendable data extension:-
When you have multiple sender profiles for different types of subscribers add from name, from address, reply name, and reply address fields in the sendable data extensions to get dynamic or different values in the sender profile. If the source of data is CRM, then follow the steps below:
- Create four custom fields in CRM to store these values.
- Create a flow that updates the value in these fields when a record is updated or created.
Note: The From Address in this field must be updated using something from which we get the Opportunity owner email transformed as SAP validated address.
2. Create a Sender Profile:-
Use the following strings while creating a sender Profile (use the field names you have in CRM and the DE that is used for sending):
%%fromName%%
%%fromAddress%%
%%replyname%%
%%replyAddress%%
Note: Use a verified fallback address to make sure even without having the From Address details in the sendable Data Extension will not affect the email sent.
Since the above appoach requires lot of activities on CRM, I propose using the approach below.
B. Follow the below steps to create a Dynamic Sender Profile using Content Blocks:
1. Create a Content Block:-
It contains AmpScript code that retrieves sender information From name, From address, Reply name, and Reply address from a data extension (not a sendable data extension). Use the below code to retrieve data from the data extension.
Code Snippet Block – From Name and Reply Name:
%%[
Var @UserId, @fromName
Set @UserId = ‘A’
If not empty(@UserId) then
Set @fromName = lookup("UserSenderProfile", "SenderName", "Id", @UserId)
Else
Set @fromName = "Specific Name"
]%%
%%=v(@fromName)=%%
Code Snippet Block – From Address:
%%[
Var @UserId, @fromAddress
Set @UserId = ‘A’
If not empty(@UserId) then
Set @fromAddress = lookup("UserSenderProfile", "SenderEmail", "Id", @UserId)
Else
Set @fromAddress = "Specific Address with SAP domain"
]%%
%%=v(@fromAddress)=%%
Code Snippet Block – Reply Address:
%%[
Var @UserId, @replyAddress
Set @UserId = ‘A’
If not empty(@UserId) then
Set @replyAddress = lookup("UserSenderProfile", " ReplyEmail", "Id", @UserId)
Else
Set @replyAddress = "Specific Address"
]%%
%%=v(@replyAddress)=%%
To get these content block IDs, go to the content block details in the content builder.
2. Create a Sender Profile:-
With content block ID, set the From name, From address, and Reply name, Reply address use this string %%=ContentBlockbyId(19595)=%% to retrieve block value in the fields while sending emails.
Note: Before using any email address, we have to verify the email domain or the email address else it will pick up the fallback address.
Hope this helps. Please share your feedback in comments.