Automation to Set Priority level based on due date

How do I set an automation so that every new job is automatically labeled as a RUSH if it’s due date is less than 5 days away?

I understand the logic would be:
First Pages Due date is less than 5 days from Date Created date, set Priority to RUSH.
Set Priority to Normal

The 2 fields I’m comparing are date fields
First Pages Due and Date Created.

I have a Priority field with 2 options: RUSH and Normal.

Not sure how to actually implement it :stuck_out_tongue:

Thanks for your help!

One option would be to have a formula field like this:

IF(DATETIME_DIFF({Due Date}, {Date Created}, 'days') > 5, "Normal", "Rush")

Then use an Automation with a “record matches conditions” or “Record is updated” trigger that ensures it only fires when both date fields are not empty. Add an “update record” action step that inserts the value of the formula field into the {Priority} field.

1 Like

Wow Kamille,
That looks pretty awesome! Thanks!!

Your suggestion above definitely worked to create a field to auto generate Normal and Rush status.

However, we already have a single select field in use for Priority, with options of RUSH and Normal. Any way we can tap into that with an automation, rather than creating a new formula field?

You could do this several ways, all of which include adding another field or writing a script. The reason being there isn’t an Automation filter which can let you say “the difference in these two specific but variable dates” which doesn’t rely on a field calculating the date difference.

You could have a formula field that just gives you the difference between those two dates and use two automations to set the single select status, or a single automation with a script step.

ok. I think I follow what you’re saying. :slight_smile:

I would create a new field “Date Diff” to determine the difference between Date Job Created and First Pages Due.
I can set an automation to set the Priority to Normal when a new job is created.
Another automation could look at “Date Diff” and if the value is less than 5, set Priority to RUSH.

So, what formula would determine the difference between the 2 dates and spit that value into the “Date Diff” field?

I tried this and it spit out a number 7 digits long!
DATETIME_DIFF({First Pages Due}, {Date job created})

(sorry, newbie here)


The datetime diff formula you need is the same one inside the original formula in my first reply.

ah! ok. I left off the ‘days’ part. Got it!