AndyHill Posted June 25, 2021 Share Posted June 25, 2021 I am looking to add routes in to some BPM's that are based off the time a call was logged, this would be used to deal with out of hours calls. I know I can use an Application->Utility->Get Local Time but that pulls down the date and time in one string and I can't find a way to pull just the time out of the string. I need to be able to assess whether the call was logged between the hours of 18:00 and 07:45 so that I can include additional elements inside the BPM such as emailing additional parties or adding it to board. Is there a way to do this currently? Link to comment Share on other sites More sharing options...
Guest Mary Posted June 25, 2021 Share Posted June 25, 2021 Hi @AndyHill Please see sample process on this post. Link to comment Share on other sites More sharing options...
Steven Boardman Posted June 25, 2021 Share Posted June 25, 2021 @AndyHill if you use the Get Request Info node at the start of your process, there is an output param of Time Logged You can use this The value is in seconds - so you will need to calculate what 07:45 and 18:00 are in second and then use the custom expression to branch if the value is less than 07:45 (26820) i think and greater than 18:00 (64800 i think). You may also want to use the iBridge free utility option to get the Day This will get you current day in the format (Monday, Tuesday etc) this will also allow you to branch if it is the weekend So If Day = a working day (i.e Monday-Friday), then do a second check on the time logged to determine if this was OOH or not Hope that helps Steve Link to comment Share on other sites More sharing options...
AndyHill Posted June 25, 2021 Author Share Posted June 25, 2021 @Mary @Steven Boardman Thanks both I will take a look at both these. Steve good catch about the weekend, hadn't even got that far in my thinking Link to comment Share on other sites More sharing options...
Victor Posted June 25, 2021 Share Posted June 25, 2021 @AndyHill here is an example of how I set up the expression for our OOH in our support process. This is for a Mon-Fri from 09:00 - 17:30 The Get Day of Week above is the following node: As @Steven Boardman mentioned the Time Logged is a numeric value and represents the number of seconds that have passed since midnight (00:00). An important mention is that you need to remember that we only deal with date/time values in UTC. What this means for you (and us) is that during BST we are 1 hour ahead of UTC/GMT. This effectively means that 07:45 during BST is 06:45 GMT/UTC and 18:00 during BST is 17:00 GMT/UTC. Therefore: during BST - for 07:45 the timelogged is 6.75 * 3600 = 24300 during BST - for 18:00 the timelogged is 17 * 3600 = 61200 outside BST - for 07:45 the timelogged is 7.75 * 3600 = 27900 outside BST - for 18:00 the timelogged is 18 * 3600 = 64800 So you would have to amend the workflow (at least) twice a year to cater for BST until UK decides to get rid of daylight savings altogether. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now