Skip to main content

We’re trying to implement a process that gives users 30 days to take an action. If the action is not complete, we want to send the user a weekly reminder email until the 30 days is up. At 30 days, we want to send an email notice to the agent so that they can take the next action. My thought was to set this up as a ticket and handle the notification through Workflow Automation. I’ve been trying to test a scheduled workflow with a Boolean expression that will check to see if it’s been 7, 14, 21, or 28 days after the ticket creation date. I’ve tried testing an expression like 

addDays({{ticket.created_at_iso}},7)=={{current_date_and_time_iso}}

but no matter what I do, I get errors like “Invalid Syntax - One of its operands is invalid” when I try to test the expression. I’m also puzzled that when I try to test the expression, it prompts me to enter info for {{current_date_and_time_iso}}. Shouldn’t it already know that? 

As a test, I tried 

{{ticket.created_at_iso}}=={{current_date_and_time_iso}}

and just set both dates as the same in the Test Expression box, and that came back as ‘true”, so I guess it isn’t totally broken. I feel like I’m just missing some little syntax that I’m not seeing. 

If anyone can point me in the right direction here, I’d appreciate it. Of course, if there’s a better way to do this, I’m all ears. 

 

Maybe not the best way, but one I can think of that should work - 

Make a Scheduled Workflow to run every day that filters for these tickets in the Condition (such as by subject, or if it’s a service item, or if they have a specific cat/sub-cat/item).

You can then do an Expression Builder using the diffInDays() function to output the number of days between the Ticket’s ISO creation date with the System’s ISO current date. Such as:

diffInDays({{ticket.created_at_iso}},{{current_date_and_time_iso}})

You can then feed that number in to another Expression Builder that outputs the boolean of the expression builder’s result divided by 7 equalling 1 

{{E1.result}}/7 == 1

to see if it’s been 7/14/21/28 days since the ticket was created.

And if you’re going to send an email/make a note as to how many days it’s been, you can use E1.result to tell them how many days it’s been.

 

And also - the expression builder can sometimes struggle with certain combinations of functions or if you have too many functions in one, even if the syntax is correct. it’s just something that happens...


Reply