Applies to: Field Service (version 22.214.171.124), Project Service Automation (version 126.96.36.199), and Universal Resource Scheduling (URS) solution (version 188.8.131.52) on Dynamics 365 9.0.x
Have you or your users ever run into an error message asking you to narrow your search because more than 100 available resources were found?
In our December 2017 update, we increased the limit for the number of resources that can be searched at a time—from 100 to 1,000. Also, even if a search returns more resources than the limit, the search still successfully completes using the top matches.
Let’s drill into the details of how this works.
Searching available resources: Then and Now
In previous versions, if the search returned more than 100 resources, then the system displayed an error and didn’t filter out any resources based on availability or any other attributes, such as resource characteristics or whether any resources were restricted. The search didn’t complete, and users would see this error:
Schedule availability found for more than 100 resources, please try to add more filter criteria to narrow the results down.
Now, the threshold limit is increased to 1000 resources, and that limit is configurable to help you balance the need to search across a higher number of resources with the processing time needed to perform more complex calculations.
Plus, even if the search criteria cause the number of matching resources to exceed the threshold, the search still completes based on those top n matches, where n equals the threshold setting. No more error message.
How the search for available resources works
Availability searches are split into two phases. In Phase 1, the system checks all the filters expressed that are stored in the database, such as resource roles, characteristics, organizational units, and so on. In other words, the system checks for attributes and entities that don’t require calculations. When a user clicks Book against a requirement, or Find availability on the schedule board, the system checks these filters and retrieves a list of resources that fit the filter criteria.
Previously, if the list of results was greater than 100, it didn’t get sent to Phase 2. What happens in Phase 2? That’s when the system takes the filtered list and performs the part of the search that requires a heavier set of calculations. The system checks the travel distance and tallies up the booked hours within the searched range (and the working hours of the resource) to determine each resource’s availability. As you can imagine, if a user searches for a resource with a 2-hour slot of availability across a year, the search could require quite a calculation, which is why the system limits the search results to a maximum number of resources.
In this update, to help ensure that more searches complete successfully, we increased the number of resources that get sent to Phase 2 to a maximum of 1000, and the system now executes Phase 2 even if the threshold is exceeded.
What happens when the threshold is exceeded
Let’s say that when Phase 1 of a search completes there are more resources than the allowed threshold. What happens next?
The system takes the top 100 results (if the threshold is set to 100), and only sends those 100 into Phase 2. That way, users still get a list of matching results even though the threshold was exceeded.
Users will still see a warning message to let them know the system searched only the top number of resources for availability. However, the filters are applied and the search fully completes.
How the top n resources are determined
Which resources are included at the “top” of the list of results is determined in two ways, depending on the scenario.
Scenario 1 – When the search is for an onsite requirement
If the requirement is that the work location is on-site, and there is a valid latitude and longitude for the requirement, the system assumes that the distance from a resource to the onsite location is most important.
The system checks which resources have the closest starting location to the resource requirement, and then sends them to Phase 2 of the search. Keep in mind that the starting location for a resource may be a company organizational unit, or could be the resource’s “home” location. The starting location is set up on the resource record.
If there are more than the allowed number of resources to send to Phase 2, next the system checks who the closest resources are, and then uses that calculation to determine which ones are the top resources to check for availability.
Scenario 2 – When location doesn’t matter for the search
If the work location requirement is on-site (“location agnostic”), but no latitude or longitude has been entered, the system assumes that location doesn’t matter.
When the user clicks Find availability, the system checks the sort options. If, after checking the filters in Phase 1, the sort was by rating value and then name, and if the number of resources exceeds the threshold for Phase 2, the system sorts the list by rating value and then name, and comes up with the top resources to send to Phase 2. If you’ve implemented custom filters, the system considers them as well.
How sort by availability option works with search
In this release, we also added the option to sort by availability. The system doesn’t consider this sort option, because it helps determine the top resources to send to Phase 2 and this requires a more time-consuming process. However, if the user selects the sort by availability option, when the results are returned after Phase 2, the results are then sorted appropriately on the schedule board.
How to configure the threshold limit
By default, the system enforces the 100-resource limit for Phase 2 unless you change it. Even though you can raise the limit to 1000, keep in mind that sending that many resources into Phase 2 of the search will take time to calculate.
We want to give you, our customers, the power to make this decision for yourselves. As always, we will continue to work to make this as fast as we can.
Instead of offering a global threshold setting for admins, the setting is available on for every entity that can be scheduled, because the needs could vary depending on the type of record.
For example, let’s say at a Field Service organization, work orders are typically searched within a 3-day range. Because the range is small, searching for availability across 1000 resources will be fairly quick.
However, let’s say instead that you’re scheduling a project requirement for a Project Service consultancy, and the typical search range is 6 months. Searching 1000 resources across a 6-month range may not be quite as snappy. In that case, you could set the threshold for project requirements to 200 resources. The same applies to any other entity used for scheduling, such as cases, leads, opportunities, and more.
To set the threshold by entity, navigate to Resource Scheduling > Administration > Schedulable Entities, double-click the entity name, and then set the value in Max Resources field.
If you leave the value blank, the system assumes it to be the default 100-resource limit.
Dan Gittler, Program Manager, Dynamics 365 Engineering.