The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Service Management Scheduling Unleashed

Service Management Scheduling Unleashed

  • Comments 7

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.

arne1

Figure 1- User Dialog

arne2

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.

arne3

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.

arne4

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.

arne5

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.

arne6

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.

arne7

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.

arne8

Figure 8- Work Day dialog with Capacity on 8AM-5PM Schedule

Service Restriction:

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.

arne9

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.

arne10

Figure 10- Work Day dialog with Service Restriction

Sites Clarifications:

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.

arne11

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.

arne12

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.

arne13

Figure 13- Resource Selection for two Crews

Service Defined:

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.

arne14

Figure 14- Service dialog- Piping Service

Selection Rules:

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!

arne15

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.

arne16

Figure 16- Edit a Selection Rule dialog

Important notes about the Root Selection Rule:

  • Use the ‘All’ quantity if you want to bubble-up the results of nested rules
  • Use a specific quantity if you are not using nested rules
  • If ‘The Same site’ is selected in the Root Selection Rule, all nested rules will require the same site
  • If ‘Any Site’ is selected in the Root Selection Rule, all nested rules will disregard the site requirement

Several Resource Selection Rule patterns are worth noting here to avoid some confusion:

  • Multiple Resource Groups in the same Selection Rule will be evaluated by the scheduling engine as one large group of resources.
  • When Resource Groups (or Teams) and Resources are in the same selection rule, they will be evaluated by the scheduling engine as one large group of resources.
  • When several ‘nested’ Selection Rules exist, failure to find resource availability in any of the rules will display ‘not enough resources’ message when attempting to schedule a Service Appointment.

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.

arne17

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.

Business Closures:

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.

arne18

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.

arne19

Figure 19- Business Closures grid - 2008

Service Activities/Appointments:

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.

arne20

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:

  • The Start Date defaults to the As Soon as Possible item, but a user can also select a Specific Date, a Range of Dates, Today, Tomorrow, This Week, Next Week or Next Month.
  • Start Time defaults to Any Time, but a user can also select a Specific Time, Range of Times, Morning, Afternoon or Evening.
  • By default the Use Default Duration is set, but a user can override the default duration for a Service Activity. Not the best practice.

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:

  • Same Site requirements are specified in the Service Selection Rule and the Required Resources either do not have a site set or a site not matching the Site specified in the Schedule Service Activity Form.
  • The Service Selection Rules are not defined for the Service. The Service dialog will display a large banner if this is the case.
  • The Resources do not have availability at the time specified for the Service Activity. Check the Work Hours for the Resources included in the Service Selection Rule.
  • A Business Closure or Time Off for the Resource may be in effect. Verify there are not closures or time off required.

Conclusion:

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

Arne Marquez

  • PingBack from http://microsoftnews.askpcdoc.com/?p=2805

  • Service modulen i Microsoft Dynamics CRM &#228;r en modul som inte f&#229;tt den uppm&#228;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?

Page 1 of 1 (7 items)
Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post