25Business Service Methods in Siebel Field Service
Business Service Methods in Siebel Field Service
This chapter provides details about the methods for business services in Siebel Field Service. It includes the following topics:
About Business Services in Siebel Field Service
Generally, business services have the following characteristics:
Business services define reusable business logic that can be executed in the Siebel Application Object Manager.
Business services can be built-in services that developers define in Siebel Tools or run-time services that administrators define in a client application.
Business services can be based on the CSSService Class (standard business service) or on specialized classes (specialized business service).
Note: Only Siebel engineers use specialized business services. Do not use specialized business services unless the behavior is specifically documented.Properties or scripts (in Siebel Visual Basic or Siebel eScript) can configure business services.
Workflows, scripts, or runtime events can call business services.
Business services can be used for generic code libraries that other scripts call.
Business services are used as building blocks in the Siebel Application Integration framework.
Commands associated with a menu selection or toolbar button can refer to business services.
Business Service Methods for Advanced Contracts
This topic describes the following the business services (and associated methods) for Advanced Contracts:
Condition Evaluator Business Service
The Condition Evaluator business service is used in workflows to compare 2 values to determine whether a condition is met. This business service compares the current amount to the target amount using the specified operator and sets the compliance flag. This business service includes the Evaluate Condition method.
Evaluate Condition Method
Evaluate Condition determines whether a condition is met.
Arguments
The following table describes the arguments for this method.
Table Arguments for Evaluate Condition Method
Argument Name | Description |
---|---|
Current Amount |
The value used to evaluate whether the condition is met. |
Operator |
The operator used for the calculation. Values include =, >, <, <=, >=, BETWEEN (< and >), and BETWEEN (<= and >=). |
Target Amount |
The value to compare with the current amount. You can specify minimum and maximum bounds separated by a colon (Min:Max) for the BETWEEN operator to compare to the benefit amount, the condition amount, or the target amount. |
Return Value
The following table describes the return value for this method.
Table Return Value for Evaluate Condition Method
Return Value | Description |
---|---|
Compliance Flag |
A value that indicates whether the condition is met. |
Contracts Accumulator Business Service
The Contracts Accumulator business service is used in workflows to manage increasing or decreasing an allowance pool. This business service includes the Manage Running Total method.
The following figure shows the process flow for the Contracts Accumulator business service.
![Process Flow for Contracts Accumulator Business Service](images/Accumulator_BusServ.png)
Manage Running Total Method
Manage Running Total increments or decrements the running total amount for a benefit.
Arguments
The following table describes the arguments for this method.
Table Arguments for Manage Running Total Method
Argument Name | Description |
---|---|
Count Method |
A value that indicates the type of counter. Values include Increment and Decrement. |
Current Amount |
The current value of the counter before the benefit amount is applied for the transaction. |
Valid Transaction Amount |
The amount of benefit to apply and reflect in the running total. The Contracts Resolver business service can calculate this amount. For more information, see Contracts Resolver Business Service. |
Return Value
The following table describes the return value for this method.
Table Return Value for Manage Running Total Method
Return Value | Description |
---|---|
Adjusted Current Amount |
The updated running total, adjusted by the Contracts Accumulator business service to reflect the amount of benefit applied (Valid Transaction Amount). |
Contracts Resolver Business Service
The Contracts Resolver business service is used in workflows to resolve issues associated with managing an allowance or pool when the amount to decrement is more than the remaining allowance or pool. This business service includes the Resolve Transaction Amount method.
The following figure shows the process flow for the Contracts Resolver business service.
![Process Flow for Contracts Resolver Business Service](images/Resolver_BusServ.png)
Resolve Transaction Amount Method
Resolve Transaction Amount determines the valid transaction amount and the remaining transaction amount for a benefit when the decrement amount is more than the remaining allowance or pool.
Arguments
The following table describes the arguments for this method.
Table Arguments for Resolve Transaction Amount Method
Argument Name | Description |
---|---|
Current Amount |
The current value of the counter before the benefit amount is applied for the transaction. |
Requested Transaction Amount |
The amount of the transaction to consider for the benefit. A user-defined business service or workflow can calculate this value. For a benefit of 2% credit on all invoices, the actual dollar amount calculated by taking 2% of the total invoices is the Requested Transaction Amount. |
Amount |
The amount of the benefit or the threshold for the condition. For example, if you want to use the business service to manage a benefit, then you set this argument to equal the Benefit Amount field. If you want to use the business service to manage a condition, then you set this argument to equal the Condition Target Amount field. |
Count Method |
A value that indicates the type of counter. Values include Increment and Decrement. |
Return Values
The following table describes the return values for this method.
Table Return Values for Resolve Transaction Amount Method
Return Value | Description |
---|---|
Valid Transaction Amount |
The portion of the requested benefit (Requested Transaction Amount) to apply (Valid Transaction Amount). The Contracts Resolver business service determines this return value. |
Remaining Transaction Amount |
The portion of the requested benefit (Requested Transaction Amount) that cannot apply (Remaining Transaction Amount). The Contracts Resolver business service determines this return value. |
Exhausted Flag |
A value that indicates whether the amount of the benefit or the terms of the condition are exhausted. You can use this setting to update the status for either the benefit or the condition. |
Business Service Methods for Agreements
This topic describes the following business services (and the associated methods) for agreements:
Pricing procedures define pricing processing logic. The procedures are based on the Product Selection and Pricing (PSP) Engine. The advantage of using the PSP Engine is that pricing is fully configurable. When a user adds a product to an agreement line item or adds another asset, the PSP Engine determines the price of the selected product. For more information about the PSP Engine, see Siebel Order Management Guide. For more information about the procedures for pricing, see Siebel Pricing Administration Guide. For more information about invoicing and charging, see Business Service Methods for Charges.
FS Agreement Charge Business Service
The Field Service Agreement Charge business service is used to generate charges by using the charge plan for an agreement line item.
The FS - Generate Agreement Charge workflow and the FS - Generate All Agreement Charges workflow call this business service. Modularized charging and invoicing in Siebel Field Service allows administrators to extend the workflow, if necessary. For more information about how workflow processes use the business service methods, see FS - Generate Agreement Charge Workflow and FS - Generate All Agreement Charges Workflow.
This business service includes the following methods:
CalculateRCAdjustAmount Method
CalculateRCAdjustAmount calculates the recurring charge (RC) adjustment amount by using the values for the RC adjustment unit amount and the RC adjustment unit (for example, Per Day or Per Week).
Invoked From
This method is called by the FS - Generate Agreement Charge workflow. This workflow adjusts the RC amount.
GenerateAdjustmentCharge Method
GenerateAdjustmentCharge generates the adjustment charge for an agreement line item.
Invoked From
This method is called by the FS - Generate Adjustment Charge workflow.
GenerateNRCCharge Method
GenerateNRCCharge generates the nonrecurring charge (NRC) for an agreement line item.
Invoked From
This method is called by the FS - Generate NRC Charge workflow. The input date for this workflow is in the local time format. The workflow converts this format to Open Database Connectivity (ODBC) format (YY-MM-DD). After the NRC is generated, the workflow also updates the NRC last-charged date on the charge plan.
GenerateRCCharge Method
GenerateRCCharge generates the recurring charge (RC) for an agreement line item.
Invoked From
This method is called by the FS - Generate RC Charge workflow. The workflow retrieves and converts the asset readings to charge amounts. The input date for this workflow is in the local time format. The workflow converts this format to the ODBC format (YY-MM-DD). After the RC amount is generated, the workflow also updates the RC last-charged date on the charge plan.
GenerateUsageCharge Method
GenerateUsageCharge generates the usage charge for an agreement line item by using asset usage.
Invoked From
This method is called by the FS - Generate Usage Charge workflow. The workflow retrieves and converts the asset readings to charge amounts. The input date for this workflow is in the local time format. The workflow converts this format to ODBC format (YY-MM-DD). After the usage charge is generated, the workflow also updates the usage last-charged date on the charge plan.
FS Agreement Renewal Business Service
The Field Service Agreement Renewal business service is used to renew agreement line items. For more information about how workflow processes use the business service methods, see FS - Agreement Renewal Item Workflow and FS - Agreement Renewal All Workflow.
This business service includes the following methods:
RenewAgreement Method
RenewAgreement renews 1 agreement line item.
The date and agreement ID are passed as arguments to this method. The renewal agreement item ID of the newly created agreement is then passed back as the return value.
Invoked From
This method is called by the FS - Agreement Renewal Item workflow.
RenewAllAgreements Method
RenewAllAgreements renews all agreement line items with a renewal date greater than the date in the argument.
Invoked From
This method is called by the FS - Agreement Renewal All workflow.
FS Holiday API Service Business Service
The Field Service Holiday API Service business service is used to calculate the business time to accomplish a task, to calculate committed time by using a service calendar and exception calendar, or to indicate whether a day is a defined holiday and the schedule hours type for that day.
The business service includes the following methods:
GetElapsedBusinessTime Method
GetElapsedBusinessTime calculates the business time to accomplish a task. This method calculates the business time that elapses between 2 dates, according to a schedule that runs in a specific time zone.
This method is not used as part of any workflow process.
Arguments
The following table describes the arguments for this method.
Table Arguments for GetElapsedBusinessTime Method
Argument Name | Description |
---|---|
Calendar Id |
The ID of the schedule that is associated with the starting and ending time. |
Schedule Time Zone |
The time zone for the starting and ending time. |
Start Time |
The starting date and time of the task. This argument uses one of the following formats:
The first part of the format designates a date (month/date/year). For this part, the separator can be a slash (/) or a hyphen (-). The second part of the format designates a time (hour:minute:second). |
End Time |
The ending date and time of the task. This argument uses the same formats as the Start Time argument. |
Time Unit |
The unit of time (for example, hours or days). |
Return Value
The following table describes the return value for this method.
Table Return Value for GetElapsedBusinessTime Method
Return Value | Description |
---|---|
Business Time |
The number of hours or days to accomplish the task. |
IsHoliday Method
IsHolidy returns a Boolean value specifying whether a day is a defined holiday and returns the schedule hours type for that day. This method returns TRUE if the Working field is cleared for the holiday definition of that day, or FALSE if the Working field is selected. For more information about setting schedule hours, see Setting Hours of Availability. For more information about the Working field, see Setting Exception Hours.
This method is not used as part of any workflow process.
Arguments
The following table describes the arguments for this method.
Table Arguments for IsHoliday Method
Argument Name | Description |
---|---|
Calendar Id |
The ID of the schedule that is associated with the potential holiday. |
Date Time |
The date and time for the potential holiday. This argument uses one of the following formats:
The first part of the format designates a date (month/date/year). For this part, the separator can be a slash (/) or a hyphen (-). The second part of the format designates a time (hour:minute:second). |
Time Zone |
The time zone for the potential holiday. |
Return Values
The following table describes the return values for this method.
Table Return Values for IsHoliday Method
Return Value | Description |
---|---|
Is Holiday |
A value that indicates whether the day is a holiday. Values include:
|
Working Hours |
The type of schedule hours for the day (for example, normal, overtime, or extended overtime). |
ISS Copy Service Business Service
The ISS Copy Service business service is used in numerous features in Siebel Field Service, including the auto contract feature. Siebel Order Management copies data from a document type to another document type in the following example transactions:
Quote-to-Agreement
Opportunity-to-Quote
Order-to-Agreement
Agreement-to-Order
You define all mappings between objects in the Data Map Administration views of the Administration - Application screen of the run-time client. Using the Administration - Data views and the ISS Copy Service business service, you can create new mappings and update existing mappings. A mapping can support 1 or more business components from a business object (for example, quote, quote line item, and quote payments). For more information about the ISS Copy Service business service, see Siebel Order Management Infrastructure Guide.
Business Service Methods for Assets
This topic describes the following business services (and the associated methods) for assets:
FS Asset Swap Service Business Service
The Field Service Asset Swap Service business service is used to swap warranties or entitlements during an asset exchange. For more information, see Asset Swaps.
This business service includes the following methods:
SwapAssetEntitlements Method
SwapAssetEntitlements swaps asset entitlements. Service activities often include replacing an asset with another asset. When you swap 2 assets, you can individually transfer the entitlements of the removed asset to the installed asset.
For agreements that include entitlements for the removed asset, asset values for the entitlements on the Service Agreement Product business component are updated with the number of the installed asset, replacing the asset number of the removed asset. When this business component is updated, the Asset number (#) field in the Products view in the Entitlements view in the List view of the Agreements screen changes to display the new installed asset.
Asset swaps also transfer any hierarchical relationships from the removed asset to the installed asset. However, if a removed asset is a child asset, then the parent of the removed asset becomes the parent of the installed asset, but the removed asset keeps any of its child assets.
Invoked From
This method is called when a record in the FS Activity Part Movements List Applet (in the Part Tracker view of the Activities screen) includes the following information:
A serialized asset.
A valid Swap Part Mvmt number (#) value.
A check in the Commit check box. You can select this check box by clicking the Commit button.
This method can also be called from Siebel eScript.
SwapAssetWarranties Method
SwapAssetWarranties swaps asset warranties. Service activities often include replacing an asset with another asset. When you swap 2 assets, you can individually transfer the warranties of the removed asset to the installed asset.
Invoked From
This method is called when a record in the FS Activity Part Movements List Applet (in the Part Tracker view of the Activities screen) includes the following information:
A serialized asset.
A valid Swap Part Mvmt number (#) value.
A check in the Commit check box. You can select this check box by clicking the Commit button.
This method can also be called from Siebel eScript.
FS Asset Warranty Service Business Service
The Field Service Asset Warranty Service business service is used to retrieve, check, and create services for asset warranties.
This business service includes the following methods:
CheckAssetWarranty Method
CheckAssetWarranty examines all the warranties for an asset and checks whether any warranties are applicable according to the Warranty Criteria business service user property.
If a warranty is not associated with an asset, then the warranty check automatically examines the parent and root assets to determine whether an applicable component warranty covers the asset. By default, a warranty check is made for the asset, and a component warranty check is made for the asset subcomponents. The component warranty check determines whether the subcomponent can be disabled by setting the value for the Sub Component Check business service user property to N.
You can change the criteria for selecting applicable warranties by changing the parameters in the Warranty Criteria business service user property.
Invoked From
This method is called when the user selects the Check Warranty command (in the menu in the Service Details view in the Service Request List view of the Service screen or in the More Info view of the Repairs screen) to verify the warranty coverage on a specified date when creating a service request or when creating a repair number for repairing an asset.
CreateAssetWarranty Method
CreateAssetWarranty adds the input warranty to the source asset. The number of days remaining on the warranty is automatically tracked.
Invoked From
This method is called when a user clicks the Get Warranties button (in the Warranty view in the List view of the Assets screen) to verify the applicable warranties for an asset.
GetAssetWarranties Method
GetAssetWarranties retrieves all the warranties for the product for an asset and then adds the warranties to the asset, if necessary. The number of days remaining on the warranty is automatically tracked.
Invoked From
This method is called when a user clicks the Get Warranties button (in the Warranty view in the List view in the Assets screen) to verify the applicable warranties for an asset.
Business Service Methods for Charges
This topic describes the following business services (and the associated methods) for charges:
The Invoice Engine is extensively rewritten for version 7.7 of Siebel Field Service to make charging and invoicing for service requests and activities more modularized. The Charge module manages charges associated with agreements, service requests, and activities. To support the use of the Charge Engine, all the business services previously used to generate invoice line items generate charges instead. A flexible framework is also implemented to allow administrators to configure invoicing to meet the company business requirements by creating business services and connecting the business services to the framework.
FS Generate Conditional Charge Process Business Service
The FS Generate Conditional Charge Process business service is used to create conditional charges for agreements. For more information, see Setting Up Conditional Charge Plans and FS - Generate Conditional Charge Process Workflow.
This business service includes the following methods:
GenerateCharge Method
GenerateCharge uses the conditional charge to adjust the charge.
Invoked From
This method is called by the FS - Generate Conditional Charge Process workflow.
GetCondCharge Method
GetCondCharge gets the conditional charge for an agreement.
Invoked From
This method is called by the FS - Generate Conditional Charge Process workflow.
FS Service Charge Business Service
The FS Service Charge business service is used to create charges and control invoicing for service requests and activities. To support mobile devices, C ++ code on the applet class directly calls this business service. A workflow does not call this business service.
This business service includes the following methods:
Process Flow for Invoicing Service Requests or Activities
The following figure shows the process flow for invoicing service requests or activities.
![Process Flow for Invoicing Service Requests or Activities](images/ChargeMethods_V.gif)
If you want to create your own process flow, then review the process flow in the previous figure. This figure shows the flow of control for the methods that are available in this business service. This figure also shows that the user properties on the business component control the CreateCharge method. These user properties pass information to the user interface about the business services and methods to call.
The following table lists the user properties that you must edit to change the process flow for the service charges. You can add or remove each individual item in the process flow using these user properties.
Table Business Components and User Properties for FS Service Charge
Business Component | User Property | Value |
---|---|---|
Service Request |
ChargeExecuteBusinessComponent1 |
Action |
Service Request |
ChargeExecuteBusinessComponent2 |
Order Entry - Orders |
Action |
ChargeExecuteBusinessComponent1 |
Time Sheet Daily Hours |
Action |
ChargeExecuteBusinessComponent2 |
FS Expense Item |
Action |
ChargeExecuteBusinessComponent3 |
FS Activity Part Movement |
Action |
ChargeBusinessService |
Invoice Charges Business Service |
Action |
ChargeBusinessServiceMethod1 |
CreateServiceCharges |
Order Entry - Orders |
ChargeBusinessServiceMethod1 |
CreateOrderCharges |
FS Activity Parts Movement |
ChargeBusinessService |
Invoice Charges Business Service |
FS Activity Parts Movement |
ChargeBusinessServiceMethod1 |
CreatePartsCharge |
FS Activity Parts Movement |
ChargeBusinessServiceMethod2 |
CreatePartsEntitlementCharge |
FS Expense Item |
ChargeBusinessService |
Invoice Charges Business Service |
FS Expense Item |
ChargeBusinessServiceMethod1 |
CreateExpenseCharge |
FS Expense Item |
ChargeBusinessServiceMethod2 |
CreateExpenseEntitlement Charge |
Time Sheet Daily Hours |
ChargeBusinessService |
Invoice Charges Business Service |
Time Sheet Daily Hours |
ChargeBusinessServiceMethod1 |
CreateTimeCharge |
Time Sheet Daily Hours |
ChargeBusinessServiceMethod2 |
CreateTimeEntitlementCharge |
CreateExpenseCharge Method
CreateExpenseCharge creates the base charge for an activity expense.
If you do not want to charge expenses, then remove the ChargeBusinessServiceMethod1 user property from the FS Expense Item business component. For more information, see Process Flow for Invoicing Service Requests or Activities.
This method is not used as part of any workflow process.
Invoked From
This method is called by the C ++ class for the Auto Charge button (in the Charges view in the Activity List view of the Activities screen).
CreateExpenseEntitlementCharge Method
CreateExpenseEntitlementCharge creates the entitlement adjustment charge for an activity expense.
If you do not want to charge expense adjustment, then remove the ChargeBusinessServiceMethod2 user property from the FS Expense Item business component. For more information, see Process Flow for Invoicing Service Requests or Activities.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreateOrderCharges Method
CreateOrderCharges creates charges for all line items in an order.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreatePartsCharge Method
CreatePartsCharge creates the base charge for an activity part movement. This method creates the charges for the parts used in an activity.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreatePartsEntitlementCharge Method
CreatePartsEntitlementCharge creates the entitlement adjustment charge for an activity part movement. This method adjusts the costs of the parts by using the associated entitlement.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreateServiceCharges Method
CreateServiceCharges creates service charges or entitlement adjustment charges for parts, expenses, and time. This method aggregates all the charges for parts, expenses, and time.
If you do not want to charge expense adjustment, then remove the ChargeBusinessServiceMethod1 user property from the Action business component. For more information, see Process Flow for Invoicing Service Requests or Activities.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreateTimeCharge Method
CreateTimeCharge creates charges by using reported time. This method creates the time charges for an activity by using the hourly rate of the activity owner.
If you do not want to charge expense adjustment, then remove the ChargeBusinessServiceMethod1 user property from the Time Sheet Daily Hours Item business component. For more information, see Process Flow for Invoicing Service Requests or Activities.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
CreateTimeEntitlementCharge Method
CreateTimeEntitlementCharge creates time entitlement adjustments. This method adjusts the cost of the hourly resource by using the entitlement associated with an activity.
If you do not want to charge time adjustment, then remove the ChargeBusinessServiceMethod2 user property from the Time Sheet Daily Hours Item business component. For more information, see Process Flow for Invoicing Service Requests or Activities.
This method is not used as part of any workflow process.
Invoked From
This method is called directly from the FS Charge List Applet - Auto Charge (in the Charges view in the Activity List view of the Activities screen). The business service is called directly from the applet class.
Business Service Methods for Cycle Counting
This topic describes the FS Cycle Counting business service (and the associated method) for cycle counting.
FS Cycle Counting Business Service
The Field Service Cycle Counting business service is used to generate cycle counts for inventories. This business service includes the GenerateCounts method. For more information about the Cycle Counting Engine, see About Cycle Counting.
GenerateCounts Method
GenerateCounts generates a part list for counting by using product classification data (for example, ABC or XYZ).
The mode, start date, and end date are passed as arguments to this method. The mode value (SQL, ID, TempTbl) determines the other needed arguments (ClientID, RowID, and Where). The Loc/Type values indicate the values for the other arguments. For example, if the Loc/Type value is Loc, then the RowID is an inventory location.
The input parameters are called when invoking from code or from a component job.
By default, the Cycle Counting Engine is run as a server component and not as a business service.
Business Service Methods for the Dispatch Board
This topic describes the following business services (and the associated methods) for the Dispatch Board:
FS Activity Cache Business Service
The Field Service Activity Cache Service business service is used to clear or refresh cached activity data from the Dispatch Board. This business service includes the CleanUpCacheTable method.
CleanUpCacheTable Method
CleanUpCacheTable clears the activity data cache table that the Dispatch Board uses. The activity data in the cache table is duplicate data that is created during a user session.
Invoked From
This method can be manually called using the business service simulator or automatically called using a repeating component job.
FS Dispatch Board Utils Business Service
The Field Service Dispatch Board Utils business service is used to implement the functions of the Dispatch Board.
This business service includes the following methods:
AssetAssignActivity Method
AssetAssignActivity assigns an activity in the Asset Dispatch Board. You can configure this method, and use it to enable drag-and-drop (or relocate) events for business components configured to appear along the y-axis of the Asset Dispatch Board.
In the Asset DB Planned GanttChart AX Applet, the business components shown vertically along the side are the Y business components (the y-axis). The X business component is the object to schedule (the x-axis). The scheduled object is normally an activity. This method updates the asset ID for the X business component as defined in the Drag and Drop Update Field business service user property.
For example, Asset Mgmt - Asset in the Asset Dispatch Board is the Y business component, and Action is the X business component. When a user selects and then moves an action to the Asset Dispatch Board to assign an asset, this method inserts the object ID of the Asset Mgmt - Asset business component into the Asset Id field for the Action business component.
If a new Dispatch Board has accounts on the y-axis, then Account is the Y business component. You can change the user property on this method to update the account ID. In this case, this method inserts the object ID for the account into the Account Id field for the Action business component.
If pre- or post-processing must occur on the drag-and-drop (or relocate) business event to support a specific business process, then you can access the arguments for this method from custom code.
Invoked From
This method is called by the Asset DB Planned GanttChart AX Applet when a user drops an activity to the Asset Dispatch Board.
AssetUnassignActivity Method
AssetUnassignActivity reverses the assignment of an activity in the Asset Dispatch Board. This method sets the Status field for an activity to Unscheduled and clears the Asset Id field as defined in the Drag and Drop Update Field business service user property.
If pre- or post-processing must occur on the drag-and-drop (or relocate) business event to support a specific business process, then you can access the arguments for this method from custom code.
Invoked From
This method is called by the FS Asset DB Unplanned Activity List Ax Applet when a user selects and moves an activity off the FS Asset DB Planned GanttChart AX Applet and puts the activity in the lower applet of the Asset Dispatch Board. The Drag Drop Business Service applet user property affects this method call.
AssignActivity Method
AssignActivity assigns an activity in the Dispatch Board. This method leverages the caching mechanism implemented on the Dispatch Board to maximize user performance.
This method applies to the CSSSWEFrameGanttDBActX class used for dispatching employees. This method performs the specialized ownership changes to update the primary owner for the Action business component and to subsequently update the performance cache for the Dispatch Board. This method removes any previous primary owner, sets the new primary owner to the employee on the Y business component (on the Dispatch Board y-axis), and sets the Status field to Scheduled.
If pre-or post-processing must occur on the drag-and-drop (or relocate) business event to support a specific business process, then you can access the arguments for this method from custom code.
Invoked From
This method is called by the applet for the Gantt chart for the Dispatch Board when a user drops an activity to the Gantt chart of the Dispatch Board. The Drag Drop Business Service applet user property affects this method call.
CalculateFromToAddresses Method
CalculateFromToAddresses determines the location of the activity and the location of each of the employees, and forwards the results to CalculateDistanceVals. CalculateFromToAddresses is the first method that GetCalculatedDistanceVals calls. For more information, see GetCalculatedDistanceVals Method.
The default method behavior identifies the location of an activity as the personal address for the activity. If the location is not available, then this method checks the business address for the activity. This method then retrieves the activity previous to the activity to schedule. If no previous activity exists in the schedule for the engineer, then this method sets the value for the From Address to the address in the employee profile for the engineer. The originating address for the engineer is set using the Start Shift Location Field Name business service user property. By default, this value is the Start Home Address ID for the engineer. The Start Home Address section in the Service Details view in the Employees view of the Administration - User screen designates this value.
This method searches the addresses of each activity, in accordance with the order that the From Address Id Props and To Address Id Props business service user properties indicate. Each of these properties specifies the business component ID and address type of the address to check. If the address type is TRUE, then the address is a personal address. If the address type is FALSE, then the address is a business address.
If the business address business component is not the same as the default, then you can set this business component by adding a Business Address CUT business service user property. Then you can specify the business address business component in this new user property. The originating address of the field service engineer is determined by the Start Shift Location Field Name business service user property. The default value for this user property is Start Home Address ID.
CalculateDistanceVals Method
CalculateDistanceVals calculates the distance between the new activity location and the employee location, and produces a list of employee ID and distance value pairs. CalculateDistanceVals is the second method that GetCalculatedDistanceVals calls. For more information, see GetCalculatedDistanceVals Method.
This method checks the City, State, and Postal Code fields of an address for matching entries in the ZIP Code business component. You can view the master list of geocodes in the ZIP Code Administration view of the Administration - Data screen. All 3 fields (City, State, and Postal Code) must match exactly to return the latitude and longitude location values used in the distance calculation. This calculation determines the straight line distance between the 2 ZIP Codes using the latitude and longitude coordinates for the 2 ZIP Codes.
This method returns a distance of -1 to alert users when there is no valid result from the data provided. Typically, invalid results occur because of a missing address or unmapped ZIP Code.
GetCalculatedDistanceVals Method
GetCalculatedDistanceVals calculates the distance between the selected activity location and the employee location, and produces a list of employee ID and distance value pairs. This method calls the CalculateFromToAddress method and subsequently, the CalculateDistanceVals method.
This method performs the following tasks:
Determines the location and starting time of the new activity.
Determines the location of the employee by completing the following steps:
Identifies the employee activity with an end time that is closest to the start time of the new activity.
Identifies the location of this employee activity.
If no such activities are found, then selects the employee default location. The Start Shift Location Field Name business service user property defines the address ID.
Calculates the linear distance between the 2 locations using the addresses of the unscheduled activity and the employee location.
This method returns a distance of -1 to alert users when there is no valid result from the data provided. Typically, invalid results occur because of a missing address or unmapped ZIP Code.
Invoked From
This method is called by the applet for the Gantt chart of the Dispatch Board.
GetEmployeeScores Method
GetEmployeeScores returns the appropriate scores for an employee. The Assignment Manager server component defines these scores. This method reviews the mappings in the Server Key Mappings view of the Administration - Scheduling screen to determine the appropriate Siebel Server to call for a service region.
Invoked From
This method is called when a user clicks the Assignment Score button in the Dispatch Board.
GetWirelessCoverage Method
GetWirelessCoverage checks whether an employee has a wireless device that is in coverage. This method checks whether the wireless device is on the network, and returns Y if the device is on the network or N if the device is not on the network.
This method uses the Wireless Coverage Timeout business service user property. This user property determines how many seconds the business service waits for a response.
Invoked From
This method is called when a user clicks the Wireless Coverage button in the Dispatch Board.
UnassignActivity Method
UnassignActivity reverses the assignment of an activity in the Dispatch Board and sets the Status field for the activity to Unscheduled.
If pre- or post-processing must occur on the drag-and-drop (or relocate) business event to support a specific business process, then you can access the arguments for this method from custom code.
Invoked From
This method is called by the FS DB Unplanned Activity List Ax Applet when a user selects and moves an activity off the applet for the Gantt chart and puts the activity in the lower applet of the Dispatch Board. The Drag Drop Business Service applet user property affects this method call.
FS Service Region Business Service
The FS Service Region business service is used to retrieve the service regions for activities. This business service includes the GetServiceRegionId method.
GetServiceRegionId Method
GetServiceRegionId retrieves the service region ID by using a postal code (ZIP Code). This method determines the service region for the postal code in an address, and sets the service region in the Service Request and Activity business components.
Invoked From
This method is called when a user adds an address for a contact or an account to an activity or service request.
Business Service Methods for Entitlements
This topic describes the following business services (and the associated methods) for entitlements:
FS Create Entitlement Business Service
The Field Service Create Entitlement business service is used in the process of entitlement creation. For more information about how workflow processes use the business service methods, see FS - Create Entitlement Workflow.
This business service includes the following methods:
Process Flow for Creating Entitlements
Users click the Auto Entitlement button to automatically associate an entitlement with a quote or order. For more information, see Configuring Auto-Entitlement for Quotes and Orders.
The FS Create Entitlement business service completes the following steps when the user clicks the Auto Entitlement button and the FS - Create Entitlement workflow process begins:
Checks whether the agreement is valid.
Retrieves the appropriate business components.
Retrieves the details for each agreement line item.
If the agreement Product ID is not empty, then retrieves the entitlement templates applicable to the agreement line item product by setting the Product ID on the product entitlement template.
For each of the product entitlement templates, completes the following steps:
Checks to make sure the current template was not already used in generating entitlements for the agreement.
Creates a new entitlement from the template.
Copies over the entitlement service metrics, preventive maintenance, pricing, and service details.
If the Include Account check box is selected on the entitlement template, then copies over the account information from the agreement, and uses the settings from the template.
If the Include Contact check box is selected on the entitlement template, then copies over the contact information from agreement, and uses the settings from the template.
If the Account All Contacts check box is selected on the entitlement template, then copies over all the contacts from the account.
If the Account All Products check box is selected on the entitlement template, then copies over all the products from the account, and adds the products to the entitlement with the corresponding asset number.
If the Contact All Products check box is selected on the entitlement template, then copies over all the products, including asset IDs, associated with the contact.
CreateCoveredProds Method
CreateCoveredProds retrieves a list of the service products that an entitlement template covers.
Invoked From
This method is called by the FS – Create Entitlement workflow.
CreateEntitlements Method
CreateEntitlements uses the entitlement template to create an entitlement.
Invoked From
This method is called by the FS - Create Entitlement workflow when a user clicks the Auto Entitlement button. For more information, see Configuring Auto-Entitlement for Quotes and Orders.
GetEntitlementTemplates Method
GetEntitlementTemplates retrieves a list of the entitlement templates associated with a specific service product.
Invoked From
This method is called by the FS - Create Entitlement workflow when a user clicks the Auto Entitlement button.
ValidateEntitlementTemplates Method
ValidateEntitlementTemplates checks the list of the entitlement templates associated with a specific service product against an agreement line item to make sure the current template was not already used to generate entitlements for the agreement. This method checks each of the entitlement templates that the GetEntitlementTemplates method retrieves.
Invoked From
This method is called by the FS - Create Entitlement workflow when a user clicks the Auto Entitlement button.
FS Verify Entitlement Business Service
The Field Service Verify Entitlement business service is used to verify entitlements. For more information about how workflow processes use the business service methods, see Workflows for Entitlement Creation and Verification.
This business service includes the following methods:
GenerateList Method
GenerateList is a utility method that loops through the workflow. This method queries for data by using search specifications and returns a property set according to field list values. Subsequent steps in the workflow can loop through each record in the property set using the GetNextItem method. Other methods, such as VerifyPricingEntitlement, VerifyServiceEntitlement, and GetBestPricedEntitlement, can then use the resulting data.
Invoked From
This method is called by the FS - All Charge Consolidation workflow. For more information, see FS - All Charge Consolidation Workflow.
Usage
The GenerateList step of the FS - Verify Entitlement Order Best Price workflow uses the GenerateList method with the following parameters:
Business Component of Order Entry - Line Items
Business Object of Order Entry
Field List of “Id”, “Product Id”, “Adjusted Price”
Search Spec of “[Order Header Id]=‘“+[&Object Id]+’””
The GenerateList step of the FS - Verify Entitlement Sales Order Best Price workflow uses the GenerateList method with the following parameters:
Business Component of Order Entry - Line Items
Business Object of Order Entry (Sales)
Field List of “Id”, “Product Id”, “Adjusted Price”
Search Spec of “[Order Header Id]=‘“+[&Object Id]+’””
The GenerateQuoteLineProductList step of the FS - Verify Entitlement Quote Best Price workflow uses the GenerateList method with the following parameters:
Business Component of Quote Item
Business Object of Quote
Field List of “Id”, “Product Id”, “Adjusted List Price”
Search Spec of “[Quote Id]=‘“+[&Object Id]+’””
The GetPrimaryAccountForLogin List step of the PMP Account Creation - Default workflow uses the GenerateList method with the following parameters:
Business Component of Global Account
Business Object of Global Account Hierarchy
Field List of “Account Id”
Search Spec of “[Primary Employee Login]=‘“+LoginName()+’” AND [Parent Account Id] IS NULL”
GetBestPricedEntitlement Method
GetBestPricedEntitlement uses entitlement discounts to retrieve the best-priced entitlement. The Price Details view in the Entitlements view of the Agreements screen shows entitlement discounts. This method automates the process of verifying entitlements by cycling through all the entitlements for order or quote line items and identifying the best-priced entitlement for each line item. This method then enters the ID of the best-priced entitlement on each line item.
You can implement this method by including it in a configured pricing procedure. This procedure can then consistently include agreement discounts without explicitly requiring the user to call this method from the line item by clicking a button.
Invoked From
This method is called by the FS - Verify Entitlement Order Best Price and FS - Verify Entitlement Quote Best Price workflows.
GetBestResponseTime Method
GetBestResponseTime gets the entitlement with best response time for a service request. This method selects the entitlement with the best response time metric that matches the service request priority. You define entitlement response times in the Metrics view of the Entitlements screen. This method then calculates the commit time according to the service calendar, and sets the Date Committed field and Entitlement field for the service request.
Invoked From
This method is called by the FS - Verify Entitlement SR Best Response Time workflow. This workflow is called when a user clicks the Verify Best Time button on the service request detail applet (in the service request form in the Service Request List view of the Service screen).
You can extend this workflow to generate a series of dates used for an escalation path that metrics on the agreement or a default set of values define. For example, the commit time for the first callback is 4 hours, the onsite date for the field service engineer is within 8 working hours, and the resolution is required within 3 days. Each of these metrics can be an independent metric that this method calculates and saves to the service request.
GetNextItem Method
GetNextItem is a utility method that loops through the workflow. This method cycles through the list of entitlements, and then adjusts the prices of the products according to the best-priced entitlement.
Invoked From
This method is called by the FS - Verify Entitlement Order Best Price and FS - Verify Entitlement Quote Best Price workflows.
For an example of how to call this method, review the FS - All Charge Consolidation workflow process. For more information, see FS - All Charge Consolidation Workflow.
GetPrice Method
GetPrice retrieves the price for a product by using the entitlement discounts. You can use this method in the Quotes screen and Order screen to get the price of a product after it is adjusted for the entitlement.
The product ID, base price, and entitlement ID are passed as arguments to this method. The new price is then passed back as the return value.
GetResponseTime Method
GetResponseTime uses the entitlement and priority to retrieve the response time. This method selects the response time metric that matches the service request priority for the selected entitlement. This method then calculates the commit time according to the service calendar, and sets the Date Committed and Entitlement fields for the service request.
Invoked From
This method is called by the FS - Verify Entitlement SR workflow. This workflow is called when a user clicks the Verify button on the service request detail applet (in the service request form in the Service Request List view of the Service screen).
The workflow can also be automatically called by using the priority of the service request for service-level agreements for which the committed date and time is often linked to the priority of the service request.
This method can also be called from the FS Holiday API Service business service to calculate the commit time according to a service calendar and an exception calendar.
Arguments
The following table describes the arguments for this method.
Table Arguments for GetResponseTime Method
Argument Name | Description |
---|---|
ServiceCalendarId |
The ID of the schedule that is associated with the service calendar. |
Start Time |
The starting date and time of the response to a service request. This argument uses one of the following formats:
The first part of the format designates a date (month/date/year). For this part, the separator can be a slash (/) or a hyphen (-). The second part of the format designates a time (hour:minute:second). |
Response Time |
The time in seconds, hours, or days to respond to a service request. |
Priority |
The priority of the service request. |
Time Unit |
The unit of time (for example, seconds, hours, or days). |
Time Zone |
The time zone that is passed from the GetTimeZone method. |
Return Value
The following table describes the return value for this method.
Table Return Value for GetResponseTime Method
Return Value | Description |
---|---|
Committed Time |
The latest date and time that a customer service representative must respond to the service request. |
GetTimeZone Method
GetTimeZone retrieves the time zone to use for the response time calculation.
The time zone for the entitlement, contact, service request owner, application default are passed as arguments to this method. This method selects the entitlement time zone first. If that time zone is unavailable, then this method selects the contact time zone. If that time zone is unavailable, then this method selects the time zone for the service request owner. If that time zone is unavailable, then this method selects the application default time zone.
The retrieved time zone is passed to the GetResponseTime method to calculate the response time.
You can overwrite this method to handle other business scenarios.
ShowEntitlementPickList Method
ShowEntitlementPickList displays a list of entitlements from the search specification. This method shows in the user interface a list of all of the applicable entitlements according to the search specification. The VerifyServiceEntitlement method passes the search specification to this method.
UpdateEntitlementCounter Method
UpdateEntitlementCounter updates the counters on an entitlement. This method is not used in the preconfigured Siebel Field Service application, but you can use this method. You use this method to increase or decrease the counter on an entitlement. You can also use this method when you sell support for each unit or when you sell support for multiunit pacts, and you want to monitor usage of those units.
The entitlement ID and a number are passed as arguments to this method. The Current Quota field of the Agreement Entitlement business component is then decreased by the value of the number.
VerifyPricingEntitlement Method
VerifyPricingEntitlement returns a list of eligible pricing entitlements.
The account, contact, and product are passed as arguments to this method. A suitable search specification is then passed back as the return value. You can then provide this search specification to the ShowEntitlementPickList method to show all relevant entitlements.
VerifyServiceEntitlement Method
VerifyServiceEntitlement returns a list of eligible service entitlements.
The account, contact, asset, and product are passed as arguments to this method. A suitable search specification is then passed back as the return value. You can then provide this search specification to the ShowEntitlementPickList method to show all relevant entitlements.
Business Service Methods for Fulfillment
This topic describes the following business services (and the associated methods) for fulfillment:
FS Fulfillment Service Business Service
The Field Service Fulfillment Service business service is used to perform order fulfillment tasks. For more information about the Fulfillment Engine, see About the Fulfillment Engine.
This business service includes the following methods:
Fulfill Method
The Fulfill method fulfills an order line item, order, or a group of orders.
By default, the Fulfillment Engine is used as a server component and not as a business service.
Invoked From
This method is called with a user selects the Fulfill command (in the menu in the List view of the Service Orders screen) to find the products in the order line items, allocate the products in those line items, and generate pick tickets for the products.
Usage
You can use this method in the following ways:
Call the Fulfillment Engine in the standard manner to analyze orders, allocate products for each order line item, and automatically generate pick tickets. When fulfilling the inventory, the Fulfillment Engine considers the inventory relationships in the Relationships view of the Inventory screen. For more information about the input parameters for the standard manner of usage, see Parameters for the Fulfillment and Part Locator Engines.
Explicitly specify the order that the Fulfillment Engine evaluates the inventory locations for fulfillment.
Individual inventories cannot be related to other inventories in the list. The inventories are sorted by the score. You can use inventory scoring for geocode-based fulfillment so that orders are fulfilled from the nearest warehouse. The following table describes the additional arguments for this manner of usage.
Table Arguments for Fulfill Method: Explicitly Specifying Inventory Location Order
Argument Name | Description |
---|---|
InvLocIds |
The inventory location IDs. This argument is a property set that includes the inventory IDs and the associated scores. The property set is sorted by score. |
Fulfill List Mode |
The method of sequencing the inventory location IDs. Values include ASCENDING and DESCENDING. |
The following example code includes these arguments:
Fulfill List Mode = ASCENDING {""XX-ABCD"", 10 ""YY-PQRS"", 34 …. } Type = InvLocIds
GenPickTickets Method
GenPickTickets produces a pick ticket record.
The order ID is passed as an argument to this method.
Invoked From
This method is called when a user selects the Generate PickTickets command (in the menu in the Service Order form in the List view of the Service Orders screen).
FS Part Locator Service Business Service
The Field Service Part Locator Service business service is used to locate products for fulfillment. This business service includes the Locate method. For more information about the Part Locator Engine, see Part Locator Engine.
Locate Method
Locate finds (in the inventory hierarchy) the product in an order line item and finds substitutes if the product is unavailable. This method is similar to the Fulfillment method except that it does not allocate or generate pick tickets.
By default, the Part Locator Engine is run as a server component and not as a business service.
Invoked From
This method is called when a user clicks the Locate button (in the Part Locator view in the Line Items view of the Service Orders screen).
Business Service Methods for Inventories
This topic describes the Field Service Inventory Transaction business service (and the associated methods) for inventories.
FS Inventory Transaction Business Service
The Field Service Inventory Transaction business service is used to transfer 1 or more assets at a time. The Bulk Inventory Transaction - Asset List - Default workflow and Inventory Transaction - Asset List - Default workflow use this business service. For more information about these workflow processes, see Performing Bulk Inventory Transactions (End User).
This business service includes the following methods:
AddAssetsToTxn Method
AddAssetsToTxn adds assets to the inventory transaction record.
Invoked From
This method is called by the Inventory Transaction - Asset List - Default workflow.
AggrAssetsPerProdPerSource Method
AggrAssetsPerProdPerSource aggregates assets by using the properties that the Aggregate per Property 1...n string specifies. Each such aggregation forms 1 transaction. This method includes assets of the same product with the same source details in the same transaction.
Invoked From
This method is called by the Bulk Inventory Transaction - Asset List - Default workflow.
BulkTransfer Method
BulkTransfer loops and calls the next step to create each inventory transaction. During each iteration, a child is removed and passed to the next step to create the transaction. When the child count reaches zero (0), the loop stops.
Invoked From
This method is called by the Bulk Inventory Transaction - Asset List - Default workflow.
CommitTxn Method
CommitTxn commits the transaction.
Invoked From
This method is called by the Inventory Transaction - Asset List - Default workflow.
GetDetails Method
GetDetails queries the specified business component and retrieves the fields that start with Input: xxx. These fields are added to the property set as properties. This method loops for each line item and queries for the fields.
Invoked From
This method is called by the Bulk Inventory Transaction - Asset List - Default workflow.
SetTxnDetails Method
SetTxnDetails creates the inventory transaction record. This method can accept only the arguments that are fields on the Inventory Transaction business component or the fields that start with Default. This method generates the ID of the created transaction.
Invoked From
This method is called by the Inventory Transaction - Asset List - Default workflow.
SetTxnDetailsFromTxnSet Method
SetTxnDetailsFromTxnSet reads the transaction details from the Inventory Transaction Set property set and creates a transaction record. All fields that the Inv Txn Field specifies are populated on the transaction. This method internally calls the SetTxnDetails method.
Invoked From
This method is called by the Inventory Transaction - Asset List - Default workflow.
Business Service Methods for Invoices
This topic describes the FS Charge Consolidation business service (and the associated methods) for invoices.
FS Charge Consolidation Business Service
The Field Service Charge Consolidation business service is used to consolidate invoices. For more information about how workflow processes use the business service methods, see FS - Charge Consolidation Workflow.
This business service includes the following methods:
CancelInvoice Method
CancelInvoice cancels invoices so that the charge consolidation can run again. You can use this method to change the Status field of existing charge records for an agreement line item to Expired or Canceled. For more information, see Canceling Charges After Charge Consolidation Completion.
ConsolidateCharge Method
ConsolidateCharge consolidates the charges in the charge table by using a set of rules in the consolidation plans.
Invoked From
This method is called by the FS - Charge Consolidation workflow. This workflow is called when a user clicks the Execute Now button (in the Charge Consolidation Plans view of the Administration - Contracts screen).
Business Service Methods for Preventive Maintenance
This topic describes the FS Preventive Maintenance business service (and the associated method) for preventive maintenance.
FS Preventive Maintenance Business Service
The Field Service Preventive Maintenance business service is used to generate service requests and activities for asset maintenance. This business service includes the GeneratePM method. For more information about the Preventive Maintenance Engine, see About Preventive Maintenance.
GeneratePM Method
GeneratePM generates service requests and activities for asset maintenance by using predefined triggers.
The mode, end date, and sub-mode are passed as arguments to this method. Depending on the combination of the mode and sub-mode values, other arguments are needed. For example, if the value for the mode is SQL, and the value for the sub-mode is Assets&Plans, then the plan SQL and asset SQL arguments are needed.
The input parameters are called when invoking from code or from a component job. For more information about the parameters for this engine, see Parameters for the Preventive Maintenance Engine.
DefOrgID denotes the default organization for the created service requests and activities, and DefActOwnerId denotes the owner of the activities.
This method is not currently used.
Business Service Methods for Replenishment
This topic describes the FS Replenish business service (and the associated methods) for replenishment.
FS Replenish Business Service
The Field Service Replenish business service is used to replenish inventories. For more information about the Replenishment Engine, see About the Replenishment Engine.
This business service includes the following methods:
GenerateOrder Method
GenerateOrder selects source and target inventories when restocking is needed, and then generates the orders required to obtain materials from an external provider, an internal inventory site, or an internal manufacturing facility.
The input parameters are called when invoking from code or from a component job. For more information about the input parameters for this engine, see Parameters for the Replenishment Engine.
By default, the Replenishment Engine is run as a server component and not as a business service.
UnlockAllInventories Method
UnlockAllInventories unlocks all of the inventories. This method can unlock the inventories in error situations when the inventories are not unlocked during replenishment.
Methods for Schedules
This topic describes the methods for schedules. For information about the methods that the ABS and Optimizer support, see:
To load the ABS or Optimizer, use Siebel eScript or a workflow process. For more information, see About Calling the ABS and Optimizer Methods.
About Calling the ABS and Optimizer Methods
A script can call the Appointment Booking System and Optimizer (or Optimization Engine) by calling the predefined Server Requests business service and specifying the Appointment Booking Engine or Optimizer component. The methods must be loaded and exist on the server before they can be called. Only the Server Request Broker can determine the correct component to call for a service region. For more information about using the Server Requests business service, see Siebel Business Process Framework: Workflow Guide.
The following script is an example of how to call the ABS component with the GetAppointment method.
var SRMSvc, BSWrite, BSRead; var srmInputs, apptBookInputs, srmOutputs, tempPropSet; var childPropSet, activePropSet, apptPropSet; var errCode; // use Server Request to call the Appointment Booking Engine SRMSvc = TheApplication().GetService("Server Requests"); srmInputs = TheApplication().NewPropertySet(); apptBookInputs = TheApplication().NewPropertySet(); srmOutputs = TheApplication().NewPropertySet(); tempPropSet = TheApplication().NewPropertySet(); srmInputs.SetProperty("Mode", "Sync"); srmInputs.SetProperty("Method", "GetAppointment"); srmInputs.SetProperty("Component", "ApptBook"); apptBookInputs.SetProperty("ActId", "1-93J9"); apptBookInputs.SetProperty("SvcRegnId", "1-1BGD"); srmInputs.AddChild(apptBookInputs); SRMSvc.InvokeMethod("SubmitRequest", srmInputs, srmOutputs); // write out the outputs for debugging childPropSet = TheApplication().NewPropertySet(); activePropSet = TheApplication().NewPropertySet(); childPropSet = srmOutputs.GetChild(0); errCode = childPropSet.GetProperty("ErrCode"); if (errCode == "0") { var apptCount = childPropSet.GetChildCount(); apptPropSet = TheApplication().NewPropertySet(); for (var i = 0; i < apptCount; i++) { activePropSet = childPropSet.GetChild(i); apptPropSet.AddChild(activePropSet); } // write out the inputs for debugging apptPropSet.SetProperty("number of appointments", apptCount); apptPropSet.SetType("addedPropSet"); Outputs.AddChild(apptPropSet); } else { } activePropSet = null; tempPropSet = null; childPropSet = null; SRMSvc = null; BSWrite = null; BSRead = null; srmInputs = null; apptBookInputs = null; srmOutputs = null;
Methods for the ABS
The ABS is used for scheduling in Siebel Field Service. For more information about the ABS, see About the Appointment Booking System.
The ABS can use the following methods:
CancelAppointment Method
CancelAppointment cancels a scheduled appointment. This method sets the appointment status to Cancelled and removes the time values for the planned start and planned end. The time previously scheduled for the activity is then open and available for ABS booking.
Invoked From
This method is called when a user clicks the Cancel Appointment button (in the Activities view in the Service Request List view of the Service screen and in the Schedule view in the Activity List view of the Activities screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for Cancel Appointment Method
Argument Name | Description |
---|---|
ActId |
The activity ID of the activity to schedule. |
SvcRegnId |
The service region ID of the activity. |
CancelRequest Method
CancelRequest releases all of the time slots that the GetAppointment method previously reserved. The time slots are then available ABS booking of other requests.
Invoked From
This method is called when a user clicks the Cancel button in the Pick Appointment dialog box (Abs Result Pick Applet). This dialog box appears when a user clicks the Book Appointment button (in the Schedule view in the Activity List view of the Activities screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for Cancel Request Method
Argument Name | Description |
---|---|
ReqId |
The request ID returned by the ABS for the GetAppointment method. |
SvcRegnId |
The service region ID of the activity. |
There are no return values for this method.
ConfirmAppointment Method
ConfirmAppointment confirms the selected appointment (time slot) that the GetAppointment method reserves. The activity is assigned to the owner and starts during the selected time slot. This method also releases the other time slots that the GetAppointment method previously reserved.
The GetAppointment and GetAppointments methods generate a property set containing a list of time slots that are available for the activity. Each returned time slot contains properties. The time slot that these methods pass to the ConfirmAppointment method includes the Slot Start - SR Time Zone property. This property indicates the slot start time in the time zone of the service region for the activity.
Invoked From
This method is called when a user clicks the Book Appointment button (in the Schedule view in the Activity List view of the Activities screen), and selects a time slot from the Pick Appointment dialog box (Abs Result Pick Applet).
Arguments
The following table describes the arguments for this method.
Table Arguments for Confirm Appointment Method
Argument Name | Description |
---|---|
ReqId |
The request ID returned by the ABS for the GetAppointment method. |
SvcRegnId |
The service region ID of the activity. |
There are no return values for this method.
This method needs an additional input property request key for the Server Requests business service. For more information, see About Calling the ABS and Optimizer Methods.
The following example script defines this additional input:
var SRMSvc = TheApplication().GetService("Server Requests"); var srmInputs = TheApplication().NewPropertySet(); var apptBookInputs = TheApplication().NewPropertySet(); var srmOutputs = TheApplication().NewPropertySet(); srmInputs.SetProperty("Mode", "Sync"); srmInputs.SetProperty("Method", "ConfirmAppointment"); srmInputs.SetProperty("Component", "ApptBook"); srmInputs.SetProperty("ReqKey", Inputs.GetProperty("strSRId")); // Or the way the service region ID is determined apptBookInputs.SetProperty("ActId", Inputs.GetProperty("strActId")); apptBookInputs.SetProperty("SvcRegnId", Inputs.GetProperty("strSRId")); apptBookInputs.SetProperty("ReqId", Inputs.GetProperty("strReqId")); apptBookInputs.SetProperty("SlotStart", Inputs.GetProperty("strSlotStartTimeSRTimeZone")); srmInputs.AddChild(apptBookInputs); SRMSvc.InvokeMethod("SubmitRequest", srmInputs, srmOutputs);
DefragmentServiceRegion Method
DefragmentServiceRegion changes the service region employees calendar to remove gaps between scheduled appointments.
Invoked From
This method is called when a user clicks the Coalesce ABS button (in the Service Region List view of the Administration - Scheduling screen).
Argument
The following table describes the argument for this method.
Table Argument for DefragmentServiceRegion Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the activity. |
There are no return values for this method.
GetAppointment Method
GetAppointment reserves and returns a set of employee time slots in the service region for an activity. The ConfirmAppointment or CancelAppointment method follow this method. This method has a timeout function to release reserved time slots in the event that neither of these methods are called in a timely fashion.
Invoked From
This method is called when a user clicks the Book Appointment button (in the Activities view in the Service Request List view of the Service screen and in the Schedule view in the Activity List view of the Activities screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for Get Appointment Method
Argument Name | Description |
---|---|
ActId |
The activity ID of the activity to schedule. |
SvcRegnId |
The service region ID of the activity. |
Return Values
This method returns a property set containing a list of time slots that are available for the activity. The following table describes the return values that each returned time slot contains.
Table Return Values for GetAppointment Method
Return Value | Description |
---|---|
Request Id |
A unique ID to identify the request sent to the engine. |
Assignee |
The assignee available during the time slot. |
Slot Start - SR Time Zone |
The slot start time in the time zone of the service region for the activity. |
Slot End - SR Time Zone |
The slot end time in the time zone of the service region for the activity. |
Slot Start |
The slot start time. This return value is always in the GMT time zone, not the time zone for the login user. |
Slot End |
The slot end time. This return value is always in the GMT time zone, not the time zone for the login user. |
Service Region Id |
The service region ID of the activity. |
Activity Id |
The activity ID of the activity to schedule. |
GetAppointments Method
GetAppointments returns a time slot indicating when an employee can potentially be scheduled. This method reserves these time slots in memory until the ConfirmAppointment or CancelRequest method is called, or until the timeout elapses.
This method is similar to the GetAppointment method, but differs from the GetAppointment method in the following ways:
The actual activities to book do not yet exist, and are not created until the ConfirmAppointment method is called.
The GetAppointments method checks for several employees in the same request.
The GetAppointments method returns only 1 time slot for each employee instead of the number that the ABS - Default number of slots parameter defines. For more information, see Parameters for Schedules.
The GetAppointments method includes SameTimeFlag argument. Values include:
TRUE. All of the employees must be scheduled together for the same time. Time slots are returned for all or none of the specified employees.
FALSE. The employees can each be scheduled for different times between the earliest start time and latest start time. Time slots are returned only for those employees that can be scheduled.
Invoked From
This method is called by Assignment Manager.
Arguments
The following table describes the arguments for this method.
Table Arguments for Get Appointments Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the activity. |
ReqId |
A unique number to identify this request for a subsequent call to either confirm some of the time slots returned by this method or cancel the request and release those slots. |
EmployeeIds |
The IDs of all of the employees to schedule during this time. |
ActType |
The type of the activity (for example, call, appointment, administration, and so on). |
ActPriority |
The value from the Priority field of the activity (for example, 1-ASAP, 2-High, 3- Medium, or 4-Low). |
NoSoonerThan |
The value from the Earliest Start Time field of the activity. |
NoLaterThan |
The value from the Latest Start Time field of the activity. |
Duration |
The actual length of time that each employee is required. |
SameTimeFlag |
A flag that specifies whether all employees must be available at the same time or whether their appointments can be spread out at different times between the earliest and latest start time. Values include:
|
BreakFlag |
A flag that specifies whether the activity can be broken into different pieces or whether the activity must be contiguous. Values include:
|
Return Values
This method returns a property set containing a list of time slots that are available for the activity. The following table describes the return values that each returned time slot contains.
Table Return Values for GetAppointments Method
Return Value | Description |
---|---|
Request Id |
A unique ID to identify the request sent to the engine. |
Assignee |
The assignee available during the time slot. |
Slot Start - SR Time Zone |
The slot start time in the time zone of the service region for the activity. |
Slot End - SR Time Zone |
The slot end time in the time zone of the service region for the activity. |
Slot Start |
The slot start time. This return value is always in the GMT time zone, not the time zone for the login user. |
Slot End |
The slot end time. This return value is always in the GMT time zone, not the time zone for the login user. |
Service Region Id |
The service region ID of the activity. |
Activity Id |
The activity ID of the activity to schedule. |
GetConfirmedAppointment Method
GetConfirmedAppointment inserts an activity into the schedule without presenting time slot alternatives.
Invoked From
This method is called when a user clicks the Contract Schedule button (in the Schedule view in the Activity List view of the Activities screen). This method is also called when a user selects the Insert Activity command (in the menu in the Unscheduled Activities list of the Dispatch Board).
Arguments
The following table describes the arguments for this method.
Table Arguments for GetConfirmedAppointment Method
Argument Name | Description |
---|---|
ActId |
The activity ID of the activity to schedule. |
SvcRegnId |
The service region ID of the activity. |
Return Values
The following table describes the return values for this method.
Table Return Values for GetConfirmedAppointment Method
Return Value | Description |
---|---|
Assignee |
The employee assigned to the activity. |
StartDt |
The scheduled start time in the time zone of the service region for the activity. |
LoadActivities Method
LoadActivities loads activities into the ABS cache. When called, the ABS attempts to insert the activities into the employee schedules.
Invoked From
This method is called when a user clicks the Load button (in the Activities view in the Service Region List view of the Administration - Scheduling screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for LoadActivities Method
Argument Name | Description |
---|---|
ActIds |
The comma-separated activity IDs. |
SvcRegnId |
The service region ID of the activities to load. |
There are no return values for this method.
LoadEmployees Method
LoadEmployees reloads an employee into the ABS cache. This method applies to situations when users add a new employee to a service region, or when a schedule change applies to an employee already loaded into the ABS.
Invoked From
This method is called when a user clicks the Load ABS button (in the Employees view in the Service Region List view of the Administration - Scheduling screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for LoadEmployees Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the employees to load. |
EmployeeIds |
The comma-separated employee IDs. |
There are no return values for this method.
ReloadServiceRegion Method
ReloadServiceRegion loads or reloads service region data into the ABS cache and changes the ABS time horizon for a service region.
Invoked From
This method is called when a user clicks the Load ABS button (in the Service Region List view of the Administration - Scheduling screen). This method is called if the parameter sets change or the schedule changes for a service region. This method is typically called from a repeating component job that refreshes the time horizon for a service region.
Argument
The following table describes the argument for this method.
Table Argument for ReloadServiceRegion Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID to reload. |
There are no return values for this method.
UnloadEmployees Method
UnloadEmployees removes employees from the ABS cache.
Invoked From
This method is called when a user clicks the Unload ABS button (in the Employees view in the Service Region List view of the Administration - Scheduling screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for UnloadEmployees Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the employees to unload. |
EmployeeIds |
The comma-separated employee IDs. |
There are no return values for this method.
Methods for the Optimizer
The Optimizer (or Optimization Engine) in Oracle’s Siebel Field Service is used together with the ABS for scheduling. For more information, see About the Schedule Optimizer.
The Optimizer can use the following methods:
CancelAppointment Method
CancelAppointment cancels a scheduled appointment. This method sets the appointment status to Cancelled, removes the time values for the planned start and planned end, and removes the activity from the cache.
This method is the same as the CancelAppointment method for the Appointment Booking Service. For more information, see CancelAppointment Method.
Arguments
The following table describes the arguments for this method.
Table Arguments for CancelAppointment Method
Argument Name | Description |
---|---|
ActId |
The activity ID of the activity to cancel. |
SvcRegnId |
The service region ID of the activity. |
Return Values
The following table describes the return values for this method.
Table Return Values for CancelAppointment Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
GetConfirmedAppointment Method
GetConfirmedAppointment inserts the activity into the schedule without presenting time slot alternatives.
This method is the same as the GetConfirmedAppointment method for the Appointment Booking Service. For more information, see GetConfirmedAppointment Method.
Arguments
The following table describes the arguments for this method.
Table Arguments for GetConfirmedAppointment Method
Argument Name | Description |
---|---|
ActId |
The activity ID of the activity to schedule. |
SvcRegnId |
The service region ID of the activity. |
Return Values
The following table describes the return values for this method.
Table Return Values for GetConfirmedAppointment Method
Return Value | Description |
---|---|
Assignee |
The employee assigned to the activity. |
StartDT |
The scheduled start time in the time zone of the service region for the activity. |
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
ErrArgs |
The arguments for the error message associated with the returned error code. |
LoadActivities Method
LoadActivities loads activities into the Optimizer cache. The Optimizer then inserts the activities into an employee calendar if the Optimizer can schedule the activities. The activities already include a planned start and planned end.
This method is the same as the LoadActivities method for the Appointment Booking Service. For more information, see LoadActivities Method.
Arguments
The following table describes the arguments for this method.
Table Arguments for LoadActivities Method
Argument Name | Description |
---|---|
ActIds |
The comma-separated activity IDs. |
SvcRegnId |
The service region ID of the activities to load. |
Return Values
The following table describes the return values for this method.
Table Return Values for LoadActivities Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
LoadEmployees Method
LoadEmployees reloads an employee into the Optimizer cache. This method applies to situations when a user adds a new employee to a service region, or when a schedule change applies to an employee already loaded into the Optimizer.
Invoked From
This method is called when a user clicks the Load Optimizer button (in the Employees view in the Service Region List view of the Administration - Scheduling screen).
Optimize Method
Optimize starts the Optimizer for the requested service region.
Invoked From
This method is called when a user clicks the Optimize button (in the Service Region List view of the Administration - Scheduling screen).
Argument
The following table describes the argument for this method.
Table Argument for Optimize Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the activities to optimize. |
Return Values
The following table describes the return values for this method.
Table Return Values for Optimize Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
ReloadServiceRegion Method
ReloadServiceRegion reloads the service region data into the Optimizer cache.
Invoked From
This method is called when a user clicks the Load Optimizer button (in the Service Region List view of the Administration - Scheduling screen).
Argument
The following table describes the argument for this method.
Table Argument for ReloadServiceRegion Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the activities to reload. |
Return Values
The following table describes the return values for this method.
Table Return Values for ReloadServiceRegion Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
StopOptimize Method
StopOptimize stops optimization for the service region.
Invoked From
This method is called when a user selects the Stop Optimization command (in the menu in the Service Region list in the Service Region List view of the Administration - Scheduling screen).
Argument
The following table describes the argument for this method.
Table Argument for StopOptimize Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID for which to stop optimization. |
Return Values
The following table describes the return values for this method.
Table Return Values forStopOptimize Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
UnloadEmployees Method
UnloadEmployees updates the schedule for an employee by adding new exception hours to the cache. This method applies when employees are unavailable as a result of vehicle breakdown and so on. The activities scheduled during the exception hours for the employee are rescheduled or unscheduled. Activities are rescheduled for any open slots that meet the hard constraints. Employees must have at least 1 defined exception hour.
Invoked From
This method is called when a user clicks the Unavailable button (in the Employees view in the Service Region List of the Administration - Scheduling screen).
Arguments
The following table describes the arguments for this method.
Table Arguments for UnloadEmployees Method
Argument Name | Description |
---|---|
SvcRegnId |
The service region ID of the employees to unload. |
EmployeeIds |
The comma-separated employee IDs. However, the Optimizer processes only 1 employee ID at a time. If more than 1 employee ID is provided, then the Optimizer processes only the first employee ID. |
Return Values
The following table describes the return values for this method.
Table Return Values for UnloadEmployees Method
Return Value | Description |
---|---|
Message |
The Optimizer error tracing message that is returned if an error occurs. |
ErrorCode |
The error code returned from the Optimizer. A value of 0 indicates the operation is successful. |
Business Service Methods for Siebel Field Service Integration to Oracle Real-Time Scheduler
This topic describes the following business services (and the associated methods) for Siebel Field Service Integration to Oracle Real-Time Scheduler:
Advanced Scheduler Activity Skill Match Service Business Service
This business service includes the following methods:
GetActivitySkillData Method
GetActivitySkillData gets activity skills at run time by using the defined rules.
PersistActivitySkillData Method
PersistActivitySkillData gets activity skills at run time by using the defined rules, and causes them to persist for each activity.
Advanced Scheduler GeoCode Service Business Service
This business service includes the following methods:
BatchGeoCode Method
BatchGeoCode associates geocodes with all selected addresses in batch. This process is asynchronous.
GetRealTimeGeoCode Method
GetRealTimeGeoCode gets the geocode for the selected address in real time. This process is asynchronous. All matching geocodes are returned.
Advanced Scheduler Service Business Service
This business service includes the following methods:
CancelAppointment Method
CancelAppointment sends a request to cancel a previously booked appointment in Oracle Real-Time Scheduler.
ConfirmAppointment Method
ConfirmAppointment sends a request to Oracle Real-Time Scheduler to confirm an appointment for a given slot. Invoke GetAppointment first, to get the available slots.
GetAppointment Method
GetAppointment requests appointment slots from Oracle Real-Time Scheduler and returns the list of available slots.
GetConfirmAppointment Method
GetConfirmAppointment sends a request to contract schedule an appointment in Oracle Real-Time Scheduler.
GetTransferToORS Method
GetTransferToORS transfers a service region to Oracle Real-Time Scheduler.
RollbackServiceRegionAtORS Method
RollbackServiceRegionAtORS rolls back a service region that was previously transferred to Oracle Real-Time Scheduler.
UpsertActivity Method
UpsertActivity sends a request to upsert an activity in Oracle Real-Time Scheduler.