You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Forms to assign one Task at a time to Team Members

posted on October 30, 2020

I have an interesting scenario for team filters that I cannot figure out. Here is my script as an example:

var checkRole;

var assignedTo;


checkRole=$util.getValue('Role');

if(checkRole=='Available')

{

assignedTo=team.findMembersByRole(checkRole);
}

//In case no team members Available, assign to whole team
if (Object.keys(assignedTo).length == 0)

$result=team.getAllMembers();

else

$result=assignedTo;

 

In this scenario, if there are no users assigned to the "Available" role, then I have a catch all that assigns to the whole team. However, I have Round Robin distribution enabled as well.

 

 

The end result is that it randomly round robin distributes the task within the whole team, even if the user is not in the role I'm searching for.

 

My desired result is to rather assign to the whole team without round robin, so that it goes to Unassigned Tasks instead. My challenge is that under normal circumstances when the "Available" role is found, it needs to still Round Robin distribute.

 

Is there a way to achieve this via the Javascript filter or some other method?

 

To further explain above, I'm looking to have a "task queue" and then auto assign a single task to a user once they become free (i.e. don't have a task assigned to them currently). Kind of like a call centre, where an operator can only handle one phone call at a time and pending phone calls wait in a queue. The queue is obviously "Unassigned Tasks" in Forms, but once it's there, tasks need to be manually assigned to users and this is not what I want. It needs to be automated and round robin to the next available user.

0 0
replied on November 4, 2020 Show version history

Hi Sheldon, I had a similar request for Out of Office and solved it this way.

I created a ROLE called Out of Office (OOO). which is assigned to those unavailable in Teams. Then in the Teams Filter I have a condition where it says that they can't have the OOO role to be selected.

var PROGNAME = team.findMembersByRole( 'Programs');
var OOOFFICE = team.findMembersByRole('OUT OF OFFICE');
$result = $util.difference(PROGNAME, OOOFFICE);

To allow a user to change their status as Available/Not Available, I created a FORM where the User changes their Available status and upon submission a workflow is used to assign/remove that Role to that team member in the Teams Roles DB.

It took a bit of work to figure out the DB Tables as I had to pull info from multiple tables to figure out who the user was and what roles they had assigned to them.

It would be so much easier for the User if LF would add a button on the Forms Task Inbox where someone could toggle themselves as Available or Unavailable

0 0
replied on November 4, 2020

Hi Steve, 

Thank you for sharing your solution. I like the use of the $util.difference to get the result you're looking for. I also like the use of the form to manage the user roles.

 

We've developed a custom plugin to allow users to manage their roles. My administrator account is part of many teams in the screenshot below, and as you can see, some teams are green. Green means you're Idle (Same as being available or not OOO). Users can quickly update their status within all the teams in one go and specify that they're on lunch, unavailable etc. We then record their selected option in a SQL Table with a timestamp in case any reporting is required to be done on the user's role assignments and how long they were in a particular role for that day.

 

The challenge still comes in when you want to round robin assign tasks to users to even out the workload, the team filter still round robins based on the final result. I'm going to try out Ziyan's suggestion as well to see if it works. However, what I'm really looking for is that "feed one task at a time" feature. I think we're going to hack away at the Forms API, documented or not, and see if we can find a solution to this. Will be sure to update everyone here of the outcome.

1 0
replied on October 30, 2020 Show version history

Hi Sheldon,

Is it acceptable to you that task is randomly assigned to Available team member?

 

If yes, following alternative may work:

Uncheck 'Round robin task distribution' option, so that task won't be assigned to specific team member in all scenarios.

Then try to achieve 'Round robin task distribution' in team filter. I use random function here

var checkRole;

var assignedTo;


checkRole=$util.getValue('Role');

if(checkRole=='Available')

{

assignedTo=team.findMembersByRole(checkRole);
}

//In case no team members Available, assign to whole team
if (Object.keys(assignedTo).length == 0)

$result=team.getAllMembers();

else
{
//random assignment to member
var pos = Math.floor(Math.random() * Object.keys(assignedTo).length); 
$result=assignedTo.slice(pos, pos+1);
}
0 0
replied on October 30, 2020

Hi Ziyan,

 

Thank you very much for the feedback, I believe this is a possible interim solution. Will test it out and let you know.

With regards to the ability to manage the Unassigned Tasks as a queue and auto assign tasks one at a time to users with the "Available" role, do you have any insights? I was thinking of making use of Forms API, but it's not that well documented.

0 0
replied on November 2, 2020 Show version history

I couldn't think of how to achieve this scenario with current Forms out-of-box functionalities. And Forms APIs are not officially exposed for external usage, so there is risk that API may change in the future without notification.

Is there any reason that you don't want task to be manually assigned/claimed?

0 0
replied on November 2, 2020

Hi Ziyan,

The requirement is in a call centre. We're monitoring a shared mailbox and converting the emails into tasks.

The challenge is that in a call centre, users aren't always available. They could be on lunch, they could be in training, they could be on leave. So we manage their status via the "Role" of the user within the team. If their role is "Available", then they will get a task. However, if they're not at their desks and their role changes, then we don't want to assign any tasks.

Dropping tasks into Unassigned is one part of the puzzle, which you've helped solve with the updated script (just need to confirm even work distribution if it's randomised assignment).

To allow the users to assign their own tasks to themselves is a challenge, as the managers do not want this. Some users would only assign themselves the easy tasks, leaving the difficult ones for others. You end up with some tasks never being assigned, as users can opt to "skip that one". So our challenge is to come up with a system that

1. Doesn't assign tasks to users if they're not available

2. Only assign one task at a time, so the user can be fairly measured against how long it took to complete the task from the moment it was assigned. (Round Robin doesn't achieve this if there's alot of tasks).

Hope this paints the picture.

0 0
replied on November 3, 2020 Show version history

Hi Sheldon,

Thanks for sharing the use case. I will pass it to team to see whether we will support it in the future.

Looks like direct calls to Forms APIs are necessary to accomplish the desired function for now. You can post on Answers if you encounter issue with specific Forms API.

 

While, there might be another way to accomplish that with new feature introduced in next release. Forms will allow retry suspended user task, which will try to assign user task again (including configured team filter) if user task is not properly assigned before. 

So if no team member is available, instead of assigning user task to team, assign it to nobody (return empty list in team filter) and make it suspended. Then retry the user task with API periodically. The upside is that only 1 API is directly called and let Forms handle the assignment. The downside is that user will not be able to view those suspended task from unassigned task list.

0 0
replied on November 4, 2020

FYI, This falls into to the same functional feature request as an Out of Office feature which has been requested for some time now by multiple people on this site and directly at Empower conference

1 0
replied on November 4, 2020

Hi Ziyan,

 

I see how using the new feature may help achieve the desired outcome. However, I need instant task assignment once a user becomes available as opposed to waiting for the retry. Will the retry wait time be configurable? I also would rather have the visibility on the queue of tasks so that Team Managers can see if workload is getting too much and take action manually where needed. So the Unassigned Tasks section is good for this.

If you're looking at features, I would maybe mention this to the dev team and make task assignment via round robin configurable to have a limit of how many tasks a user can have at any given time. If the user has hit the limit, try assign the task to the next user. When no users are available, then assign to the team as unassigned task. Then monitor the unassigned tasks to try and redistribute to the team based on the limit and applying the current round robin logic for oldest task assignment. Of course, a feature like this should be configurable in the Process Diagram as well as on the team itself as this wouldn't necessarily apply to all teams, all tasks and roles etc.

 

For now, I will try to come up with a solution and will share the outcome here.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.