Newer Version Available

This content describes an older version of this product. View Latest

Available Territory Slots Input

Available Territory Slots input.
Request example
1{
2  "startTime": "2019-01-23T00:00:00.000Z",
3  "endTime": "2019-02-30T00:00:00.000Z",
4  "workTypeGroupId": "0VSB0000000KyjBOAS",
5  "accountId": "001B000000qAUAWIA4",
6  "territoryIds": [
7    "0HhB0000000TO9WKAW"
8  ],
9  "schedulingPolicyId": "0VrB0000000KyjB",
10  "requiredResourceIds": [
11    "0HnB0000000TO8gKAK"
12  ]
13}
Request example with only required fields
1{
2  "workType": {
3    "id": "08qS70000004DTsIAM"
4  },
5  "territoryIds": [
6    "0HhS70000004DTdKAM"
7  ]
8}
Properties
Name Type Description Required or Optional Available Version
accountId String ID of the associated account. Optional 49.0
allowConcurrent​Scheduling Boolean Indicates whether concurrent appointments are allowed (true) or not allowed (false). The default value is false. Optional 49.0
correlationId String ID to pass custom information to the ServiceResourceScheduleHandler Apex interface. For example, you can use the correlation ID to identify the app, website, or any other external system that calls this Apex interface implementation. If you don’t pass a custom value, a randomly generated identifier is passed. Optional 53.0
endTime String Latest time that an appointment can end.

The API only returns time slots up to 31 days from the startTime.

Note

Optional 49.0
filterByResources String[] Comma-separated list of service resource IDs. API returns only eligible service resources that are both in the list and in the selected service territory. The resources are sorted by the order in which the resource IDs are passed.

You can either pass filterByResources or requiredResourceIds in a request.

Note

Optional 51.0
required​ResourceIds String[]
List of resource IDs that you want to get available time slots for. When you pass more than one resource ID, the API returns all the slots where any of the passed resources are available. For example, suppose that you have three qualified resources: A, B, and C. If you pass resource IDs A and B, the API returns all the slots where:
  • only A is available
  • only B is available
  • both A and B are available
  • both A and C are available
  • A, B, and C are all available

The API doesn’t return the slots where only C is available.

If this field is empty, time slots for all qualified resources are returned.

The API request doesn't show time slots for the resource specified in requiredResourceIds if it does not appear in the list of least utilised resources set for resourceLimitAppointmentDistribution. For example, if you specify a resource A in requiredResourceIds and resourceLimitAppointmentDistribution is set to 15, the request doesn’t show time slots for this resource, as A isn’t among the top 15 least utilised resources.

Note

Optional 49.0
resourceLimit​ApptDistribution Integer Specify the maximum number of service resources that you want to show during appointment scheduling when appointment distribution is enabled. Default value is 10.

The filterByResources field takes precedence over the resourceLimitApptDistribution field.

Note

Optional 53.0
scheduling​PolicyId String ID of the AppointmentSchedulingPolicy object. If not provided, the default configurations are considered. Optional 49.0
startTime String Earliest time that an appointment can start. You can also use a time from the past. Optional 49.0
territoryIds String[] List of IDs of service territories where the specified work is performed. Required 49.0
workType Work Type Input Type of work performed. Required if workTypeGroupId isn’t provided 49.0
workType​GroupId String ID of the work type group containing all work types performed. Required if workType isn’t provided 49.0