Recent searches


No recent searches

When using a custom date field as a trigger condition, what does "is within the previous" and "is within the next" do?



Edited Feb 10, 2025


6

25

25 comments

We wanted to move away from requiring every single ticket to be a task since it is the only way Due Dates work. Unfortunately, the custom date option doesn't work either because there is still no way to trigger to open on the day that it is due. We created a complex workaround, but now have an issue with everything being based on GMT so it is still causing issues because things are opening the night before. We are now scrapping the whole concept and going back to making every single ticket a task. We would love if we can have a custom field that either works like Due Dates or just expand on the functionality of Due Dates and stop limiting them to only Tasks. We would prefer to be able to tie individual problems to incidences and still have the tickets function the way we need. Zendesk is severely limiting it's users by not doing something that has been requested since before I started using the product. I have come across multiple discussions and found references to parts of the support site that have been cleared out. It would also help foster a sense of real community if coming across questions posted that are listed as answered had answers that were serious considerations of user needs and not just a blatant disregard of the user needs. Also, since I'm on about it, a time option would be great too. Most of our users are working only out of Zendesk and even if they do have Outlook, don't want to set up a calendar event to work a ticket. 

6


@... That does sound frustrating, I'm sorry to hear it. I wonder if this (paid) app might be of use?

Deadline

0


We are trying to do the same with a "follow-up-date" 

Basically a date that the agent defines when he has to re-check that specific case. 

 

The solution with the tags only works onces per case.

If the agent put a new "follow-up-date" well it will not run the automation anymore because the tag has been removed...

 

I was thinking to clean "The follow-up-date" but this isn't something that zendesk can handle...

 

Any solution by someone?

 

 

>> Maybe found a solution: I put the date on 1990-09-01 and adapted the trigger to not give a tag if that date is present

0


Just like Peter mentioned above, we are looking for the exact same solution....

All I want is my custom date field to activate an automation saying "Follow-up date has arrived" and send out an email.

Has anyone found a reliable way to implement this? Any help would be greatly appreciated.

 

2


Hi All, 

Need a hand with the custom date setting. 

We have new businesses that sign up, and I'd like for a trigger to only fire once for their very first ticket and take into account the custom date. For example, if a business signed up a week ago, but has never written to us, and this is their first time, I want to add a tag, so I can add it to a view and add an internal comment on steps / processes for agents. If the trigger has fired before - and the business writes again, we don't want to have that trigger fire again.  What's the best solution around this?

Thanks

0


Hi! How can I have a trigger running for the opposite: "is NOT within the previous" or "is NOT within the next"? 

2


Hello Mattia,

May I know what exactly are you trying to achieve with the opposite of "is NOT within the previous" or "is NOT within the next"?

You may check out some of the Trigger actions and conditions here for more guidance about it: Trigger conditions and actions reference

Clifford James Lacson |Customer Advocate

NEW - Zendesk offers free, on-demand training for all of our products. Set up your account and start learning today at training.zendesk.com

0


Hi Clifford! 

We have a custom date field associated to our users called <published_at> that indicates when the user published a listing on our marketplace. We have a trigger that does the following:

IF <published_at> is within the previous 3 days THEN add an "onboard" tag on the associated ticket

We use the tag to group all tickets that need onboarding in a view. We need to create a trigger that removes that tag if the listing is older than 3 days. 

0


Hello Mattia,

