Expand my Community achievements bar.

SOLVED

Adobe dynamic content/link change based on time

Avatar

Level 2

Is it possible to change one link to another link dynamically based on time?

For example: If we are deploying a campaign through Adobe, which will have a discount of $800 for a Laptop model and it will be valid only for 12 hours from the time of deployment. In this instance at the end of 12 hours’ time, the offer landing page should be automatically changed to normal landing page.

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi ,

In your HTML, you can use Contact Date of delivery to check the start time of your deployment/start of the offer and use a different variable which defines the offer expiry time as below:

var offerStarts = delivery.scheduling.contactDate;

var offerEnds = offerStarts.getHours( )+ 12;

In your delivery, where you have the offer specific content, you can use the if else statement:

If (offerStarts < = offerEnds)

{ display content 1}

else

{display content 2}

Hope this helps.

Thanks,
Anita

View solution in original post

6 Replies

Avatar

Correct answer by
Level 7

Hi ,

In your HTML, you can use Contact Date of delivery to check the start time of your deployment/start of the offer and use a different variable which defines the offer expiry time as below:

var offerStarts = delivery.scheduling.contactDate;

var offerEnds = offerStarts.getHours( )+ 12;

In your delivery, where you have the offer specific content, you can use the if else statement:

If (offerStarts < = offerEnds)

{ display content 1}

else

{display content 2}

Hope this helps.

Thanks,
Anita

Avatar

Level 2

Hi Anita,

Thanks for your responds, can you please elaborate the process please, so that it will be easy for me to achieve this.

Thanks,

Parthiban.

Avatar

Level 7

Hi Parthiban,

In the email delivery, you can define the offer start and end variables using JS as below at the very beginning of your HTML.

And in the main HTML code, where you have the offer specific section- use the conditional statement -if else to display or not display the offer depending on the time in the variables.

Screen Shot 2019-09-16 at 2.21.35 pm.png

Thanks,

Anita

Avatar

Level 2

Hi Anita,

It works fine only to the deployment, it's not working fine to already deployed campaigns. Is there any workaround

Avatar

Level 7

Hi Partibhan,

Yes as per the logic , you get the "contactDate" of the delivery at the time of it's execution and basis that the offer end time is being calculated.

Any specific reason/requirement for the changes you want to make in the already deployed campaigns as this logic works in real time??

Thanks,

Anita

Avatar

Level 2

Hi Anita,

We have countdown timer campaigns, We use gif image for the countdown timer and once the timer ends we wanted to replace timer image with another blank image.