Skip to main content
Level 2
Jul 16, 2025 2:42 AM UTC
Solved

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

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

DavidKangni
DavidKangniAccepted solution
New Participant
Jul 16, 2025 3:01 PM UTC

@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

12 replies

Mayank_Gandhi
Employee
Jul 17, 2025 1:25 PM UTC
Mohan_Dugganab
Employee
Jul 16, 2025 3:14 PM UTC

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 

Translate
Level 2
Jul 17, 2025 1:10 PM UTC

Thanks @mohan_dugganab . This Helps

Translate
DavidKangni
DavidKangniAccepted solution
New Participant
Jul 16, 2025 3:01 PM UTC

@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

 

 

Translate
David Kangni
Level 2
Jul 16, 2025 3:59 PM UTC

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

Translate
DavidKangni
New Participant
Jul 16, 2025 4:57 PM UTC

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

Thanks,

David

Translate
David Kangni
Anuhya-Y
New Participant
Jul 16, 2025 8:17 AM UTC
Level 2
Jul 16, 2025 12:29 PM UTC

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."

Translate