I've recently had an issue with the view online version of my emails using the default generated link, %%view_email_url%%.

The email send is dropped into an automation that runs every 30 mins, alongside some data processing and the resulting send data extension would clear and empty after each run. And because of this nature, when someone clicks on the view online, the personalisation strings would be thrown off since it can't reference the data in the DE.

I did a bit of research and found this, https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/sendTimeContent.htm. However, using the enterprise send log is not an option and if possible, I would like to not tweak the current automation setup(mainly because I'm not involved in that solution)

And so in spite of all that, I've started working on a workaround where:

  1. I would replicate this send logging feature by creating a custom DE instead only storing unique ids of a particular send, and also storing the HTML via HTTPGET(), as described here, https://webep.fr/feed-a-send-log-send-history-data-extension-automatically/, this DE will of course persist until a period say for 30 days
  2. Replacing the %%view_email_url%% link with a custom link attached with some unique keys as parameter
  3. Create a Landing page that retrieves this HTML using a Lookup() in the DE using the unique keys and parameters passed from point made above and finally output the HTML, thus replicating the VAWP page. This is built using microsite in Classic Builder (Emails are built in Content Builder)

Everything seems to work fine on this new VAWP page, except for some of the links within the email. This only affects the links that are wrapped with RedirectTo(), full urls seem to work fine.

I originally thought httpGET() would grab the full rendered HTML but it seems like because Salesforce wraps links with some other markup because of the tracking option and then it just throw the whole link off. Just to give an example of the resulting url of a clickthrough, it looks like this, http://click.email.xxx.com/%%=RedirectTo(@CTA)=%%

I'm not sure how to get around this except to not use RedirectTo() in the links but I kinda have to because I'm concatenating some personalisation strings and UTM tags in the links.

I would love to hear if someone else ever encountered this or had try to achieve what I was trying to do with success, or anyone with any other suggestions.


2 Answers 2


There is an easier solution, as utilizing the HTTPGet for every email is not only process heavy, but is likely to error out, causing your send to fail. And the more you volume and frequency you send, the higher the failure rate - making this a very limited solution.

This is not to mention that with your 30 minute window, this further increases your high risk of error as with the long processing time, your email send may not finish before the data is cleared for the new send.

What I would do instead is create a copy of your original Data Extension and put a 30 day data retention on individual records. This copy should contain all the same fields plus a field named JobID. You then use Subscriberkey and JobID as the primary keys.

This is because both are passed in the VAWP link regardless if they exist in the original sendable DE or not. By including jobid as a pkey will allow you to retain any Subscribers that are sent to multiple times inside of the 30 day retention period.

Then if you cannot add a query to the automation to move the data to the new DE, I would do the following:

Upsert the data to the new DE:

  IF _IsTestSend == false AND _messageContext != "VAWP" then
    UpsertDE('yourCopyDE',1,'SubscriberKey', _SubscriberKey, 'JobID', jobid, 'yourAttribute1',yourAttribute1, 'yourAttribute2', yourAttribute2,...)

And then set your variables differently for VAWP and EmailSend:

  IF _messageContext != "VAWP" then
   SET @SubscriberKey = AttributeValue('_SubscriberKey'
   SET @yourAttribute1 = AttributeValue'yourAttribute1')
   SET @yourAttribute2 = AttributeValue('yourAttribute2')
    SET @copyDERowSet = LookupOrderedRow('yourCopyDE',1,'SubscriberKey ASC','SubscriberKey',_SubscriberKey, 'JobID', jobid)
    SET @copyRow = Row(@copyDERowSet, 1)
    SET @SubscriberKey = Field(@copyRow, 'SubscriberKey')
    SET @yourAttribute1 = Field(@copyRow,'yourAttribute1')
    SET @yourAttribute2 = Field(@copyRow,'yourAttribute2')

I believe this should prevent any errors on VAWP caused by the entry being removed or overwritten in the sendable DE.

  • Hi Gortonington, thanks for responding to this. And also for giving great insights to this, you've raised some really good points about timing out that I've otherwise would not have considered.I did point out that given the complexity and the abstraction of the automation setup, i would prefer not to tweak it. However, I do want to try and follow what you've suggested with upserting records into a custom DE. What I want to know is that, do I have to store every single attributes that will be used in an email I would assume so since it needs to reference the data. Thanks
    – Elvin
    Commented Mar 11, 2019 at 0:29
  • By the way, is there a trick to find out if the VAWP is actually rendering the Copy DE's data, rather than the original send DE?
    – Elvin
    Commented Mar 11, 2019 at 2:45
  • This way will not require any changes to your automation. All changes will be inside the Email only. I gave the option of using a SQL Query only because it would be easier, but not necessary. Two ways to check/verify it is being displayed from the Copy DE: 1 - Add a VAR that is filled with _messagecontext and display that in the email (not in a live send) or show/hide a certain aspect. E.g. the VAWP link at the top. 2 - Make a slight append to one of the values displayed in the upsert, this will show append only in VAWP, to prove it comes from copy DE. Commented Mar 11, 2019 at 12:48
  • You're a legend mate, I've followed what you suggested and it seems to be working fine. However, from a test that I sent yesterday, the VAWP stopped working, it gives an error "The system is temporarily unavailable. We apologise for any inconvenience. Please try again later." Seems like it's still referencing the disconnected send DE or maybe I did something wrong. Would you happen to know what's wrong? I'll continue to monitor my latest tests, so far it's working fine, I may have to check it the next day to see if it reproduces the error. Also, would you set a data retention on the copyDE?
    – Elvin
    Commented Mar 12, 2019 at 0:20
  • 1
    Hey Gortonington, I checked a test I sent yesterday, together with the "hidden" variable display only on vawp and it seems to work fine, so, maybe I stuffed up initially but in any case, I'm grateful for your help, it certainly gave me a proposition for a solution. Cheers to you mate.
    – Elvin
    Commented Mar 12, 2019 at 22:28

Wouldn't it be simpler to just send the the records from your DE that is being overwritten to a second DE where only new records would be evaluated for sends from Journey Builder?

This way the the VAWP link should work since the data extension record the send is referring to would not be overwritten each time your automation runs.

In the final DE used for sends you would need to use more primary keys, like SubscriberKey + Date, to ensure that there one customer could be targeted more than once by this DE.

You must log in to answer this question.

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