Sunday, May 22, 2011

Calculating Committed Date excluding Holidays in siebel

Requirement: When a Service Request is created, Committed date should be 15 days from created date excluding holidays.

Solution: This requirement is done using "GetResponseTime" method on "FS Holiday API Service" BS. This BS calculates the response time based on the Start Time and Time Unit in Seconds/Minutes/Hours/Days.
For this solution we need to define the Holidays in Applications. Follow these steps to achieve the solution for this requirement.

Step1: Create Holidays List in Application

  • Application- Service-> Schedules->Exception Tab a new record.Add Holidays list as shown below.


Step2: Create a Schedule

  • Navigate to Application- Service-> Schedules and create a new record.
  • Name: WeekDays
  • Description: < Give some suitable description to this schedule>
  • Exception: Add the exception Created in Step1.
  • Schedule Hours: Create Schedule hours based on Per Day as shown below.

Step3: Add Script on NewRecord Method on Service Request BC.
Add below inputs to BS and invoke service method.


Inputs.SetProperty("Priority","1-ASAP");
Inputs.SetProperty("Response Time","15");
Inputs.SetProperty("ServiceCalendarId",<Row Id of the Schedule created in Step2>);
Inputs.SetProperty("Start Time",this.GetFieldValue("Created"));
Inputs.SetProperty("Time Unit","Days");
Inputs.SetProperty("Time Zone",<TimeZone Name>);

BusService.InvokeMethod("GetResponseTime",Inputs,Outputs);
NextBusDay = Outputs.GetProperty("Commited Time");
this.SetFieldValue ("Commit Time",NextBusDay);


'NextBusDay' Contains the Date to which excludes holidays defined in exception hours. So in order to make the BS to calculated properly we need to add all the holidays for the year.


No comments:

Post a Comment

Siebel Open UI is released ...!!!

Hi Guys, The most awaited feature of Siebel, called Open UI is released. This new feature Open UI is available in new Siebel patch 8.1.1....