Hi,
We get some events triggered at 4 am at night and we want to wait until the next day at 9 am until we send the e-mails.
I saw that I could use the expression field for that, but I have no idea how to code it. I also couldn't really find it in the documentation.
So I basically want what is already an example in the picture, but instead of wait till the end of the day, I want to wait till the next morning. How can I do that?
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Try setHours(toDateTimeOnly(toDateOnly(now())), 9)
Check out below links
Try setHours(toDateTimeOnly(toDateOnly(now())), 9)
Check out below links
Hi,
Thank you! I will try that
Views
Replies
Total Likes
does the 9 stand for 9am? If I wanted to do 7.30pm would it be 19:30??
Views
Replies
Total Likes
Thank you again for your help!
I have one additional question. I have a custom wait in the journey to wait till the chosen delivery date is there. That works, but sometimes customers go through the wait at midnight. So then the e-mail is sent at midnight.
Is there a way to check the time once a customer is through the wait and then wait till the next morning IF is it midnight?
Views
Replies
Total Likes
You Can set it like this in the custom Type of wait expression
toDateTimeOnly(setHours(nowWithDelta(1,"days"),9))
Thank you! I am going to try this
Views
Replies
Total Likes
Hi @Taal,
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
Views
Replies
Total Likes
Hi! Thanks for your help so far. I do have one additional question.
If the event is triggered at night, I want to wait till 9 am until the e-mail is sent. But if the event is triggered at 1 pm at day, the e-mail may be sent right away. I only want to prevent sending e-mails at midnight.
Views
Likes
Replies
Views
Likes
Replies