Auto assignment of Catalog task based on user location

Abhishek_Chavan
Tera Expert

We are currently trying to assign catalog tasks based on user location. e.g. if a task is created it should be assigned to the local help desk of the user based on their location. Assigned to NY desk for user based out of NY.

 

This should apply for catalog tasks created from Catalog item.

 

I was wondering what is the best practice to implement this configuration. 

1 ACCEPTED SOLUTION

manducchau
Mega Guru

Using sysrule_assignment (Assignment under Left Hand Menu) to specify your conditions. This would help you centralize all assignment rules in one place, instead of spreading across different workflows or flows.

View solution in original post

6 REPLIES 6

Mitsua
Tera Guru

Hello @Abhishek_Chavan 

 

Are you using workflow for creating catalog task?

If yes then inside "Catalog Task" activity you can try something like below code:

Just for an example I have taken requested for user.

If you want to assign task based on location , you can use "nested if else" also

if (current.requested_for.location == '1ada36b31bdbd9101e674375cc4bcbcb') { //sys_id of location
	
    task.assigned_to = '6816f79cc0a8016401c5a33be04be441'; //sys_if of user
}

 

You can mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

 

Thanks!

Mayuri Sawant.

This is not good practice as it's hard coded both location and assigned_to person. Also, if you have other workflow/flows, you have to replicate this piece of code which will cause significant maintenance cost.

 

It would be better if you can use Assignment rule to centralize all assignment rules in one place as principle (first solution to think of). Definitely, sometimes you have specific requirements (e.g. depending on result of other tasks), you can consider Catalog Task activity.