function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mandarmandar 

How to assign tasks to a group via API?

I am trying to assign tasks to a group of users. I would like for the tasks to be evenly distributed amongst this group of people automatically.

How do I go about achieving this? Do I need to assign the ownerID of the task to be the groupID? Or should I create an assignment rule and use the assignmentID as the owner ID?

Any input would be greatly appreciated.

DevAngelDevAngel

Hi mandar,

Could you provide a little more information about what you are trying to do.  It sounds like you want to create a single task and assign it to multiple people.  You cannot do this as the ownerId of the task object can only reference a user object.

mandarmandar

Hi Dave,

Thanks for your reply. Let me elaborate further: We have several groups (each comprised of 1 sales manager and 2-3 telemarketers) within the sales team. I would like to create tasks and assign those to a group object (as opposed to a user object). I was hoping that there would be some sort of assignment policy that would then assign the tasks automatically behind the scenes to each of the 2-3 telemarketers by rotation.

I am currently achieving this myself by keeping track of the person the task was last assigned to within a group and then rotating the assignees as I generate the tasks. The down side to this is that there is a code change invloved everytime a new person gets added, moved around or leaves. I would like for the sales managers to be more in control.

Hope that sheds more light on the issue. Is there a better way of doing this?

 

 

DevAngelDevAngel

I see.  When you say groups do you mean literally, salesforce.com Groups?  If so, you can use that to reduce code changes when ind. move into, out of, or among teams.

Otherwise, there is no process that will fan out tasks to ind. when a task is assigned to a group (which can't be done any way).  

BertHooymanBertHooyman

Dave,

not sure I understand your reply. I'm interested in assigning tasks to groups as well; the net effect being that a team of users see the same set of tasks in their todo list, one of them picks up the task and all other team members see the task as "in progress" or "completed". This is for distributing a workload across a team of equally qualified employees.  How does the Group object help me (I think your reply suggests it does)?

DevAngelDevAngel
Man, that is an old post!

A task can be owned by a user - only.  So the approach to make a task visible to a group is by using Public Groups and assigning the task to a group member.  That won't necessarly mean that the tasks owned by group members will show up on the home page.

It does give me an idea for a pretty useful homepage widget though :smileywink:
BertHooymanBertHooyman

Thanks Dave,

We are considering an alternative approach where instead of tasks we'll uses cases. Cases can be assigned to queues, cases are hierarchical (we like that) and cases have rule-based assignment and escalation built in. We like all of that. Your opinion on this approach is highly appreciated, though.

 

Bert