Assign Lead managers randomly to leads
Hi,
I am trying to make workflows for when an item is created or updated to set a reference in a relationship field (Lead Manager field). I need the references for other workflows, but I don't want it to have to be manually set every time an item is created. In the workflows, no matter what I try (in Podio and Globiflow) I cannot find a way to set the item I want to reference. Is this not supported? It will be a huge bummer if it can't be done.
I have an app called Team members where all my lead managers contacts are and another app called SPA where leads are created.
I want to create a trigger that when a lead is created it assigns lead managers randomly to it.
Thanks in advance for any help.
-
There are a few ways to do this, but this is a simplistic approach:
If you add a single line text field that holds a single number (Team Seq Num).
In PWA make a variable that is: rand(1,max) where max is the largest possible ID from your team member app.
Then use a search in PWA of the team app for the field with the @Team Seq Num of the results of the rand calculation.
You can then populate the team member field with the data in the Team records Podio Profile field.
Just make sure the numbers in everyone's Team Seq Num are always sequential, so if the person with 3 leaves, slide everyone else down by one and adjust the max in the PWA app.
You could make a just-in-case Sanity check, so if the search of the team app returns no valid match, it tries a new random number.
Please sign in to leave a comment.
Comments
1 comment