Context: I've setup a Dynamic Sender Profile solution using a Code Snippet block call with AMPScript variables and a Configuration DE.
Solution works perfectly fine BUT I've come across a limitation of this solution that I was not aware until now: _Job data view does not populate "FromName" and "FromEmail" fields if AMPScript is used in the Sender Profile -> https://help.salesforce.com/s/articleView?id=000394057&type=1
There's a need to store these values for reporting and debugging purposes. So, to work-around this issue and as recommended by SF, I've extended the our EmailSendLog to include "FromName", "FromEmail". This worked as expected since we're setting the AMPScript variables with the corresponding names of the EmailSendLog:
%%[
SET @market = AttributeValue("MarketCode")
SET @rows = LookupRows("MT_SenderProfiles_Configuration", "MarketCode", @market, "IsVerified", 1, "IsApproved", 1)
SET @rowCount = rowCount(@rows)
IF @rowCount > 0 THEN
SET @row = row(@rows, 1)
SET @fromName = field(@row,"FromName")
SET @fromEmail = field(@row,"FromEmail")
SET @replyName = field(@row,"ReplyName")
SET @replyEmail = field(@row,"ReplyEmail")
ELSE
/** Fallbacks **/
ENDIF
]%%
Issue: Not all our campaigns will use Dynamic Sender Profile solution, some will still use a regular Sender Profile which EmailSendLog is not able to populate the fields of "FromName" and "FromEmail" because these are not being set anywhere or present in the Sendable DE. This has led us to a non-optimal scenario of:
- When using Dynamic Sender Profile - EmailSendLog is populated and _Job is empty
- When using Regular Sender Profile - EmailSendLog is empty and _Job is populated
Limitations: Sendable DE with the 2 extra fields is not an option at this point in time & there's no AMPscript Personalization strings to retrieve From Name and From Email from the backend (as far as documentation states)
Question: Having in mind the limitations stated, any suggestions on how to successfully capture FromName and FromEmail in the EmailSendLog when using a regular Sender Profile?
Much appreciated!