Recent searches
No recent searches
How to set up a trigger for a date field of the value is above/more than n days?
Answered
Posted Sep 15, 2023
I want to create a trigger for sending an email notification to the users if the order delivery date is more than 30 days. On trigger conditions I can't see any option to set a condition like:
DATE FIELD - is after the next - 30 days.
What would be the best way to achieve this trigger?
0
6
6 comments
Jacob the Moderator
Hi karankuwarbidxb 👋
It sounds like Automations are what you're looking for for this - these are like triggers, but with time-based conditions.
Date fields can be used like this 👆 achieve the kind of condition you are looking for.
Hope that helps you out!
0
karankuwarbidxb
Hi Jacob the Moderator Is there no way to do this on realtime?
Because, from what I understand, there will always be a delay in it triggering by atleast 1 hour if we do it through automations.
0
Jacob the Moderator
karankuwarbidxb
Automations run once an hour, but not necessarily on the hour, this is true.
But you mention a scenario of 30 days, so I'm not sure what your concern is here.
The granularity is hourly, so it could be 30 days minus 1 hour = 719 if that fits your expectations better.
Is there another use case you have in mind that relies on real-time notifications?
0
karankuwarbidxb
Jacob the Moderator In my case I want to auto reply emails that have qualifies the following condition (Instant notification using trigger):
Condition: Ticket is created + The order delivery date is greater than 30 days
Action: Sent an email notification telling the customer that we'll get back before 7 days due + Solve the case.
the intention of using trigger is to prevent the CX operations team from working on it. As it can be handled by the system.
0
Jacob the Moderator
karankuwarbidxb
There might be a non-standard way to achieve what you're after here, I don't have it all worked out yet, but my idea would be to use an active webhook with some liquid markup conditioning to update the ticket based on the difference between timestamps for ticket creation and your date field.
What should happen if the date is equal to or below 30 days?
0
karankuwarbidxb
Jacob the Moderator Nothing. The trigger should only run if the date is greater than 30 days. And it should be one time too (We can add a tag so that the trigger doesn't run again).
0