I'm working on creating a dynamic sender profile (DSP) for a client. It's my understanding that the way it's usually done, you will do a lookup based on a subscriber attribute, e.g., city, country, or customerType - (examples of that here: https://sfmc.in/dsp.html)

However, there isn't a logical way to do this for this client because each subscriber can be applicable for multiple sender profiles. I have a DE with all the correct data, but I can't get the lookup to work when I don't use AttributeValue.

My question: Is it possible to create a DSP based on an attribute I set in an email or does another smart workaround exist?

I think the problem I'm running into is that the sender profile is loaded before the header, correct?

I have tried:

  • system strings (https://ampscript.guide/system-strings/) like emailName_ and _dataSourceName, but it's too reliant on naming conventions...
  • Ampscript upsert function in the header of the email, doesn't work
  • 'Update Contact' journey activity but doing this every time seems like too much work

Any clever ideas?

2 Answers 2


The Sender Profile is indeed evaluated before email content, meaning an ampscript statement in the email is "too late".

One thing you can use to define variables "before" the sender profile is evaluated, is Additional Parameters from web analytics connector. (see end of the docs to personalization strings:

https://help.salesforce.com/s/articleView?id=sf.mc_es_available_personalization_strings.htm&type=5 )

Since you likely won't have the relevant subscriber context, I doubt you would be using this for person-to-person personalization.

  • Alright, this confirms my theory. I'm afraid the Additional Parameters won't work either for this use case, as you suspected. Commented Jun 26, 2023 at 14:37

I found a potentional solution here

The article is referencing the used of Content Blacks that can then be referenced as Sender Name and Sender Profile so no need to add the AMPscript logic on the email body.

Using the Lookup function, extract the necessary details from the respective DE and assign them to the variable Ampscript OR assign “FromName” and “FromEmail” to the variable Ampscript. Use that variable instead of “FromName” and “FromEmail” in the SenderProfile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .