Hi All -
I've been chewing on this one for a few days and not sure how i should go about it. I've got some chat data, which i can't share with you, that has information like 'ChatAgent' 'StartTime', and 'EndTime'
My task is to calculate, with reasonable precision, how many hours an agent worked in a day. Obviously, I can't tap into any WFM system or alternate reports or I wouldn't be going down this road.
I can think of 2 approaches:
1) Shift Duration = Max(EndTime) - Min(StartTime), grouped by agent. This approach gets tricky if there is a lot of 'down time', where a person isn't chatting at the front or end of their shift. I actually don't think that this would be an issue because our agents stay pretty busy. That said, I'm running into issues where an agent's PREVIOUS shift from the day before crosses midnight. They end up looking like they've worked 20+ hours in some cases
2) Calculate duration (EndTime - Starttime) for each chat and sum those values, grouped by agent. This seems like the best approach but it gets complicated because of concurrency. An agent can be chatting with more than one customer at a time. If a person averaged a concurrency of 2 chats, an 8 hour shift would result in 16 hours of work using this method (I only want to know that they worked 8 hrs)
I found myself populating a database table with 24 hours of 10-second intervals, when I decided that there must be a better way :/
Any ideas how to do this within a spoon transformation? I'm also starting to wonder if I should attempt to write a UDF for MySQL. I'll admit I've got hardly any experience writing UDFs for SQL though.
AR
I've been chewing on this one for a few days and not sure how i should go about it. I've got some chat data, which i can't share with you, that has information like 'ChatAgent' 'StartTime', and 'EndTime'
My task is to calculate, with reasonable precision, how many hours an agent worked in a day. Obviously, I can't tap into any WFM system or alternate reports or I wouldn't be going down this road.
I can think of 2 approaches:
1) Shift Duration = Max(EndTime) - Min(StartTime), grouped by agent. This approach gets tricky if there is a lot of 'down time', where a person isn't chatting at the front or end of their shift. I actually don't think that this would be an issue because our agents stay pretty busy. That said, I'm running into issues where an agent's PREVIOUS shift from the day before crosses midnight. They end up looking like they've worked 20+ hours in some cases
2) Calculate duration (EndTime - Starttime) for each chat and sum those values, grouped by agent. This seems like the best approach but it gets complicated because of concurrency. An agent can be chatting with more than one customer at a time. If a person averaged a concurrency of 2 chats, an 8 hour shift would result in 16 hours of work using this method (I only want to know that they worked 8 hrs)
I found myself populating a database table with 24 hours of 10-second intervals, when I decided that there must be a better way :/
Any ideas how to do this within a spoon transformation? I'm also starting to wonder if I should attempt to write a UDF for MySQL. I'll admit I've got hardly any experience writing UDFs for SQL though.
AR