Apologies for the late response as I was on leave last week :(
I will be creating a ticket for this so we can continue our discussion there.
Look for an email from me shortly!

 

0


Hi, I've got another tangent altogether. I would like to utilize the date field but as per business day. I.e. If I'm setting the date value 10 days from now, it should not count the holidays in between. Any idea. Thanks

0


John Brunker Hi, You can set up the automation to fire 0 (zero) days to the value of date field.

0


Thanks Raman Kalia. I tried this also but nothing is firing when I have this setting. I wonder if there is some other attribute that would need to change from the recipe above.

0


Hi all,

Has anyone figured out how to achieve what's described in this thread? I have:
- Custom Date 1 -> put manually by agent
I need to set up a text notification for the particular group of people IF the date put by the agent is later than 24h from the time the date was entered. Example:
Scenario1:
- today is 08/11/22
- agent puts in a date of 15/11/22 --> text notification sent as the date is more than 24h
Scenario 2:
- today is 08/11/22
- agent puts in a date of 09/11/22 --> text notification not sent as it's within 24h 

I do understand what Mattia Tosti was referring to, it looks like you can only put number of days in "is within the next/previous", but we would need is "is NOT within the next/previous".

Thanks


0


Hi there, 

I also have a specific use-case for this field in a Zendesk View that I'm trying to work out, and wondering if someone can help. 

Our business is events, and I'd like to be able to create a View using the Date field that only shows tickets where Date = Today, so that we can prioritize getting back to people who have an event that day.

I've tried setting 'Is within the next' = 1 but that's only showing me tickets where the date is tomorrow. Using = 0 shows no results. Any ideas? 

1


I'm also having the same issue as Kalyn.

0


When I use within the next 1 day, today's date is not taken into account.

How can I take today's date in triggers ?

Example : 

If date is today's date then priority = urgent

Thanks for your help

0


image avatar

Dane

Zendesk Engineering

Hi All, 

I have tried to use "is within the previous = 1" and the trigger fired for the same day that was indicated on the Date custom field. More information here.

0


Hi Dane!

Unfortunately that is still not working. When I select "is within the previous=1" it still notifies me the day before instead of the day of. Any reason this might be?

This is for an automation and not a trigger.

0


The reason that the notifications are firing the day before when using "within the previous" criteria is due to timezones.

The automation is using UTC time and does not account for local timezones. Here in US Central time, our automation opens tickets at 6pm on the day before our custom field (which is midnight UTC). From the support agent in my recent inquiry:

Date field timestamps are more complicated because they are not exposed in the UI or API. Automations currently use UTC timestamps for custom date field conditions. They do not use the time zone associated with the account. As a result, depending on how far the account is from UTC, automation may appear to fire several hours early or late.

 

1


image avatar

Jimmy Rufo

Zendesk Luminary

Is there any way to implement a dynamic option similar to “within the next”, but instead its "after the next"?  I'm using this trigger to set a ticket value based on upcoming renewal date of a client (i.e. within 6 months), based on a renewal date set in the client organization.  This works seeming to remind of an upcoming renewal.  However, I have no similar option to reset the ticket field value after the client has renewed, when the date of renewal in the organization is now presumably over 6 months away.  The only option I have is a static date option which does not make sense at all.  Please help!

As a really poor workaround, I have to use a condition where I use the “After or On” and pick a date that is over 6 months from now.  I have to reset this trigger presumably every month with a new date that is over 6 months from now.  I don't understand why we wouldn't have an option for “After the next 180 days”, where 180 is the variable to modified.

CC Ana Jones Cory Vegel  - My leadership team has a requirement to be alerted of certain client tickets, where the renewal is upcoming, but it has to work the opposite way as well.

0


I ended up here while googling how to have a trigger fire on the day an agent specified in our custom date field. It's very strange that standard trigger conditions offer all kinds of expressions w.r.t. that date, except checking whether it is today.

Anyway, after some more searching and trying things out I found a way to check this using Liquid tags within a call to the ticket API webhook:

{
	"ticket": {
		{% capture today %}{{ "now" | date: "%Y-%m-%d" }}{% endcapture %}
		{% if ticket.ticket_field_xxxxxx == today %}
		...
		{% endif %}
	}
}

Where xxxxxx is the custom date field's ID and ... can be replaced with whatever ticket update should happen.

Also because someone asked, this piece of JSON sent to the ticket API webhook will reset the custom date field to be empty again:

{
	"ticket": {
		"custom_fields": [{
			"id": xxxxxx,
			"value": null
		}]
	}
}

Hope this helps someone else :)

0


I ended up here while googling how to have a trigger fire on the day an agent specified in our custom date field.

Hey Jakob, could you please tell me more about how you set this up? Where do you trigger that API call from? I tried to do it via an automation, but it's giving me an error (I want the automation to check if the Reopen date is today, and if it is reopen the ticket):

I am new to Zendesk so I am probably missing something stupid!

0


Hi Marta Nannipieri,

 

I sadly ran into the same issue with the approach I described above. Automations require you to directly “nullify” at least one of the conditions that made them fire, so the status change or tag removal has to happen outside the API call - and therefore, outside the IF statement. But you need to use an automation because triggers can't be made to regularly re-check their conditions when the ticket isn't updated by something else.

 

What worked for us in the end was checking “is within the previous | 10”, which in our time zone fires on the correct date, and removing the relevant tag with a standard automation action. Here's the screenshots, sorry for German language:

It seems like you are solving basically the same problem that I had, having pending (or on hold) tickets reopen on an agent-defined day. If you need help with the surrounding triggers as well, let me know.

0


Hi Jakob Kruse


Thanks for your reply! I did think of using “is within the previous 1 day”, although it would be too late - our team is based in the US, so the automation would reopen the ticket at 00:00 UTC of the following day, which would be the right day but too late (7:00pm).

Will submit a product feature request for “is today”.

Have a nice day!

1


We've built a simple  “Resurrect” app to schedule when the ticket will reopen. It may be a solution for some of the use cases highlighted here. 

1


Please sign in to leave a comment.