Automation to upgrade priority of ticket in desk after 60 days/Custom Functions in Zoho Desk

Automation to upgrade priority of ticket in desk after 60 days/Custom Functions in Zoho Desk

I am trying to have a ticket automatically update its priority to high once it has been open for X days.  I figured I could do this with a custom function, but I can't find much documentation to help me grab the correct fields in my ticket.  I have used plenty of deluge script in zoho creator, but I am having trouble figuring out how custom functions fit into desk.