[This article is specific to Decisions on Demand version 1.14. If you are using version 1.15 or later please see this updated article instead]


Do you need to exclude users from assignments based on working hours, vacations or other absences? 


Decisions on Demand allows:

  • Administrators to associate working hours with each user
  • Users to register absences on their calendar  


This functionality is included in Decisions on Demand v1.15 and later. For 1.14 we provide equivalent capabilities as an unmanaged package (see below). 


Setup

Install the unmanaged package (if needed)

If you are using Decisions on Demand 1.14, you can install the unmanaged package from this link:

https://login.salesforce.com/packaging/installPackage.apexp?p0=04t1N000000GeNu (replace 'login' by 'test' if installing in a sandbox)


IMPORTANT: if you have existing customizations in your org, please consult Decisions on Demand support before installing the package, as it may overwrite those customizations.


Complete the configuration

To use the absence management, you need to add an Event Type and/or an Event Record Type called Absence. Events using either the Absence Type or Record Type will be considered absences for the purpose of Decisions on Demand assignments, and users will not receive assignments during the effective period of those events on their calendar.


Absence Record Type 

Using a custom Event record type provides for the best end-user experience, as a custom layout (provided with the package) can be associated with the record type. 


To create this record type and associate the custom Absence page layout proceed as follows:


Type "event record types" into the Setup search box


If there are no existing record types, create a Default record type (you can choose another name too)

This record type should be set as the default for all profiles

Associate the Default record type with your default event page layout


Now create an Absence record type and enable it for all relevant profiles


Then apply the Absence Layout for all profiles


Click Save to complete


Optionally, edit the available values in the Event Type and Subject picklists
These have no influence on the Decisions on Demand functionality, but may help you to better manage absences for your team


Absence Event Type 

If you cannot, or do not want to create a new Event Record Type, you may also add a new Absence value to the Event Type picklist:

  • Edit the Type field on the Event object
  • Add a new picklist value called Absence
    If you are using Record Types, make sure to add the new value to all relevant types
  • Make sure the Type drop down is available on the relevant event page layouts
    • Search for 'event page layout' in Setup
    • Edit each relevant layout
    • If the Type field is not present, make sure to add it to the page

Adding the custom tab to the Decisions on Demand app

Users of Decisions on Demand 1.15 and higher

For new installs the Assignment Business Hours tab is included by default. 


Users who upgraded from Decisions on Demand 1.14  may need to add the tab to the Decisions on Demand app for the administrator user. See below for instructions (replacing User Business Hours with Assignment Business Hours)


Users of Decisions on Demand 1.14 

You may want to add the User Business Hours tab to the Decisions on Demand app for the administrator user:


This is optional but will make it easier to access the working hours settings.


Usage

After installing and configuring the package, you can set working hours and record absences as explained below.

Setting working hours

The package uses the standard Salesforce Business Hours settings. 


If you do not yet have business hour defined for different groups of users, you need to create them as follows:

  • In the Setup quick find box search for Business Hours and click on the link
  • Create Business Hours objects for each of your teams
    For example:


After creating the Business Hours records, you can assign them to each member of your team:

  1. Go to the User Business Hours tab
  2. Click New
  3. Enter a unique name, a user and a Business Hours object
  4. Click Save
  5. For multiple users with the same business hours you can clone existing records

Users without associated business hours are considered to be available at all times


Recording vacations and other absences

To record a vacation or other absence, a user can create a new event on their calendar using either the Absence Record Type or Absence Event Type described above.


In both cases, the first step is to create an Event on the user's calendar, located on the Home page:


If you have created an Absence record type, you will be prompted to select it when creating the event:


Otherwise, make sure to select the Absence Type for the event


Complete the start and end date and time. You may also select All Day Event


Make sure the Assigned To user is correct, and pick a relevant Subject. All other fields are optional