Foley Coker Posted May 29, 2019 Posted May 29, 2019 (edited) Hi, I'm currently trying to create a path way that automatically notifies a different email and path should a request be logged outside of 09:00- 7:00. The time logged variable is available form the global flow codes, however it does not appear to work using a greater than & less than equation. I assumed maybe its due to the format in which the system records time, however i cannot see this anywhere, as there is no time logged variable in the email templates, only date logged - which also provides time. The logic of using 'or' defeats the point, but when using 'and', which was the original intention, this proved to fail despite being logged between those times and would reject to the no match field. I attempted to make the opposite in the no match but this also failed. Is there a way to accomplish this? Thank you, Foley Edited May 29, 2019 by Foley Coker removal of extra photo
James Ainsworth Posted May 29, 2019 Posted May 29, 2019 Hi Foley, Time is a character string, so using operators such as < and > won't work for determining if it was before or after a particular time of the day. With a bit of experimenting, I came up with this. There is possibly a different and maybe even a better way of doing it, but it seems to work for me. Step 1: Get Request Info Using the Get Request Info, you need to get the date/time value for when the request was raised Step 2: Convert the date Using the Integration node for converting the date, you can extract a number value based on the time using Swatch Internet Time. The Input Format in the screen should should match how the date and time are stored in the logged date field as shown in the screen shot. The Output format (B) provides a 3 digit number based on Swatch Internet Time. As this is a number rather than a character string you will be able to use the < and > operators. Step 3 Decision Node Using a decision node you can use the < and > operators on the Swatch Internet Time to see if the time was after 9 or before 7 09:00 (GMT) = 375 19:00 (GMT) = 791 An example for one of your branches using a Custom Expression to check if it was out of hours might be... When selecting the variable be sure to select Integrations->Integration Call->date as underlined in red. I believe it default to the Last Node->Outcome which won't work. If you want to test for different times of the day you can find Swatch Internet Time converters with a quick Google search. Your workflow may look a little like this... Let me know how you get on. Regards, James
Foley Coker Posted June 7, 2019 Author Posted June 7, 2019 Thank you @James Ainsworth, i didn't see the response until now, but will give it a go today and update on my progress. 1
James Ainsworth Posted June 7, 2019 Posted June 7, 2019 I'll look forward to hearing if this works for you.
Foley Coker Posted June 11, 2019 Author Posted June 11, 2019 Hello @James Ainsworth, this is perfect it worked. tested before 9 am, and it went down the rejection route, and tested just now, and it continued on as normal.
James Ainsworth Posted June 11, 2019 Posted June 11, 2019 Hi @Foley Coker Great news. Thanks for letting me know.
Victor Posted June 19, 2019 Posted June 19, 2019 On 5/29/2019 at 11:23 AM, Foley Coker said: The time logged variable is available form the global flow codes, however it does not appear to work @Foley Coker actually it does work, we are using it in the workflow for support requests. The value for the time logged variable is the number of seconds that passed since midnight. So at 9 AM you would have 32,400 and at 5 PM you would have 61,200. So you would need an expression that has time logged < 32400 and > 61200 to account for out of hours. Therefore you can achieve what you need without necessarily using an integration node but that works too.
Foley Coker Posted August 8, 2019 Author Posted August 8, 2019 Thank you @Victor, this is helpful to know and will use this method for future builds
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