Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space SBUD and version 5

Status
colourGreen
title5.4.0

A pass-through API to ServiceScheduling (when configured) which allows the ServiceScheduling's "Get Employee Jobs" API to be called.      

Description

The sp:GetJobsRequest API method returns the list of jobs for a given employee on a given date. If they are resourced, they are returned in order of their ExpectedStart.

The sp:GetJobsRequest API method can also be used to obtain a list of unresourced jobs for a responsibility unit. An unresourced non-appointment will only be returned if its contract earliest falls on or before the supplied DispatchDate. There is no defined order that unresourced jobs are returned in.

The information returned is grouped together in several structures within a larger structure. It’s not expected that all of the information returned will be used by the caller, but all available information which might possibly be useful can be returned. Some fields may be null, either because they were not specified when the job was booked, or because they are only applicable to either appointments, SLA work or because the job is unresourced.     

Info

In this context, the ServiceScheduling "Get Employee Jobs" API is the sp:GetJobsRequest API.

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

On this page:

Table of Contents
maxLevel2

Related pages:

Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Pass Through Call to ServiceScheduling's "Get Employee Jobs" API

PUT /up/v5/rest/scheduling/GetJobs

Include Page
_Default HTTP Headers
_Default HTTP Headers


API Specifics

Panel
borderColor#D3D3D3

Pass Through Call to ServiceScheduling's "Get Employee Jobs" API

This RESTified API will perform a pass-through call to the ServiceScheduling sub-system's "Get Employee Jobs" API (when configured).

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /up/v5/rest/scheduling/GetJobs

HTTP Request Body

This request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the ServiceScheduling "Get Employee Jobs" APi.

GetEmployeeJobs Object Format

Code Block
languagejs
titleGetEmployeeJobs JSON
collapsetrue
{
    "Tech": "EmpId",
    "DispatchDate": "DispatchDate",
    "FRU": "",
    "PrevJob": "",
     "Options": {
        "JobCount": 1
    },
	"JobInfoCount": "",
	"DispatchInfoCount": "",
	"AuditInfoCount": "",
	"CustomerInfoCount": "",
	"SparesInfoCount": "",
	"VirtualWorkDLInfo": ""
}

GetEmployeeJobs Object Properties (Bold property names indicate the field is required)

PropertyTypeTypeDescriptionReq?Field Mapping: ServiceScheduling
Tech

string

SS: EmpID (

string

)


SS: 25

Pass through parameter to the ServiceScheduling "Get Employee Jobs" API.

The identifier of the employee whose list of jobs is to be extracted; Mandatory if RespUnit not supplied. Otherwise optional.

SS Field: 

Yes

EmpID

Yes

DispatchDate

string

SS: spDate (string)

SS: 8

Pass through parameter to the ServiceScheduling "Get Employee Jobs" API. 

The date on which the jobs are to be carried out.

Example: "2023-03-30"

Yes

SS Field:

DispatchDate

Yes

FRU
string
SS: FRUID (

string

)

Yes

PrevJob

string

SS: JobID (string)

SS: 50

SS Field: PrevJob

No Longer in Use


SS: 9

Pass through parameter to the ServiceScheduling "Get Employee Jobs" API. 

The FRU for which unresourced jobs are to be extracted. If EmpID is supplied as well as RespUnit, EmpID is ignored.

Mandatory if EmpID and Dispatch Date not supplied. Otherwise optional

SS Field: RespUnit

JobInfoCount

string

SS: integer

SS Field: JobInfoCount

No Longer in Use

DispatchInfoCount

string

SS:

Yes

RespUnit

Optionsobject
PropertyTypeDescriptionReq?JobCountinteger

The number of jobs which should be returned in each batch. Omit if all

SS Field: jobCount

No

No


No

Pass through parameter to the ServiceScheduling GetEmployeeJobs API. 

No

see GetEmployeeJobs Jobs.Options.Objects

DispatchInfoCount

integer


A non-zero value should be supplied if Dispatch info is wanted

SS Field: DispatchInfoCount

NoDispatchInfoCount
AuditInfoCount
string
SS: No

integer


A non-zero value should be supplied if Audit info is wanted

SS Field: AuditInfoCount

NoAuditInfoCount
CustomerInfoCount

string

SS:

integer


A non-zero value should be supplied if Customer info is wanted

SS Field:
NoCustomerInfoCount
No
SparesInfoCount

string

SS:

integer


A non-zero value should be supplied if Spares info is wanted

No
SS Field:
SparesInfoCount
No
VirtualWorkDLInfo

string

SS:

boolean


When set to true, Virtual Work Dynamic Location information will be included in the response. By default the value for VirtualWorkDLInfo is treated as false

 and Virtual

and Virtual Work Dynamic Location information will not be included in the response

SS Field: VirtualWorkDLInfo

No
NoVirtualWorkDLInfo

HTTP Response

Success

On success, a JSON-formatted version of the ServiceScheduling "Get Employee Jobs" API response will be returned.

Code Block
languagejs
{
    "Success": true,
    "Code": "0",
    "Message": "",
    "Payload": {
        "result": {
            "type": "OK",
            "code": "0"
        },
        "OffsetId": "JobID",
        "OffsetCount": "JobCount",
        "WorkItems": [
            {WorkItem CDM}
        ]
    }
}

Error

On error, a JSON-formatted version of the ServiceScheduling "Get Employee Jobs" API response will be returned.

Code Block
languagejs
{
    "Success": false,
    "Code": 9,
    "Payload": {
        "returnCode": {
            "type": "Error",
            "code": "SCH Error Code"
        }
    }
}

Return Codes

In addition to the Standard Return Codes, the possible Return Codes from this API are:

Expand
  • SP_OK (0)
  • SP_JOBID_INVALID (1)
  • SP_EMPID_INVALID (5)
  • SP_DATE_INVALID (14)
  • SP_UNIT_INVALID (28)
  • SP_OUTSIDE_HORIZON (53)
  • SP_EMP_NOT_POSTED (178)
  • SP_EMPID_DOES_NOT_EXIST (231)
  • SP_UNIT_NOT_SUPPLIED (261)