There are many interlocking relationships in Service Scheduling that once understood and correctly implemented unleash the full power of Microsoft Dynamics CRM. Service scheduling is about identifying and implementing resources, users and equipment/facilities in CRM. These are models of their real world counterparts. It is important to think about resource requirements and availability and how this is modeled using services and resource groups. When you look at the problems users have you usually find that the required resources have no availability. Remember too, the site or location of the resource relative to the service offered.
Resource Work Hours:
In MSCRM, the resource is a user or equipment/facility, which really refers to the scheduling aspect of the two types. System Users can be created from Settings -> Administration -> Users Grid. Equipment/Facilities can be created from Settings -> Business Management -> Facilities/Equipment Grid.
System Users and Equipment/Facilities both have a calendar, which is essential to the Service Scheduling Engine. Time is modeled in the calendar via calendar rules, which are surfaced as Available, Time Off, Breaks, Business Closures, Appointments and Service Activities. Time is always stored as Coordinated Universal Time (UTC) and displayed in the current user’s time zone. A Resource’s Time Zone can be set in the Work Hours, Weekly Schedule. For service scheduling, other differences between users and equipment/facilities are not considered.
After creating and saving a resource, user or equipment/facility from the MSCRM user interface, a calendar object is created. This calendar, Work Hours, sets the resource availability to 24 hours a day, 7 days a week. See Figure 1, User form and Figure 2, Equipment Resource form. Note: When the Resource is saved, the disabled items in the Details section in the left side of the form are enabled.
Figure 1- User Dialog
Figure 2- Facility/Equipment dialog
T o display the ‘Work Hours’ calendar grid, click on Work Hours from the Details pane on the left side of User or Facility/Equipment form. The Work Hours is a monthly view. Notice it appears with the current day highlighted. From this view, you can setup a New Weekly Schedule, a Work Schedule for One Day, a Time Off, edit the entire schedule or modify a schedule for one day.
Figure 3- User dialog with Monthly View
Creating a Typical Resource Schedule:
To edit a Resource’s entire schedule, start in the Working Hours grid. Double Clicking on any day, or selecting Edit from the Actions grid menu, will open the Edit Weekly Schedule dialog, see Figure 4. Change the setting to edit the Entire recurring weekly schedule from start to end and click the OK button. This opens the Weekly Schedule dialog in the context of changing the resource’s entire work schedule.
Figure 4- Edit Weekly Schedule dialog
Changing the Weekly Schedule Work Days:
Notice on the schedule below, Figure 5, the Work Hours are the same each day from 12:00 AM to 12:00 AM (24 Hours) and the Work Days section has all the days of the week selected. This weekly pattern is repeated as long as the resource exists. This pattern can be interrupted by Time Off and Business Closures, but will continue unless a new calendar rule overrides this one.
Also note that Business Closures are set to ‘Do not observe’, so if the business sets up a Business Closure, it will be ignored until this setting is changed. Also of interest is the Vary by Day, where the day and hours can be adjusted individually. There is also a ‘None. Resource is not working’ setting that un-checks all of the days. Since we are in the context of changing the resource’s entire work schedule, the Date Range indicates a Starting on Date and displays No End Date.
For this resource we will set them up to work the same hours each day, but only working Monday through Friday. First, uncheck Sun and Sat from the Work Days.
Figure 5- Weekly Schedule dialog with defaults
Remember that the Time Zone only affects the time and day values displayed to the user as the scheduling calculations are made in UTC.
Changing a Resource’s Working Hours
From the Weekly Schedule dialog, to change the resource’s working hours, click the underlined default working hours to make the Work Day dialog appear. Notice the Work Hours Start and End times match the work hours shown in the Weekly Schedule dialog.
Figure 6- Work Day dialog with default hours
On the Work Day dialog, on the Work Hours tab, change the Start to 8:00 AM and the End to 5:00 PM, see Figure 7. To add a lunch break, click the Add Break button. Notice the default break is a half hour break starting at 12:30 PM. Make the break be a one hour break by changing the End time of the first Work Hours Line to 12:00 PM. Note the Work Day description at the bottom of the work hours and breaks table is ‘Total: 9 hours, Working 8 hours, Breaks: 1 hour’. Clicking the OK button at this point will save the Working Hours for the Resource.
Figure 7- Work Day dialog with 8AM-5PM Schedule
Resource Work Hours Capacity:
The Work Hours tab has a button called Show Capacity >>. Capacity can be thought of as how many tasks can I perform at the same time. A simple example of this could be a classroom scenario, where the classroom has 30 seats and a single teacher can instruct 30 pupils filling those seats in a class hour. By setting the capacity to 30, a single instructor can be scheduled for a maximum of 30 class appointments in the same hour.
The default capacity is 1 and can be changed by entering the new value, see Figure 8. The range of valid values is from 0.0001 to 999,999,999. For most resources the default capacity of 1 is desired.
Figure 8- Work Day dialog with Capacity on 8AM-5PM Schedule
Another interesting feature of the Work Day dialog is the Service Restriction, found in the Service Restriction tab. A Service Restriction defines when a Resource cannot be scheduled to perform a Service Activity. To define a Service Restriction, there must be a Service defined and the Resource should be among the Required Resources for defined Service. Click on New in the Service Restrictions grid to display the Service Restriction dialog, see Figure 9.
This feature could be used in the scenario, where a Resource is not available to perform a Service at certain times of the day or on certain days. In the teacher scenario, we could have only classes in the afternoon of all days we worked, if we created a service Restriction that had a Start time of 8:00 AM and an End time of 1:00 PM. Service Restrictions are just another method to map resource availability to a real world problem.
Figure 9- Service Restriction dialog
Clicking OK in the Service Restriction dialog will populate this restriction in the Service Restrictions tab of the Work Day dialog, see Figure 10. The Teaching Service is ‘Not Available’ from 8:00AM to 1:00PM.
Figure 10- Work Day dialog with Service Restriction
Sites can be thought of as a location that the Business Unit performs work. The scheduling engine looks at the Service’s Required Resources and if the ‘Same Site’ is specified will use the Site specified while scheduling a Service Appointment. This means only Resources from the same site specified in the Service Appointment will be selected. The scheduling engine will not mix Resources not belonging to a site with those belonging to one if ‘Same Site’ is specified in a Service’s Required Resources. As without Sites, the scheduling engine will only return resources with availability.
A Site can be created from Settings -> Business Management -> Sites grid and clicking ‘New’, see Figure 11. Once a Site is saved, the user can associate Resources with the site. Again, Resources can be Users or Facilities/Equipment. A list of Resources can be viewed by clicking the Resources item in the Details pane.
Figure 11- Site dialog
Resource Groups Clarifications:
A Resource Group can be thought of as a collection of Resources. The Resource Group can contain Users, Facilities/Equipment, other Resource Groups and Teams. A Resource Group can be created from Settings -> Business Management -> Resource Groups grid and clicking ‘New’, see Figure 12. Once a Resource Group is saved, Resources can be added by clicking the Resources item in the Details pane.
Figure 12- Resource Group dialog
Note: The scheduling engine will expand nested resource groups into a large pool of resources and will schedule against all in this pool. This means modeling Resource Groups as individual crews of mixed resources is not supported through the user interface. Generally, you should create Resource Groups to model groups of similar resources.
If you want to model a crew for scheduling, it should be performed with nested Resource Selection Rules. Create one Selection Rule for Each Crew, each containing a number of nested Selection Rules, each for the number of Resources to select from a Resource Group of Similar Resources. See Figure 13.
Figure 13- Resource Selection for two Crews
Services in CRM can be thought of as Business defined activities. Scheduling a Service Appointment is only possible from a defined Service. Only Service Appointments and CRM Appointments cause the scheduling engine to search for availability. A Service can be created from the Settings -> Business Management -> Services grid and clicking ‘New’, see Figure 14 below.
Initial Status Reason is the default status assigned to a newly scheduled Service Appointment against this Service. Status Reasons in the Scheduled category: Pending, Reserved, In Progress and Arrived, will block off availability for the Required Resources and without overriding the scheduling engine another Service or CRM Appointment can be scheduled for this time. Service Appointments with Status Reasons in the Open category: Requested or Tentative, do not block off availability and the scheduling engine will return availability.
Default Duration is the default length of time the Service can be scheduled for. When a Service Appointment is created, this is the duration the appointment will be defaulted to. This duration can be overridden at schedule time. A service can be scheduled for 1 minute minimum, up to 3 days maximum. Care should be taken with long running services, as calendar breaks and Business Closures affect availability.
‘Start Activities Every’ refers to the granularity of start times for the Service Appointment. If your business always wants appointments to start on the hour, this setting should be changed to ‘1 hour’, otherwise, the default setting of ‘15 minutes’, will allow new appointments to start every 15 minutes. Service granularity should be considered with ‘Beginning At’. ‘Beginning At’ indicates when the first Service Activity can take place. The default is ‘8:00 AM’, which means the first appointment can be scheduled for 8:00 AM.
Figure 14- Service dialog- Piping Service
A new service will always display the warning ‘Required resources have not been selected for one or more selection rules…” whenever there are either no rules defined for a service or there are errors in the Resource Selection Rules. The Selection Rule is defined in the Required Resources tab of the Service dialog, see Figure 15.
The Selection Rule is also referred to as the Resource Specification or Resource Selection Rule. The Selection Rule defines the selection criteria for the Service’s Required Resources. The basic information required for a Resource Selection is ‘How Many Resources’, from ‘The Same Site’ or ‘Any Site’ and where to select the Resources from. Always make sure and save work before progressing!
Figure 15- Service dialog- Initial Selection Rule
To define a Selection Rule, click on the Required Resources tab on the Service dialog. On the right side of the pane is the Root Selection Rule, stating something like, ‘Choose (1) from (The same site) From < Click to select Quantity>’. I added the parentheses around the areas that will be modified by the Selection Rule dialog. To edit the Root Selection Rule, select the rule and either click Edit Selected Item, or click on one of the hyperlinks in the rule, see Figure 16.
Figure 16- Edit a Selection Rule dialog
Important notes about the Root Selection Rule:
Several Resource Selection Rule patterns are worth noting here to avoid some confusion:
A Selection Rule can be created inside another Selection Rule by selecting the rule and clicking either the ‘Add Selection Rule’ task, or the Selection Rule item below a new rule.
It is a best practice to verify that the correct Required Resources are specified for a Service by attempting to create a Service Activity using the Service prior to rolling one out to your users.
Hidden Resource Groups:
After Resources are selected to participate in a Resource Selection Rule, the ‘Save the Selection as a Resource Group’ dialog is displayed, see Figure 17. The ‘Save the Selection as a Resource Group’ dialog gives the user a chance to name the Resource Group for future usage. Note: If the user decides not to create a named Resource Group, MSCRM creates a hidden one, a Resource Group the user can only access via the Resource Selection Rule.
Figure 17- Save the Section as Resource Group dialog
For maintenance purposes, it is recommended to create a named Resource Group instead of the hidden type. This will allow maintenance to be performed at the Resource Group level and not at the Service definition.
As stated earlier, Business Closures are recognized as Un-Available Time in the scheduling engine. If the user’s Weekly Schedule is marked as ‘Observe’ in the Business Closures section, the closure Time-Off will not be used during the scheduling engines availability query. To create a Business Closure, navigate to Settings -> Business Management -> Business Closures grid and click the ‘New’ item. This will display the Business Closure dialog, see Figure 18.
Figure 18- Business Closures dialog
The name of the Business Closure is required and the Duration of the closure can be from 1 minute to 3 days. To set the duration smaller than the 1 day default, either select a smaller Duration or uncheck the All Day Event check box to display the hour settings. Enter a Start and End Time for the beginning and end of the closure. See Figure 19 for a sample of Holidays as Business Closures.
Figure 19- Business Closures grid - 2008
Earlier we indicated that both the MSCRM Appointment and Service Activities are accounted for in the search for resource availability. For Service Activities, the Service Activity resources are based on the Resource Selection defined in the Service entity. For MSCRM Appointments the resources are based on a manual selection of the resources.
The Service Activity form has redundant information with the Schedule Service Activity form. It can save time to enter a Subject, location and any notes in the Service Activity form and click the Schedule item at the top of the form to open the Schedule Service Activity form. The redundant information can be entered once in the Schedule Service Activity form, see Figure 20 and will be propagated to the Service Activity form.
Figure 20- Schedule Service Activity Form
Customers in MSCRM are Accounts and Contacts. Select a customer from the lookup to add a customer to this form. While Accounts and Contacts are listed in Service Activities, their availability is not calculated, so you could overbook a customer but not the resources that serve that customer.
Select the Service for the activity from the lookup to add a service to this form. These are services that you defined, so you do not have to select the resources directly, they will be populated when you select a Service Activity from the Available Times grid.
Only select a Site, if your business has multiple sites defined and if that site distinction is required for a Service. Currently there is no way to determine if a Service requires a Site unless you look at the Service Selection Rules. If you do not find Available Times and you think you should, try changing the Site parameter to ‘Remove Value’ in the lookup.
From the Requested Time section:
Click the Find Available Times button to display Service Availability in the Available Times grid. If there is no availability, or there are issues with the Service’s Selection Rules you will get a ‘The resources available for the selected dates or times do not meet the minimum requirements for this service. Some causes for this message are:
Service Scheduling has many moving parts and needs some careful thought in the implementation.
Some links to related articles:
Viewing Schedules in Microsoft Dynamics CRM http://community.dynamics.com/blogs/cscrmteam/archive/2008/03/27/viewing-schedules-in-microsoft-dynamics-crm.aspx Update Service Calendars in Microsoft Dynamics CRM http://community.dynamics.com/blogs/csarticles/archive/2008/03/09/update-service-calendars-in-microsoft-dynamics-crm.aspx Keep Customers Coming Back with Follow-up Services http://community.dynamics.com/blogs/csarticles/archive/2008/03/09/keep-customers-coming-back-with-follow-up-services.aspx Important Time Zone issue for Users In The Southern Hemisphere http://community.dynamics.com/blogs/cscrmteam/archive/2008/04/03/important-time-zone-gotcha-for-users-in-the-southern-hemisphere.aspx
Viewing Schedules in Microsoft Dynamics CRM
Update Service Calendars in Microsoft Dynamics CRM
Keep Customers Coming Back with Follow-up Services
Important Time Zone issue for Users In The Southern Hemisphere
PingBack from http://microsoftnews.askpcdoc.com/?p=2805
Service modulen i Microsoft Dynamics CRM är en modul som inte fått den uppmärksamhet den
Nice post. It's a shame the scheduling form itself (and the service calendar for that matter) can't be customised though. I've recently put together a training course scheduling system using this, which also books trainers and rooms for each event, each room's capacity being the number of students it can hold. Seems to work well in testing so far.
There is a limitation of the use of service capacity for users and services. If a user has the capacity of 2 and one service takes up one unit but another (entirely different) service can be booked at the same time for the same user.
Thanks For a product . It looks very Nice
Have you noticed that on the business closure overview the duration is empty.
Seems to me that this is a bug
What about holidays of a user? How to handle workflows, which includes USER going for holiday?
Example: Peter is off for two weeks, Sarah needs an approval from Peter immediately. How can Peter's manager getting involved to it, if it's a script running, asking for Peter's approval?