How to set Due Date and Time for new AutoTask Ticket

i receive emails for user onboarding with a date. i am parsing the date, it looks like this Due_Date: “10/21/24”. i need to add 5:00PM to DueDateTime in the Create Object API. technically i need to add the date time in this format i suspect. “2024-10-16 17:00:00”. should i do that in the create object part or parse upstream. Autotask just creates the ticket with the default due date and so i am not sure why the different formatting attempts are failing.

thanks

Hey @Paulfi

Thanks for posting here!

I recommend starting by reviewing the logs in MSPintegrations to see exactly what MSPintegrations sent to Autotask and exactly what Autotask returned when creating the ticket. It’s possible that Autotask is ignoring the date, especially if you’re using the Due Date Time on a Ticket, as that field can be overridden by SLAs in Autotask.

Aside from that, the way to format the date would be something like this:

{{date custom.parsed_date_var_goes_here from_format="m/d/y" to_format="Y-m-d"}} {{date '2000-01-01 17:00:00' from_tz='America/Los_Angeles' to_tz='Autotask' to_format='H:i:s'}}

The first text expression (the part between {{ and }}) will accept the date from a variable (I called it custom.parsed_date_var_goes_here) that is in the format month/day/year with leading zeros for month and day. It would then render that date in year-month-day format.

The second text expression accepts the hard-coded date and time of Jan 1, 2000 at 5:00 PM Pacific Time, converts it to the timzone needed for Autotask, and renderes just the time. The date is ignored. We need this to ensure we send to Autotask the time that represents 5:00 PM in your timezone (which is Pacific Time, if I recall).

You could simplify this by extracting the date from the incoming information as before, then add “17:00:00” to the end, and use 1 text expression for the date and the time together.

Let me know how that works for you.

PS: Here is where we document the formats used by to_format and from_format, and this page describes the “Autotask” timezone.

you are right about moving it upstream to a rendered string. {{after_string email.body “Community Transfer Effective Date” flags=“tn”}} 17:00:00. this works just misses the timezone. but that almost doesnt matter, just looking to build a daily list of users to onboard, offboard, title change, move, etc. i have a client doing 10 of these a day.

also the new SLA i created was set to the wrong contract so all my testing was failing as expected. I wouldnt have double checked if you hadnt mentioned that

THANK YOU!!

1 Like

Excellent! Glad to hear it!!