Skip to main content
Level 2
July 16, 2025
Solved

How to set up a custom Wait time in AJO. (2 days after purchase date)

  • July 16, 2025
  • 12 replies
  • 1005 views

Hi Team,

We have a requirement to wait for 2 days after a purchase date. I tried using setDays(<eventDate>, 2).  But its setting the date to 2nd day of the month, rather than 2 days after customer purchase date. 
Is there any function that supports this need? 

 

Thanks

Best answer by DavidKangni

@avinashna1 

use 

(toDateTimeOnly(<eventDate>)) + (toDuration("P2D"))

or 

(toDateTimeOnly(<eventDate>)) + (toDuration("PT48H"))

 

Another approach is to use 2 wait activities (in case you have less than 50 activities)

first wait with custom wait toDateTimeOnly(<eventDate>) and second wait with duration as 2 days

Thanks,

David

 

 

12 replies

Community Advisor
July 16, 2025
Level 2
July 16, 2025

Thanks for the response @anuhya-y , I checked this but this doesn't work on Advanced expression editor. I am doing this on a journey canvas on a Wait activity (Custom). 

Here is the error I am facing 
"The expression is invalid : Unexpected word 'addDays' . Please, check that it is a valid token and that you are using it at the right place."

DavidKangni
Adobe Champion and Community Advisor
DavidKangniAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
July 16, 2025

@avinashna1 

use 

(toDateTimeOnly(<eventDate>)) + (toDuration("P2D"))

or 

(toDateTimeOnly(<eventDate>)) + (toDuration("PT48H"))

 

Another approach is to use 2 wait activities (in case you have less than 50 activities)

first wait with custom wait toDateTimeOnly(<eventDate>) and second wait with duration as 2 days

Thanks,

David

 

 

David Kangni
Level 2
July 16, 2025

Hi @davidkangni 

Thanks for sharing great option.  But I am seeing this error
The expression is invalid : You cannot use the character '+' like this because it is a keyword of the language. Please, add quotes to fix your expression

DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
July 16, 2025

@avinashna1 
probably an issue with the copy and paste on your end. It's working without any errors on my side

Thanks,

David

David Kangni
Mohan_Dugganab
Adobe Employee
Adobe Employee
July 16, 2025

You can use the expression example similar to the one posted in this thread https://experienceleaguecommunities.adobe.com/t5/journey-optimizer-questions/5-days-wait-on-journey/td-p/763236 

Level 2
July 17, 2025

Thanks @mohan_dugganab . This Helps

Mayank_Gandhi
Adobe Employee
Adobe Employee
July 17, 2025