web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Randomly assign LEAD ownership from a workflow

(0) ShareShare
ReportReport
Posted on by

Is there a way to randomly assign the owner of a LEAD record from within a workflow between 2 users in CRMOL?

For example, a new LEAD is set up and the workflow that runs already sends out a number of emails and schedules calls etc.  At the beginning of this workflow we would like it to randomly assign the LEAD record ownership to "one" of two users in our system, so that all emails and calls scheduled later in the workflow are owned by the randomly chosen user.

Thank you for any help.


Kirk

*This post is locked for comments

I have the same question (0)
  • Deepesh161 Profile Picture
    6,317 on at

    You can create a team, add the two users and assign it to the team, anyone between the two can pick it to work upon ?

  • Community Member Profile Picture
    on at

    Thank you for the quick response Deepesh.  Do you know of any documentation on CRM Teams?  I'll check it out to see if it might work.

    I have a hunch though we are going to need the workflow to make a decisive decision on who gets the ownership.  Thus allowing the emails and scheduled calls/tasks that the workflow creates to come from and be associated with the correct crm user.

    Kirk

  • Verified answer
    Deepesh161 Profile Picture
    6,317 on at

    Teams will work in similar manner: msdn.microsoft.com/.../gg328485.aspx

  • Verified answer
    Miguel Brandao Profile Picture
    30 on at

    You shouldn't have a problem with this. The approach I suggest is as follows:

    -Have the workflow assign the record to the team of your choosing
    -Create a view where the 2 users from said team can view pending leads
    -The users then claim (assign to themselves) the record from the view
    -Execute a workflow to create all the calls and emails, now that the record is properly owned by a single user.

    Hope this helps!

  • Verified answer
    Community Member Profile Picture
    on at

    You can't literally do this randomly, but I am not sure how useful that would be anyway.

    Instead, search for "CRM round robin assignment" for approaches to assigning them alternately.

  • Suggested answer
    Community Member Profile Picture
    on at

    We ended up creating a random number field on LEADS (1-101) and then assigning the owner of the lead through workflow based on <>= to the random number.  One user owns everything above 30 the other everything under 30.  

    It worked out really well.

  • Suggested answer
    bialix Profile Picture
    370 on at

    Actually you can achieve something like round robin with one simple workflow and custom field.

    Let's assume, that you have bunch of leads to import and you want to assign them between 3 user equally.

    First of all, you have to create integer field on user form. Next, input values 0 and 1 to this field for all users, as you want to, like that:

    User A custom integer = 0

    User B custom integer = 0

    User C custom integer = 1

    Now it's time to build workflow, it can run on create.

    If User A custom integer = 1 assign to him, set User A custom integer = 0, set User B custom integer = 1, set User C custom integer = 0

    else if User B custom integer =  1 assign to him, set User A custom integer = 0, set User B custom integer = 0, set User C custom integer = 1

    else if User C custom integer = 1 assign to him, set User A custom integer = 1, set User B custom integer = 0, set User C custom integer = 0

    If you set values as I described, you should get as results Lead assigned to User C, and next one in line is User A.

    When you and another lead, then it will be assigned to User A, and next in line is User B, and so on.

    You can replace custom integer with bool field or any other. Key is to construct workflow with stable values.

    Crazy as it sounds, but it should be working :)

  • Community Member Profile Picture
    on at

    @Bartek Bialik - don't do that.

    Or at least only do that if you have considered the performance hit of doing so and think it is definitely worth it.

    When a user signs in, lots of data about their security profile is cached on the front-end web servers - their team memberships, their security privileges etc. If you change anything such as adding or removing a user from an owner team, or assign them to a new security role, this cache is flushed and rebuilt. This also includes if you update or modify their user record in any way.

    So your method means that every time a lead comes in, all three user's records are changed, and the next action they each take (just navigating to a new record, or whatever) will have to wait until the cache has been rebuilt. This means a delay for the user who just clicked on something, for no reason that is obvious or visible to them. If you have a handful of new leads in a day and 3 users affected, maybe not a big deal, but scale to hundreds of leads of tens or users and they will soon start moaning.

    In general, don't store on a user record any values that will change frequently. I see some people use this as a simple but flawed way of counting metrics for user adoption, for example. In some scenarios a custom entity which is both child and parent of the user record (forcing a 1:1 in other words) is the best place to store this data, but for the scenario at hand would not work without additional code or convoluted configuration and child workflows, as you won't be able to query or set the value from this record which is two steps away.

    I would also worry about the possible race condition issue if you have multiple leads coming in at once (eg data import), and whether the reading and writing to the user records will catch up with each other. Using real-time workflows might mitigate this a little, but could cause a different problem of read locks, so the second lead would have to wait until the first was finished, then the third for the second and so on. Could be a big log jam.

    I can also imagine the huge headache of maintaining this approach for more than 2 or 3 users would be a nightmare. How about ten possible user permutations in the workflow? How about when one of those leaves or a new user starts? Messy.

  • bialix Profile Picture
    370 on at

    @Adam, it all depends from amount of leads, users involved and how leads are imported.

    I can't imagine to use that solution for 10 users at once and hundreds of leads per day.

    But for small team and several leads, efficiency loss shouldn't be too big to delay work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans