Use ticket automator to set due dates bases on create date
How do I use the Automator to set the due dates for certain tickets +3 days out from the create date (date ticket is raised)? I don’t see optons in the automator to do this. Do I need to write a script?
Essentially if ticket field = ‘x’ then set due date to create date + 3 business days.
Something like that..
Thank you!
Page 1 / 1
From what you describe, it’s probably best to do this via the “SLA and OLA Policies” section of the admin area. You can set up the “respond within” times and choose what conditions apply:
You’ve also got options for different response times based on these conditions *and* priority but you can just set all the priority options to be the same if that’s an unnecessary division of tickets.
How do I use the Automator to set the due dates for certain tickets +3 days out from the create date (date ticket is raised)? I don’t see optons in the automator to do this. Do I need to write a script?
Essentially if ticket field = ‘x’ then set due date to create date + 3 business days.
Something like that..
Thank you!
You don’t want to use SLA ? I think it would be easier with a custom SLA kriterier.
With automation you need to use a Expression and have date/time as output and then action to set the due date.
If SLA is not an option, you can use the Automator but need to calculate the date manually using a script. But its a bit more annoying to set up, so we chose to use SLA’s
Steps to create an automation rule:
Go to Admin → Workflow Automator.
Create a new automation with these triggers:
Event: "Ticket is Created"
Condition: "If ticket field = X"
Action: Use a "Custom Action" (Requires a script).
require 'date' # Get the created_at date of the ticket created_date = DateTime.parse(evente'created_at']) # Add 3 business days (excluding weekends) due_date = created_date 3.times do due_date += 1 due_date += 1 while h6, 7].include?(due_date.wday) # Skip Sat/Sun end # Update the ticket's due date { "due_by": due_date.strftime("%Y-%m-%dT%H:%M:%SZ") }
Hi there,
Greetings
You can add an Expression Builder node and use the highlighted expression to add 3 days to the ticket creation date. Later user this result to update corresponding date field.