Folks,
I am checking one use-case where I want the profiles to wait exactly 3 days before their product delivery and trigger a communication from AJO.
I tried using setDays() function like below,
setDays(toDateTimeOnly(@event{xxx.bookingdetails.deliveryDate}), -3)
If the delivery date is June 15th then the profile should wait till June 12th and proceed to further step in the journey. This way it will be dynamic for all the profiles.
Any idea on this ? whether this is feasible through journey?
Thanks in Advance!
Views
Replies
Total Likes
Hello @Ikmo7 ,
Instead of setDays () function use addDays() function like
addDays(toDateTime(@event{xxx.bookingdetails.deliveryDate}), -3),
this will bring june12th and proceed to further step in the journey.
FYI
https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalizatio...
setDays function is used to set the day of the month for the given date-time and i believe it wont be negative value with -3.
correct me if am wrong.
Thanks
AJODev
We can't use addDays function in the condition. This is a great feature but not available in wait conditions.
Views
Replies
Total Likes
Got it, @Ikmo7 Have you tried like this
toDateTime(@event{xxx.bookingdetails.deliveryDate}) == nowWithDelta(3, "days")
The delivery date is future date right so we are comparing the value like today+3 days.
example : if the delivery date is 2025-06-07 then nowWithDelta function will check today's date +3 days = 2025-06-07.
Correct me if am wrong
Thanks
AJODev
May i know when to use toDateTime and toDateTimeOnly? what's the difference?
Thanks
AJODev
Views
Replies
Total Likes
@SatheeskannaK - This logic will check whether the date matches and return boolean value like true or false but it won't return the date.
Views
Replies
Total Likes
As per my understanding, you are triggering a journey exactly 3 days before the product delivery.
I hope product deliveryDate attribute contains delivery date of the product data.
from above logic, we are checking the delivery date = today + 3 days . if condition satisfies, the profile can go with channel or else it will wait.
Correct me if my approach is wrong.
Thanks
AJODev
Views
Replies
Total Likes
The above condition returns a boolean after checking but the custom wait activity expects a dateTime value.
Views
Replies
Total Likes
Rather than the date logic here, why not create a segment qualification audience where you have the purchase event exist and is 3 days after?
We do have that in place but like this I have multiple conditions in the same journey. So, we need adjust the wait days accordingly with segment logic and the evaluation as well.
It would be better using dynamic wait steps in the journey for all the profiles.
@SatheeskannaK - Thanks for sharing this. But I don't see the correct logic used in those threads. Can you help me with that if possible ?
Views
Replies
Total Likes