There are cases where the date is present in ticket form data, and you want to get a reminder on that date. For example:
- Subscription is ending on date specified in the form and you want to be reminded about it.
- A new person is joining your team on the date specified in the form and you want to be reminded about it so you can send them a welcome email.
And many more! With ticket reminder, you can do just that.
First, check out this article on how to set a reminder using the triggers as we are going to elevate that in this article. The setup will remain the same as in that article, but we'll use a different message for notify target in the trigger actions. There, paste in this:
{% assign startTimestamp = ticket.ticket_field_<DATE_FIELD_ID> | append: ' ' | append: ticket.ticket_field_<TIME_FIELD_ID> | date: '%s' %}
{% assign nowTimestamp = 'now' | date: '%s' %}
{% assign diffSeconds = startTimestamp | minus: nowTimestamp %}
{% assign diffHours = diffSeconds | divided_by: 3600 %}
{{ diffHours }}|15
There are 3 changes you'll need to make:
- Change <DATE_FIELD_ID> with the ID of the field that will contain the date.
- Change <TIME_FIELD_ID> with the ID of the field that will contain the time.
- In the last line, number 15 is how many minutes prior to the date you want to receive the reminder - change that to the value you see fit.