[SalesForce] VAWP links break for Salesforce Send Emails

I note that when you send an email to a Salesforce Audience from Content Builder (e.g. a Salesforce Campaign or Report) it creates a Salesforce Send under-the-hood and creates a temporary DE in your root folder (with a filename SalesForce-[GUID]) and applies a retention policy of 5 days, which you can't change (unless you use the API).

The issue is that all VAWP links break after the DE is deleted and Subscribers see the following message when they click on the link:

The system is temporarily unavailable. We apologise for any inconvenience. Please try again later.

This apologetic message is misleading as they can't simply "try again later"…

The only solution that I can think of is to create an automation that runs daily and includes a Script Activity that performs the following tasks:

  1. Retrieve all DEs prefixed with SalesForce that have been created in the past 24 hours
  2. Use WSProxy to update the Retention Policy of these DEs from 5 days to something more sensible (like 3 months)

Am I missing something here? How do others workaround this issue?

Best Answer

You are correct that because the data extension is deleted, that the VAWP will no longer work and will display an error of "System is temporarily unavailable"

If the data in the Data Extension/List used at the time of the send was overwritten, updated, deleted this will break that link. This is related to how the VAWP link is working. The 'View as webpage' link is different to the the data in the original email sent for a particular subscriber in the data contained within an email is static, whereas the data contained within the 'View as webpage' link is pulled each time the page is rendered.

If Data Extension is deleted or overwritten this will then affect the view as webpage when a subscriber is trying to view the web links, because the view as webpage link works by collecting source data of subscriber and performs lookups to create the email as a webpage view. If anything is broken in the send between the subscriber and email then this will show the view as webpage link (VAWP) broken.

Your solution will work but it is overly complicated. I think it may be more simplistic to Implement Send Logging by:

  1. Create a SendLog DE using a SendLog Template. Leave the data retention to 3 months as you mentioned (though best practice is 10 days according to the documentation)
  2. Write AMPscript and use the InsertDE function for any personalization in the email that would need to be retrieved from the SendLog DE. Wrap it with an IF statement for _MessageContext of Sent
  3. Write AMPscript with a Lookup function to pull in personalized data from the SendLog DE. Wrap it with an IF statement for _MessageContext of VAWP
  4. You can throw it all in a Content Area or Code Snippet and reuse.