Sending a notification to the second agent if the first one doesn’t take care of the ticket (doesn’t change the status from new to open) in a specified time e.g. after an hour.
Actual behavior:
In spite of testing all possible statuses in the Objact “Created at”, the behavior was such that after creating a ticket it either sent a notification to the other agent immediately or was not sent at all.
This is not a job for a trigger but rather for a scheduled task. Triggers only react to something happening. A ticket that was created and is not updated for a while can’t trigger something because nothing happens. You have to create a scheduled task that runs in specified intervals, looks for tickets that match your criteria and then launches an action that you want. And remember to add some method in your task to prevent the ticket matching again the next time the scheduled task runs like add a tag or change the status or whatever suits you best.