0

Our list of active members is refreshed weekly, and every time that happens, the personalization in the email when viewed online breaks. I have been experimenting with a SendLog DE that will store the subscribers' data at the time of the send. I have also written some ampscript to pull in data from the SendLog if the _MessageContext is VAWP and from the sending DE if it's not.

IF _MessageContext == "VAWP" 
then set @Email = LookUp("WOF SendLog", "Email", "SubID", SubscriberID, "JobID", JobID, "BatchID", _JobSubscriberBatchID) ... 
ELSE set @Email = Email ... ENDIF

Here's the problem: When I send a test email based on a subscriber preview, the send doesn't get added to the SendLog. Then when the View Online link is clicked in the test email, no personalization gets pulled in. This is an issue because my primary client will receive test sends to verify that dynamic content is correct at his Outlook PC address, then click the view online link to see the optimal version of the rendered email. I need the email to draw data from the sending DE in that context.

Is there a way to detect if the send is a test when the email is viewed as a webpage? If not, I'm not sure what the best course of action would be.

3

You could add another IF statement:

If _istestsend == false 
then
VAWP from sendlog
ELSE
ENDIF

Personalization Strings in Email Studio

%%_IsTestSend%%

Resolves to True if the email job is marked as a Test Send.

%%[

if _isTestSend == false then

... // this code doesn’t run for test sends

endif

]%%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.