3

VAWP failed to show proper date in email after it was sent to subscribers from a journey in Journey Builder, I know it’s tied to the Activation date of the specific Journey because of the Job ID, but in Client Inbox you can see the proper date. In my case minus one day from the deployment date in my html using Ampscript %%[FORMATDATE(DATEADD(NOW(1),-1,’D’),’MMMMM D’,'',’EN-CA’)]%%, but when viewed email in browsers the date revert to the date the Journey was Activated. I am using Salesforce Data as entry source. Is there a way around this to show same date as the Client Inbox when in VAWP mode?

Journey Activation date = September 16

Deploy date = Today (September 20)

Date shown in email should be = yesterday (September 19), in Client Inbox accurate

In VAWP show = Journey Activation date September 16

1
  • This is covered in the ampscript doc: developer.salesforce.com/docs/… When included in content for triggered sends, the time indicates when the triggered send definition for the message started or republished
    – EazyE
    Commented Sep 23, 2019 at 1:49

1 Answer 1

2

Every time the VAWP link is clicked, the AMPscript inside the email is rerun making any 'current date' to be updated.

So if you sent it on 9/16 the date in the email would be 9/15. But if you open the VAWP on 9/20, it would show 9/19.

To get around this, would be to store this info inside a 'log' of some sort that you can then have the VAWP context look up there instead of using the Email AMPscript.

E.g.

if _messagecontext != "VAWP" then

  SET @emailDate = FORMATDATE(DATEADD(NOW(1),-1,’D’),’MMMMM D’,'',’EN-CA’)

  UpsertDE('VAWP_Log_Job123456', 'SubscriberKey', @Subkey, 'emailDate', @emailDate)

else

  SET @emailDate = Lookup('VAWP_Log_Job123456', 'emailDate', 'SubscriberKey', @Subkey)

endif

Another benefit of this is to help with any issues if the data on the sendable DE is edited. If deleted, the VAWP link will display an error - but if edited, you can use this log to make sure the data in VAWP is identical to what is displayed in the email, not what is in the sendable DE.

0

You must log in to answer this question.

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