In companies with different departments there always has a need records to be redirect (or to use the technical term assign ) to a certain people based on some criteria. Whether this is a support team where a new case is assigned to sub-team (such as: Technical Support, Customer Support, Sales Support, etc.), or perhaps a Sales team based on lead creation so they can handle the potential clients. In any way most of the time this is a manual work and there will be either a team leader doing the assignment, or a some kind of queue manager to distribute the work load.
There are some solutions in the marketplace allowing to auto assign records, based on some criterias, but they all are payed (on a monthly and sometimes user bases as well), which can be quite exepensive.
I've decided to share with you a method for auto record assignment using Power Automate. Aswe all know Power Automate is super powerfull, and allows to do an amazing automations. Power automate is also very flexible and allows customization (HTML, CSS, JSON, etc.)
If we go to the CRM web API https://<your organization.crm4.dynamics.com/api/data/v9.2/ and search for team, at somepoint in the resukts you will find the following table teammembership. This is actually a middle table between users and teams tables as the relationship between these two is 1:N (one to many, one team can have many users), but also one user can be part of many teams. So this is why there middle entity is required to store all information about all users and all teams in one place.
Here we have the userid and the teamid, so we are going to use this table in Power Automate.
For example: We have total ot 15 users in the Sales team, the step will pick a random number from 1 to 15.
For example if the syste picks number 7 we need to know who is the user behing this number.
That actually everything, we now have automation record assignment process. Hope this will help you with managing your CRM records.