Pass Through Call to ServiceSchedulingScheduling's "Job Book Request" APIThis RESTified API will perform a pass-through call to the ServiceScheduling Scheduling sub-system's "Book Job Request" API (when configured). URL Panel |
---|
borderColor | grey |
---|
bgColor | whitesmoke |
---|
borderStyle | solid |
---|
| PUT /up/v5/rest/scheduling/BookJob
|
HTTP Request BodyThis request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the ServiceScheduling Scheduling "Book Job Request" API. Code Block |
---|
language | js |
---|
title | Book Job Request JSON |
---|
collapse | true |
---|
| {
"Id": "",
"WorkType": {
"Name": "",
"Skills": [{
"Id": "",
"Comp": ""
}]
},
"Location": {
"Address": {
"AddrLine1": "",
"AddrLine2": "",
"City": "",
"PostalCode": "",
"Region": "",
"Latitude": "",
"Longitude": ""
},
"LocationNum": "",
"Name": "",
"SiteId": "",
"Contacts": [{
"FirstName": "",
"LastName": "",
"ContactPoint": [{
"Mode": "Phone",
"Value": "7637548024"
},
{
"Mode": "Phone",
"Value": "223123123"
}
]
}]
},
"vwdlLocationType": "",
"RestrictionRef": "",
"Flags": {
"AllowRebook": false
},
"ExtraDuraton": "",
"ExtraOverhead": "",
"ReqProvider": [{
"Id": "",
"MPX": ""
}],
"ReqUnit": {
"unitType": "",
"RUID": ""
},
"Priority": "",
"Importance": "",
"Booking": {
"BookLocID": "",
"ContractEarliest": "",
"ContractLatest": "",
"Offer": {
"GroupID": ""
},
"OpenAccHoursOvrs": {
"OpenType": "",
"OpenHours": [{
"Start": "",
"End": ""
}]
},
"ClosedAccHoursOvrs": {
"ClosedHours": [{
"Start": "",
"End": ""
}]
},
"ClosedPubHols": {
"PubHolSets": [
"",
""
]
},
"ClosedDates": [{
"Start": "",
"End": ""
}]
},
"ServHoursPreDefPatts": {
"ServHoursPreDef": [{
"DateRange": {
"Start": "",
"End": "",
"ServHoursPattID": ""
}
}]
},
"ServHoursPatts": [{
"DateRange": {
"Start": "",
"End": ""
},
"DayAndTimes": {
"Day": "",
"Start": "",
"End": ""
},
"GracePeriod": ""
}],
"AccHoursPatts": [{
"DateRange": {
"Start": "",
"End": ""
},
"DayAndTimes": {
"Day": "",
"Start": "",
"End": ""
}
}],
"BookOptions": {
"AllowEmpOT": false,
"SpareIgnVanStock": false,
"FixToEmp": false,
"ServAsAccHours": false,
"CallToFix": false,
"ReqConfirm": false,
"NonConsecShift": false,
"ConsecShift": false,
"ContigShift": false
},
"ForceOptions": {
"InTray": false,
"InTrayWithSkill": false,
"InTrayAfterAll": false,
"SpareForceGo": false,
"Reassign": false,
"IgnoreCapacity": false,
"NoTravel": false,
"NoLocalKnowledge": false,
"IgnoreAvailable": false,
"IgnoreSkills": false
},
"ReqSpares": [{
"spare": "",
"qty": ""
}],
"DeliverySize": "",
"PickupSize": "",
"CapacityCategory": "",
"Desc": [
"",
""
],
"Desc2": ""
} |
Book Job Request Object Properties (bold property names indicate required field)Property | Type | Length | Description | Req? | Field Mapping: ServiceSchedulingScheduling |
---|
Id | string
| SS: 50 | Caller’s identifier of the job to be booked. It must be unique in the ServiceOptimizer database, unless AllowRebook (below) is True | Yes | jobID | WorkType | object |
| A list of the extra Skills (skill IDs) needed to do this job, in addition to those specified in ServiceOptimizer for this job’s type. If one or more of the supplied ExtraSkills is already required by the JobType, it will be ignored unless it’s the first ExtraSkill and the ExtraSkillLevel (below) is different from that specified for the JobType. The maximum number of skills that can be supplied is 10 however, only the skillLevel for the first skillID in the list has any meaning other skills are assumed to require no specific level. | Yes | see WorkType.objects | Location | object |
| Pending | Yes | see Location.objects | vwdlLocationType | string SS: EmpLocType | SS: See Valid Values | When set, indicates that the appointment is virtual, with a dynamic location. The dynamic location to be used for the appointment is based on the assigned employee. Currently, only the EmpLocType value of Home is supported. SS Valid Values: "Home", "Work", "Depot", "Supplied", "None" | No | vwdlLocationType | RestrictionRef | string SS: RestrictionRef (string) | SS: 30 | Each job may optionally have a restrictionRef . If specified, it must exist in the ServiceOptimizer database. Jobs with a restrictionRef will not show sensitive information for the job on the Gantt, unless the Gantt user has been given permission to view the full jobs details. | No | restrictionRef | Flags | object |
| Cancel Dependency Group Jobs | No | See Flags.objects | ExtraDuraton | string |
| Time (in minutes) required to complete the job in addition to what is defined in ServiceOptimizer for this job type. The maximum value which will be accepted for this field plus ExtraOverhead (below) is specified by the SJEDMax database parameter. The maximum total duration for the job is specified by the SJTDMax database parameter. Where this booking is based on offers from a previous call to OfferAppts, the values supplied in this field in this booking request must be the same as those supplied on the OfferAppts call. | No | extraDuration | ReqProvider | array |
| Allows for a list of up to 10 reqEmps to be specified. | No | see RegProvider.objects | ReqUnit | object |
| Pass through parameter to the ServiceSchedulingScheduling BookJob API. | No | see RegUnit.objects | Priority | string SS: integer |
| Used to determine the cost of the job being overdue. The ABS and the optimizer will normally cost the lateness of a high priority (SLA) job higher than a low priority job. This should have the effect of making it less likely that a high priority job will be significantly overdue (late). (Lateness is the amount by which a job’s scheduled start time (or finish time in the case of call-to-fix jobs – see callToFix, below)) exceeds its time. Priority the job should have. If priority isn’t being used, it should be set to 50. Must be set between 1 and 99. | No | ? | Importance | string SS: integer |
| Used to try and ensure that the jobs left in the in-tray are the less important ones and that the more important jobs are in the schedule. Must take a value between 0 and 9. Where this booking is based on offers from a previous call to OfferAppts, the values supplied in this field in this booking request must be the same as those supplied on the OfferAppts call. | No | importance | Booking | object |
| Pass through parameter to the ServiceSchedulingScheduling BookJob API. | Yes | see Booking.objects | ServHoursPreDefPatts | object |
| A set of Service Hours patterns that are pre-defined in ServiceOptimizer.ServHoursPreDefPatts can’t be supplied as well as ServHoursPatts (below). | No | see ServHoursPreDefPatts.objects | ServHoursPatts | array |
| A repeating sequence of Service Hours time periods that each apply to a day of the week. ServHoursPatts can’t be supplied as well as ServHoursPreDefPatts (above). | No | see ServHoursPatts.objects | AccHoursPatts | array |
| A set of Access Hours patterns for the job. The actual Access Hours for each pattern must be the same, though the DateRange can be different. | No | see AccHoursPatts.objects | BookOptions | object |
| Pass through parameter to the ServiceSchedulingScheduling BookJob API. |
| see BookOptions.objects |
HTTP ResponseSuccessOn success, a JSON-formatted version of the ServiceScheduling Scheduling "Book Job Request" API response will be returned. Code Block |
---|
| {
"Success" : true,
"Code" : 0,
"Message" : "OK",
"Payload" : {
"result" : {
"type" : "OK",
"code" : "0"
},
"TravelTime" : "3",
"WorkItems" : [
{
"Id" : "Dep-1306",
"Tech" : "DE3_9_01",
"ETA" : "2006-01-03T08:01",
"IRU" : "EMID_I01",
"FRU" : "EMIDLAND"
},
{
"Id" : "Dep-1307",
"Tech" : "DE3_9_01",
"ETA" : "2006-01-03T09:02",
"IRU" : "EMID_I01",
"FRU" : "EMIDLAND"
}
]
}
} |
Error On error, a JSON-formatted version of the ServiceScheduling Scheduling "Book Job Request" API response will be returned. Code Block |
---|
| {
"Success": false,
"Code": 9,
"Payload": {
"returnCode": {
"type": "Error",
"code": "SCH Error Code"
}
}
} |
Return CodesIn addition to to the Standard Return Codes, and the Scheduling Error codes, the possible Return Codes from this API are: Expand |
---|
Note |
---|
| Since a search for available capacity is done as part of JobBookRequest, ABS_search_timeout can be used, and so SP_OK_ABS_SEARCH_TIMEOUT (369) (369) or SP_NTA_ABS_SEARCH_TIMEOUT (370) (370) may be returned. ABS_search_timeout won’t be used if Reassign is to be tried, since the time allowed for re-assign is separately limited by the timeout ABS_reassign_timeout. Within this window, the job can only be allocated to start (and finish if it’s a call-to-fix job) within its Access Hours. If InTray is set, a search window isn’t needed and effectively the whole memory horizon is searched. |
|
|