Jump to content

Time-based business process decisions


Lee Jones

Recommended Posts

I'd like to add some time-based decisions to our incident response flow. Our Service Desk is open from 08:30 - 18:30 on weekdays, and I would like a different email notification sent to the customer depending on whether they raise a ticket via email 'in-hours' our 'out-of-hours'. Is there an option to do this? It's achievable? 

Many thanks in advance.

Link to comment
Share on other sites

@Lee Jones we have this implemented in our own support process. The workflow associated to the request is configured with a decision node branching based on in-hours/out-of-hours and send an email notification using different templates. We make use of the Time Logged variable (which stores the number of seconds since midnight) provided by the Get Request Details workflow node. Here is how is currently configured for a Mon-Fri 09.00 - 17.30

image.png

This would be the branch for the "out of hours", the other branch is a simple "No Match"

image.png

 

 

Note: The Day of Week you see there is a cloud automation node, used to get the day of the week. Haven't detailed on this since I am not sure is needed in your scenario.

Link to comment
Share on other sites

I just seen you did mention "weekdays" so here is what I was referring to. We have a node somewhere before the decision which is this:

Capture.PNG

 

This returns the day of the week for the current day. Please note it will be the current day when the node runs. If the node runs some days after the request was logged it won't be the day of the week  from when the request was logged. Hope this makes sense.

Link to comment
Share on other sites

Hi Victor, thanks for this. It's extremely useful.

I've used your information to create what we need however I can't seem to get it fully working yet, and I think it may be in relation to the HH:MM:SS conversion to seconds. I see your example above indicates that you open at 09:00 but your expression is Time Logged < 28800. By my calculations, 09:00 converts to 32400.

In my example, we open at 08:30, therefore I've converted this to 30600 and when I log a ticket just after 08:30, I still get the OOH message.

Is there something about the time conversion, or a daylight-saving type issue I'm not factoring in here?

expression.png.cbd186a19263074e167cff80de80a054.png

 

flow.png.4b35867d662055d777aff41c8f1a4902.png 

Link to comment
Share on other sites

@Lee Jones as Britain loves to be special we have the DST or BST in place until October... this means that compared with GMT we are one hour ahead. So your 08:30 opening hours are 08:30 BST which is 07:30 GMT. Therefor we need to multiply 7.5 * 3600 = 27000 and that's the value you would need to use in the expression to establish a time before and after 08:30 BST... same with closing hours.

To make it "better" one would need to remember to change this config once BST is over at the end of October... (by "better" I mean, yeah, worse...)

Note: when making such calculations with date/times we need to keep in mind that date/time values in the database are always stored in GMT/UTC and that's the values to be used for calculations.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...