OAASRequest Class
Represents the request sent in the OAAS.Optimize() method. This class contains all the details of a global optimization call.
OAASRequest contains the following properties.
If true, all service appointments within the time frame are considered during optimization. If false, only unscheduled appointments are considered, and scheduled appointments are pinned (unmovable).
public Boolean allTasksMode {get; set;}
Type: Boolean
The API name of a Boolean field on the ServiceAppointment object. Only service appointments on which the Boolean field is set to true are optimized.
public String filterFieldAPIName {get; set;}
Type: String
The start of the time frame in which the optimization process considers data for scheduling.
public Datetime start {get; set;}
Type: Datetime
The end of the time frame in which the optimization process considers data for scheduling.
public Datetime finish {get; set;}
Type: Datetime
If true, service appointments both with and without an associated service territory are considered during optimization. If false, only appointments with an associated service territory are considered.
public Boolean includeServicesWithEmptyLocation {get; set;}
Type: Boolean
The API name of a Boolean field on the ServiceAppointment object. Only service appointments on which the Boolean field is set to true are never dropped from the schedule after global or in-day optimization. keepApptScheduledis only available for Enhanced Scheduling and Optimization.
public String keepApptScheduled {get; set;}
Type: String
Use this property to ensure that appointments are optimized but not removed from the schedule. They can be moved to another resource or time slot.
There are four possible property value options:
- Valid field name: the field name is a valid Boolean field on the ServiceAppointment object Service appointments that are marked as “Keep Scheduled” won’t be dropped from the schedule after global or in-day optimization.
- Invalid field name: the field doesn’t exist on the Service Appointment object or isn’t a Boolean type. An error message appears.
- Null: Service appointments are marked “Keep Scheduled” based on the org-level defaults defined in the global or in-day optimization settings.+
- NO_KEEP_APPT_SCHEDULED: Service appointments aren’t marked as “Keep Scheduled”.
A list of IDs of service territories for which optimization will run.
public List<Id> locations {get; set;}
Type: List<Id>
Not currently in use. Leave as null.
public Integer numberOfServicesToSchedule {get; set;}
Type: Integer
The record ID of the scheduling policy that is used to schedule the service appointment.
public Id schedulingPolicyId {get; set;}
Type: Id