Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Adobe dynamic content/link change based on time

parthibanb28349
Level 2
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
Anita_p
Correct answer by
Community Advisor
Community Advisor

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
Anita_p
Correct answer by
Community Advisor
Community Advisor

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

parthibanb28349
Level 2
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.

Anita_p
Community Advisor
Community Advisor

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

parthibanb28349
Level 2
Level 2

Hi Anita,

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

Anita_p
Community Advisor
Community Advisor

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

parthibanb28349
Level 2
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.