Calculate and retrieve a schedule
Calculates a schedule based on the calculation parameters and the field rep's data, blocks until completion, and returns the schedule. The field rep's data can be provided in newDataSet, which will replace the existing data. Alternatively, the existing data of the field rep will be used.
HTTP timeout recommendations:
- For schedules with periods between 1 and 4 weeks, a timeout of 30 seconds is recommended:
- Note: 1-week schedules typically compute in under 5 seconds.
- For 16-week schedules, a timeout of 120 seconds is recommended.
This method requires an access token with one of the following scopes:
- Partner access token
- Organization access token for {organizationId}
- FieldRep access token for {fieldRepId}
path parameters
- organizationId
An id must consist of the following characters: [a-zA-Z0-9-_{}]
- fieldRepId
An id must consist of the following characters: [a-zA-Z0-9-_{}]
Request body schema: application/json
calculationParameters
Specifies the parameters for a schedule calculation.
- fieldRepCurrentLocalDateTime
The current local time of the field rep. Used to take work and business hours into account when calculating the schedule. The time must be between UTC -13h and UTC +15h.
IsoDateTimeStringMinutesPrecision is a DateTime type that contains values in the format
"yyyy-MM-ddTHH:mm", e.g."2022-01-31T23:59". - scheduleBeginAt
The begin time of the schedule. It cannot be more than 24 hours in the past or more than 365 days in the future, relative to the property
fieldRepCurrentLocalDateTime.IsoDateTimeStringMinutesPrecision is a DateTime type that contains values in the format
"yyyy-MM-ddTHH:mm", e.g."2022-01-31T23:59". - schedulePeriodDays
Specifies the number of days in the schedule.
Allowed values, depending on the Edition, are
- Basic: 1, 2, 3, 4, 5, 6, 7 days
- Professional: additionally 14, 21, 28 days
- Ultimate: additionally 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112 days
customStartLocation
Defines a custom start location of the schedule. Recommendation: To speed up the recalculation of the schedule in the field, use a nearby customer location or scheduling constraint location as customStartLocation, if applicable.
Note: If null the field rep's home location is used. Specify
addressand/orgeoPosition. If both are specified, thegeoPositionis used as the location. If only theaddressis specified, it is automatically geocoded and used as the location. Recommendation: To speed up the calculation, always send the geoposition when possible. You can use geocode to get the geoposition of an address.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- skipWorkBreakToday
Specifies whether to omit the break on the first day of the schedule if the schedule starts with today.
Default:false - includeRoutePolylinesInSchedule
Specifies whether the
routePolylineshould be filled in the drive rows of the schedule. Polylines are provided in Google's encoded polyline format, encoded in utf-8. They can be used to draw a drive on a map (see Polyline decoder utility).Default:false - customerPlanningModePossible values:
"AccordingToCallIntervalsAndForcedCalls""OnlyForcedCalls"Specifies whether to include only forced calls or calls according to the interval as well.
Default:"AccordingToCallIntervalsAndForcedCalls" - trafficConditionsForFirstRidePossible values:
"TypicalTraffic""CurrentTraffic"Specifies whether to use the current traffic or the typical traffic for the first ride of the schedule.
Note: The current traffic can only be taken into account if the first ride starts within the next 15 minutes.
Edition: Ultimate
Default:"TypicalTraffic"
newDataSet
Provides the field rep's data to be used in the schedule calculation. If specified, overwrites the existing field rep's data.
Note: If null, the existing data of the field rep is used for the schedule calculation.
fieldRep
Replaces the field rep's settings.
Note: If null, the existing field rep data is kept. The FieldRep is a resource in the backend system that contains the basic data or settings necessary for the calculation of schedules.
- name
The full name of the field rep.
- languageCultureName
Is used to set the language, formatting, and the first day of the week.
The schedule's messages appear in the field rep's culture language and formatting.
Supported values are:
"de-AT","de-CH","de-DE","de-LI","de-LU","en-AU","en-CA","en-GB","en-IE","en-NZ","en-US","en-ZA","es-AR","es-CL","es-CO","es-ES","es-MX","es-US","fr-BE","fr-CA","fr-CH","fr-FR","fr-LU","it-CH","it-IT","pt-BR","pt-PT" homeLocation
The home location of the field rep. Specify
addressand/orgeoPosition. If both are specified, thegeoPositionis used as the location. If only theaddressis specified, it is automatically geocoded and used as the location. Recommendation: To speed up the calculation, always send the geoposition when possible. You can use geocode to get the geoposition of an address.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. This property is required, even if
singleLineAddressis set. Optionally 2-letter or 3-letter ISO country codes can be used. - singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
workingHours
Defines the hours per weekday that a field rep works. At least one day must be set.
monday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
tuesday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
wednesday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
thursday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
friday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
saturday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
sunday
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
drivingTimeFactors
Allows you to set driving speeds that vary by road type and field rep.
Note: If this property is null, the default value for each road type is used.
Edition: Ultimate
- cityRoad
This factor is applied to driving times in cities when scheduling. 0.5 = twice as fast, 1 = normal, 2 = half as fast.
Default:1 - countryRoad
This factor is applied to driving times on country roads when scheduling. 0.5 = twice as fast, 1 = normal, 2 = half as fast.
Default:1 - highway
This factor is applied to driving times on highways when scheduling. 0.5 = twice as fast, 1 = normal, 2 = half as fast.
Default:1
overnightStayAwayFromHomeSettings
Defines the conditions for overnight stays away from home.
Note: If this property is not set, no overnight stays are scheduled.
Edition: Ultimate
- isAllowedOnMonday
Specifies whether overnight stays away from home are allowed on Mondays.
Default:false - isAllowedOnTuesday
Specifies whether overnight stays away from home are allowed on Tuesdays.
Default:false - isAllowedOnWednesday
Specifies whether overnight stays away from home are allowed on Wednesdays.
Default:false - isAllowedOnThursday
Specifies whether overnight stays away from home are allowed on Thursdays.
Default:false - isAllowedOnFriday
Specifies whether overnight stays away from home are allowed on Fridays
Default:false - isAllowedOnSaturday
Specifies whether overnight stays away from home are allowed on Saturdays.
Default:false - isAllowedOnSunday
Specifies whether overnight stays away from home are allowed on Sundays.
Default:false - minimumMetersFromHome
Defines the minimum meters from the rep's home location. If the distance is within the minimum, no overnight stay is scheduled.
Default:120000 - minimumMinutesFromHome
Defines the minimum minutes of driving time from the rep's home location. If the driving time is within the minimum, no overnight stay is scheduled.
Default:120 - stayAtPreferredOvernightLocationIfWithinMinutes
After the last customer visit of the day, if a preferred overnight location is reachable within the specified minutes, the stay may be scheduled at that preferred overnight location.
Default:45
generalCustomerSchedulingSettings
Applies to all of the field rep's customers for the schedule calculation.
Note: If this property is null, the default value is used for each setting.
- dueAfterLastCallIntervalPercent
Specifies the value (in %) of the elapsed call interval after which the next call can be scheduled.
Default:70 - adherenceToCallingHoursPossible values:
"StartOfCall""EntireCall"Specifies whether only the start of the call must be within the calling hours or the entire call must be within the calling hours.
Default:"StartOfCall"
workBreak
Specifies how to schedule a work break.
Note: If this property is null, no break is scheduled.
scheduleWithin
Specifies the time range in which to schedule the work break.
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".
- durationMinutes
Specifies the duration of the work break in minutes. The duration must fit within
scheduleWithin.
customers
Replaces the entire set of customers.
Note: If null, the existing customers of the field rep are kept.
The allowed number of customers, depending on the Edition, are
- Basic: 125
- Professional: 500
- Ultimate: 1000
- id
- name
The name of the customer.
location
The customer's location. Specify the address, the geoposition, or both.
Note: If the address is defined but the geoposition is null, the address is automatically geocoded.
address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- activatedOn
Used to calculate the call urgency of never-called customers. The actual day for the initial call is selected according to an optimized schedule. Can be set in the future.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - lastCallOn
Date of the last call. Is used to calculate the urgency of the next call based on the customer's call interval. Unlike
activatedOn, in order for the customer to be due and therefore scheduled for the next call, the field rep'sdueAfterLastCallIntervalPercentmust be reached. Must not be earlier thanactivatedOn.Note: If null, the call urgency will be calculated based on
activatedOn.IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - lastMissedCallOn
Prevents the customer from being rescheduled for a call on the same day.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". callInterval
Specifies the interval at which the customer should be called.
Note: If null, the customer has no call interval.
- days
The customer's call interval in days. A next call can be scheduled when the
dueAfterLastCallIntervalPercentsince the last call is reached.Default:30 - isAdherencePreferred
If set to 'true', helps avoid exceeding the customer's call interval - even if the field rep's territory is too large.
Note: Use sparingly, as not all customers can be called in the given interval if the territory is too large.
Default:false
- callDurationMinutes
The duration of a call in minutes.
Default:20 schedulingRestriction
Specifies whether to schedule the customer only in certain calendar weeks. Use this if a customer is to be visited by two or more field reps but not in the same week.
Note: If null, no restriction is applied.
Edition: Ultimate
One of:
SchedulingRestrictions
string
Possible values:"OnlyInOddWeeks""OnlyInEvenWeeks""OnlyInFirstOfThreeWeeks""OnlyInSecondOfThreeWeeks""OnlyInThirdOfThreeWeeks""OnlyInFirstOfFourWeeks""OnlyInSecondOfFourWeeks""OnlyInThirdOfFourWeeks""OnlyInFourthOfFourWeeks"null
null
- doForceCall
If true, this customer will be included in the next schedule regardless of their last call date and call interval. This allows you to schedule a call to a customer who needs to be called urgently, without changing their last call date or call interval.
Default:false callingHours
For each day of the week it is possible to define one or two periods during which the customer is open for customer calls. If it is preferred to visit the customer on certain days or at certain times, set the
isPreferredflag to true for these periods. Preferred periods cause portatour® to schedule the customer preferably within this period.The field rep's
adherenceToCallingHoursingeneralCustomerSchedulingSettingsspecifies whether only the start of the call must be within the calling hours ("StartOfCall", default) or the entire call must be within the calling hours ("EntireCall").Default: each day starts at “00:00:00” and ends at “23:59:00” on period 1. Period 2 is null.
Editions: Professional, Ultimate
mondayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
mondayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
tuesdayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
tuesdayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
wednesdayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
wednesdayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
thursdayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
thursdayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
fridayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
fridayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
saturdayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
saturdayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
sundayPeriod1
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
sundayPeriod2
- from
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"00:00:00" - to
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59".Default:"23:59:00" - isPreferred
Edition: Ultimate
Default:false
callBlocks
Used to block calls from being scheduled for the customer on the specified days, e.g., the customer's holidays.
Editions: Professional, Ultimate
- beginOn
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - endOn
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - description
preferredOvernightLocations
Replaces the entire set of preferred overnight locations.
Note: If null, the existing preferred overnight locations of the field rep are kept.
Edition: Ultimate
- id
- name
The name of the preferred overnight location.
location
The location of the preferred overnight location. Specify
addressand/orgeoPosition. If both are specified, thegeoPositionis used as the location. If only theaddressis specified, it is automatically geocoded and used as the location. Recommendation: To speed up the calculation, always send the geoposition when possible. You can use geocode to get the geoposition of an address.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
schedulingConstraints
Replaces the entire set of scheduling constraints.
Note: If null, the existing scheduling constraints of the field rep are kept.
Note: For support in your edition, please see the schedule constraint types below.
customerEvent
Schedules a customer call at the specified date and time for the given duration. The event can last for several days. The location of the event is typically the customer's location, but can optionally be set to another location.
- id
- subject
locationInformation
Specifies the custom location of the customer event.
- locationTypePossible values:
"HomeLocation""CustomerLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomerLocation": the location of the customer is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the custom location of the customer event.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- startDate
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - beginAt
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - endDate
If null, value of
startDateis used.IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - endAt
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - customerId
The id of the customer to which this customer event is related.
customerEventWithinTimeFrame
Schedules a customer call within the specified time frame. The location of the event is typically the customer's location, but can optionally be set to another location.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the custom location of the customer event.
- locationTypePossible values:
"HomeLocation""CustomerLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomerLocation": the location of the customer is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the custom location of the customer event.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- date
The start date of the customer event.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - earliestBeginAt
The earliest start time of a customer event, defined by a time string with minute precision.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - latestEndAt
The latest end time of the customer event, defined by a time string with minute precision.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - durationMinutes
The duration of the customer event in minutes.
Note: This value must be less than the difference between
earliestBeginAtandlatestEndAt. - customerId
The id of the customer to which this customer event is related.
customerEventAnytimeOnADay
Schedules a customer call on the specified day. The location of the event is typically the customer's location, but can optionally be set to another location.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the custom location of the customer event.
- locationTypePossible values:
"HomeLocation""CustomerLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomerLocation": the location of the customer is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the custom location of the customer event.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- date
The date of the customer event.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - durationMinutes
The duration of the customer event in minutes.
- customerId
The id of the customer to which this customer event is related.
customerEventAnytimeInAWeek
Schedules a customer call any time within the calendar week that contains the specified date. The location of the event is typically the customer's location, but can optionally be set to another location.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the custom location of the customer event.
- locationTypePossible values:
"HomeLocation""CustomerLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomerLocation": the location of the customer is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the custom location of the customer event.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- referenceDate
Any date within the target calendar week. The customer call is scheduled any time within the calendar week that contains this date. The week starts on the field rep's first day of week depending on the
languageCultureName.IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - durationMinutes
The duration of the customer event in minutes.
- customerId
The id of the customer to which this customer event is related.
blocker
Blocks the scheduling of calls for the field rep during the specified date and time range. It can last for several days.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information of the blocker.
- locationTypePossible values:
"HomeLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information of the blocker.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- startDate
The start date of the blocker.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - beginAt
The start time of the blocker.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59".Default:"00:00" - endDate
The end date of the blocker.
Note: If null it is the same as the
startDate.IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - endAt
The end time of the blocker.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59".Default:"23:59"
blockerWithinTimeFrame
Schedules a blocker for the given duration within the specified date time range.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information of the blocker.
- locationTypePossible values:
"HomeLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information of the blocker.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- date
The date of the blocker.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - earliestBeginAt
The earliest start time of the blocker, defined by a time string with minute precision.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - latestEndAt
The latest end time of the blocker, defined by a time string with minute precision.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - durationMinutes
The duration of the blocker in minutes.
Note: This value must be less than the difference between
earliestBeginAtandlatestEndAt.
blockerAnytimeOnADay
Schedules a blocker for the given duration within the specified day.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information of the blocker.
- locationTypePossible values:
"HomeLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information of the blocker.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- date
The date of the blocker.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - durationMinutes
The duration of the blocker in minutes.
blockerAnytimeInAWeek
Schedules a blocker for the given duration any time within the calendar week that contains the specified date.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information of the blocker.
- locationTypePossible values:
"HomeLocation""CustomLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomLocation": thecustomLocationproperty is used as the location."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information of the blocker.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- referenceDate
Any date within the target calendar week. The blocker is scheduled any time within the calendar week that contains this date. The week starts on the field rep's first day of week depending on the
languageCultureName.IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - durationMinutes
The duration of the blocker in minutes.
deviatingStartOfDay
Starts the workday at a specific location and time.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information.
- locationTypePossible values:
"HomeLocation""CustomLocation""PreferredOvernightLocation"Depending on
locationType:"HomeLocation": the home location of the field rep is used."PreferredOvernightLocation": the location of the preferred overnight stay is used."CustomLocation": thecustomLocationproperty is used as the location.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- preferredOvernightLocationId
If the
locationTypeis"PreferredOvernightLocation"thepreferredOvernightLocationIdis required.
- date
Date of the deviating start of day.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - beginAt
The start time of the deviating start of day. If null, the corresponding start time of the field rep's workday is used.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59".
deviatingEndOfDay
Ends the workday at a specific location and time.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information.
- locationTypePossible values:
"HomeLocation""CustomLocation""PreferredOvernightLocation"Depending on
locationType:"HomeLocation": the home location of the field rep is used."PreferredOvernightLocation": the location of the preferred overnight stay is used."CustomLocation": thecustomLocationproperty is used as the location.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- preferredOvernightLocationId
If the
locationTypeis"PreferredOvernightLocation"thepreferredOvernightLocationIdis required.
- date
Date of the deviating end of day.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - endAt
The end time of the deviating end of day. If null, the corresponding end time of the field rep's workday is used.
IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59".
overnightStay
Schedules an overnight stay at a specific location for a given day.
Editions: Professional, Ultimate
- id
- subject
locationInformation
Specifies the location information.
- locationTypePossible values:
"HomeLocation""CustomLocation""PreferredOvernightLocation"Depending on
locationType:"HomeLocation": the home location of the field rep is used."PreferredOvernightLocation": the location of the preferred overnight stay is used."CustomLocation": thecustomLocationproperty is used as the location.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- preferredOvernightLocationId
If the
locationTypeis"PreferredOvernightLocation"thepreferredOvernightLocationIdis required.
- startDate
The start date of the overnight stay.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". - beginAt
The time at which the overnight stay begins. If null, the corresponding end time of the field rep's workday is used.
Note: A fallback of
"00:00"is used if it is null and the field rep does not have a work time on the corresponding day.IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59". - endAtNextDay
The time at which the overnight stay ends on the next day. If null, the corresponding start time of the field rep's workday is used.
Note: A fallback of
"08:00"is used if it is null and the field rep does not have a work time on the corresponding day.IsoTimeStringMinutesPrecision is a time type that contains values in the format
"HH:mm", e.g."23:59".
generic
Automatically decides what type of scheduling constraint to use. To convert to a particular type, the required properties of the type must be met. If they are not met for any particular type, the scheduling constraint cannot be converted and will therefore not be scheduled. Do not provide multiple properties in the same generic scheduling constraint that could be converted to multiple different particular types of scheduling constraints, for example, do not provide
preferredOvernightLocationIdandcustomerIdin the same generic scheduling constraint.Editions: The automatic scheduling constraint supports only the subset of properties available in your edition. If the resulting scheduling constraint type is not supported in your edition, an error is returned.
- id
- subject
locationInformation
Specifies the location information of the scheduling constraint.
- locationTypePossible values:
"HomeLocation""CustomerLocation""CustomLocation""PreferredOvernightLocation""Anywhere"Depending on
locationType:"HomeLocation": the home location of the field rep is used."CustomerLocation": the location of the customer is used."CustomLocation": thecustomLocationproperty is used as the location."PreferredOvernightLocation": the location of the preferred overnight stay is used."Anywhere"(Edition: Ultimate): no location is used.
customLocation
Required if
locationTypeis"CustomLocation". Must not be set for any other value oflocationType. Specifies the location information of the scheduling constraint.address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- preferredOvernightLocationId
If the
locationTypeis"PreferredOvernightLocation"thepreferredOvernightLocationIdis required.
- earliestBeginAt
The earliest start date and time of the scheduling constraint, with minute precision.
IsoDateTimeStringMinutesPrecision is a DateTime type that contains values in the format
"yyyy-MM-ddTHH:mm", e.g."2022-01-31T23:59". - latestEndAt
The latest end date and time of the scheduling constraint, with minute precision.
IsoDateTimeStringMinutesPrecision is a DateTime type that contains values in the format
"yyyy-MM-ddTHH:mm", e.g."2022-01-31T23:59". - durationMinutes
The duration of the scheduling constraint in minutes.
Note: This value must be less than the difference between
earliestBeginAtandlatestEndAt. - customerId
The id of the customer to which the scheduling constraint is related.
Responses
200 OK
Response schema: application/json
- id
Unique for each calculated schedule.
days
The scheduled days.
- day
Date of scheduled day.
IsoDateString is a date type that contains values in the format
"yyyy-MM-dd", e.g."2022-01-31". rows
One row represents one scheduled item. A typical schedule has multiple rows. For example, a Drive row followed by a StopAtCustomer row and another Drive row.
- typePossible values:
"Stop""Drive""SchedulingConstraintWithoutLocation"The row type determines which of the subsequent row fields below is set. E.g. if the type is
"Drive", only the fielddriveis set. stop
Specifies a stop. Only set if the row type is
"Stop".- timeFrom
Start time of the stop.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - timeTo
End time of the stop.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - stopTypePossible values:
"DepartureFromHome""DepartureFromCustomStartLocation""DepartureAfterAnOngoingSchedulingConstraint""DepartureFromPreferredOvernightLocation""DepartureFromSchedulingConstraint""DepartureFromOvernightArea""ArrivalAtHome""ArrivalAtPreferredOvernightLocation""ArrivalAtOvernightArea""ArrivalAtSchedulingConstraint""StopAtCustomer""StopAtCustomerSchedulingConstraint""StopAtOtherSchedulingConstraint"The type of the stop. A scheduled day begins with a departure stop and ends with an arrival stop. Other stops, such as stops at customers, are placed between the departure and arrival stops.
Possible departures:
"DepartureFromHome": The scheduled day starts from the home location of the field rep."DepartureFromCustomStartLocation": The scheduled day starts from a specific custom location, that originates from a custom location of a scheduling constraint."DepartureAfterAnOngoingSchedulingConstraint": The scheduled day starts after an ongoing scheduling constraint, e.g. a scheduling constraint of typecustomerEvent."DepartureFromPreferredOvernightLocation": The scheduled day starts from a preferred overnight location."DepartureFromSchedulingConstraint": The scheduled day starts from the location of a specific scheduling constraint, e.g. a scheduling constraint of typecustomerEvent."DepartureFromOvernightArea": The scheduled day starts from a planned overnight stay area.
Possible stops:
"StopAtCustomer": A stop at a customer location."StopAtCustomerSchedulingConstraint": A stop at a customer due to a scheduling constraint, e.g. a scheduling constraint of typecustomerEvent."StopAtOtherSchedulingConstraint": A stop due to a scheduling constraint that does not have a customer reference, e.g. a scheduling constraint of typeblocker.
Possible arrivals:
"ArrivalAtHome": The scheduled day ends at the home location of the field rep."ArrivalAtPreferredOvernightLocation": The scheduled day ends with an overnight stay at a preferred overnight location of the field rep."ArrivalAtOvernightArea": The scheduled day ends at an area where an overnight stay is planned nearby. This type of overnight stay is scheduled, when there is no viable preferred overnight location near the area of the overnight stay."ArrivalAtSchedulingConstraint": The scheduled day ends at the location of a scheduling constraint, e.g. a scheduling constraint of typeovernightStay.
- displayName
Name or subject of the stop.
location
Location of the stop.
address
- streetWithHouseNumber
Contains the street and the house number of the address. Do not use if
singleLineAddressis set.Example for Germany:
- Jahnstr. 18
Example for USA:
- 140 2nd St
- postalCode
Contains the postal code of the address. Do not use if
singleLineAddressis set. - city
Contains the city of the address. Do not use if
singleLineAddressis set. - state
Contains the state of the address. Do not use if
singleLineAddressis set. - country
Contains the country of the address. Optionally 2-letter or 3-letter ISO country codes can be used.
Note: It is recommended to include the country, as omitting it may negatively impact performance and result in only the best guess being made regarding the intended country. Including the country improves both accuracy and geocoding speed.
- singleLineAddress
Note: This field is used for input-only and will never be returned.
The
singleLineAddressfield represents the address as a single line. If nogeoPositionis provided, the address is automatically parsed into its components. If ageoPositionis provided, the value ofsingleLineAddressis stored asstreetWithHouseNumberin the address.You cannot use the other address properties apart from
countryif this property is set.
geoPosition
WGS84 (EPSG:4326) coordinates of the geoposition.
- latitude
- longitude
- geocodeWarning
If
latitudeandlongitudeare 0, there is a description of the geocode problem. Iflatitudeandlongitudeare set and there is a geocode warning, the warning is provided. - geocodePossibleDeviationMeters
Used to assess the
geocodeWarningby providing the possible deviation of the geoposition in meters.
- customerId
If the stop is associated with a customer, the customer id is provided.
- schedulingConstraintId
If the stop is associated with a scheduling constraint, the scheduling constraint id is provided.
- preferredOvernightLocationId
If the stop is associated with a preferred overnight location, the preferred overnight location id is provided.
drive
Specifies a drive. Only set if the row type is
"Drive".- timeFrom
Start time of the drive.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - timeTo
End time of the drive.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - distanceMeters
Drive distance in meters.
- routingTypePossible values:
"TypicalTraffic""CurrentTraffic""Beeline"The routingType indicates how the routing was made.
- routePolyline
Polylines are provided in Google's encoded polyline format, encoded in utf-8. Polylines can be used to draw drives on maps (see Polyline decoder utility). Set if
includeRoutePolylinesInScheduleis true in thecalculationParameters. interruption
An interruption represents a time span during which no driving takes place. It is used to model waiting periods (e.g., waiting for a customer to open) as well as work breaks.
Field reps are not obliged to take interruptions at the suggested times. They are free to choose where and when to pause during their route. However, they should adhere to the duration of the interruption (the interval between
interruption.timeFromandinterruption.timeTo) to ensure that arrival at the destination remains on time.If null, no interruption is scheduled for the drive, which is typically the case.
Example A B C drive.timeFrom10:00 11:00 12:00 drive.timeTo15:20 11:37 12:10 drive.interruption.timeFrom12:00 11:00 12:00 drive.interruption.timeTo12:45 11:30 12:06 drive.interruption.containsWorkBreaktrue true false driving duration 4h35min 7min 4min interruption duration 45min 30min 6min - timeFrom
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - timeTo
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - containsWorkBreak
schedulingConstraintWithoutLocation
Specifies a period for a scheduling constraint without a location. Only set if the row type is
"SchedulingConstraintWithoutLocation".Note: The
timeFromandtimeToof theschedulingConstraintWithoutLocationoverlaps with thetimeFromandtimeToof the previousdrivein the schedule. To calculate the driving time of the precedingdrive, the duration of theschedulingConstraintWithoutLocationmust be added to the interruption duration, which is subtracted from the duration of the time frame during which the drive takes place.For example, if a
schedulingConstraintWithoutLocationwithtimeFromof 10:30 andtimeToof 11:00 were to follow thedrivefrom example A in the description ofdrive.interruptionabove, the 30-minute duration of the scheduling constraint would be added to the interruption duration, resulting in a total interruption duration of 75 minutes. This would shorten the driving duration to 4 hours and 5 minutes.- timeFrom
Start of the scheduling constraint.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - timeTo
End of the scheduling constraint.
IsoTimeStringSecondsPrecision is a time type that contains values in the format
"HH:mm:ss", e.g."23:59:59". - displayName
Display name of the scheduling constraint.
- schedulingConstraintId
Id to the scheduling constraint.
- customerId
Id of the customer associated with the scheduling constraint.
Note: If null, there is no customer associated with the scheduling constraint.
messages
Provide information about the schedule. The possible messages are documented in the schedule messages section.
Note: If null, there are no messages.
- messageId
Identifies the schedule message.
- severityPossible values:
"Info""Warning""Error"The severity level of the message.
- text
Is provided in the language of the field rep. Its content is described in the schedule message description.
deviations
Deviations contain ids of customers or ids of schedulingConstraints that were not considered in the schedule. Deviations of the calculated schedule from the input data used for schedule calculation.
Note: If null, there are no deviations.
- unscheduledSchedulingConstraintsInSchedulePeriod
List of ids of scheduling constraints that were not scheduled. If not null, the schedule will include messages with id 5048 or id 5050.
Possible reasons:
- The scheduling constraint collides with another of your scheduling constraints. Either the scheduling constraints overlap or the time between the scheduling constraints is not sufficient for the required drive from the first to the second scheduling constraint.
- The scheduling constraint is located far away from your starting point or it takes too long to get there, undertake the scheduling constraint and drive back to the home location all within one day.
- unscheduledCustomersWithDoForceCall
List of ids of customers with
doForceCallset that were not scheduled. If not null, the schedule will include a message with id 5049.Possible reasons:
- There are too many customers with
doForceCallset and not all of them can be included in the schedule. - A customer has no or very limited business hours, which are either outside of the field rep's working hours or in conflict with the limited business hours of a different customer with
doForceCallor with a scheduling constraint. - A customer is located far away from your home location so that they cannot be reached within the working hours.
- A customer has no address information or the address could not be geocoded.
- There are too many customers with
- schedulingConstraintsWithDeviatingTime
List of ids of scheduling constraints that have a deviating time. Scheduling constraints with a deviating time can be either shortened or postponed. If not null, the schedule will include messages with id 5003 or id 5042.
Possible reason for shortening:
- To ensure there is enough time to reach a following scheduling constraint on time.
Possible reason for postponement:
- To ensure there is enough time to reach the first scheduling constraint of the schedule.
Error responses (10)
400 Bad Request
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
401 Unauthorized
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
402 Payment Required
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
403 Forbidden
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
404 Not Found
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
409 Conflict
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
413 Content Too Large
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.
429 Too Many Requests
Response schema: application/json
- statusCode
Corresponds to the HTTP status code.
- message
Describes the error.
- errorCode
- correlationId
The request ID, identical to the
PT-RIDresponse header. It can be used to trace the request for support purposes.