Scenario Overview
In this scenario the customer had the following business requirement: Phone calls should only be scheduled at 9 am, 12 noon, 3 pm and 6 pm and not use the out of the box feature which allows for user defined input.

North52 Decision Suite Solution
The North52 Decision Suite solution works like this:
- A formula of type 'Save - Perform Action' set up on the Phone Call entity
- The formula retrieves the date portion of the phone call Due date
- It then converts it to Local time (in this case GMT +1) resulting in 1 am.
- Finally it adds the required hours to match the chosen value in the VisitTime Optionset**
** These values would be different depending on your Local time and in a Production environment would be calculated instead of hard coded.

North52 Decision Suite Steps
The following set of steps outline how to create this Formula:
- Add a new Optionset field to the Phonecall called 'Visit Time'
- Create a new formula of type 'Save - Perform Action'
- Set the Source Entity to 'Phonecall'
- Set the Mode to 'Server Side' and the Event to 'Create & Update'
- Set the Source Property of the Formula to the newly created 'Visit Time' field
- Configure the Due field as shown below
- Copy and paste the formula below into the formula
- Click save and test
Formula
AddHours(
      LocalTimeFromUtcTime(GetDateOnly([phonecall.scheduledend])), 
                
    Case([phonecall.new_visittime], 
         When('100000000'), Then ('8'),
         When('100000002'), Then ('11'),
         When('100000001'), Then ('14'),
         When('100000003'), Then ('17'),
        Default('0'))  
)Visit Time field

Due Date field

Wizard - LocalTimeFromUtcTime
Please see below the wizard you can use to create the LocalTimeFromUtcTime () function call used in this formula. 
Note for  Input Date , please enter GetDateOnly( [phonecall.scheduledend]) 
 
 
 
		
