Document toolboxDocument toolbox

Force/Fix Job Operative SOAP API

On This Page:

Related Pages:

The sp:DVForceFixJobRequest API method can be used to "fix" a job to a date, time and employee.

Description

It is sometimes necessary to update the schedule with a promise to service a job at a particular date and time, irrespective of the impact on the rest of the schedule. Generally this would be managed via the Gantt - however in some circumstances a programming interface is required. The sp:DVForceFixJobRequest API method allows a specified existing job to be fixed to a date, time and employee.

The overall intention is to provide a function which achieves a similar result as would have been available through move/drag and drop (D&D) of a job on the Gantt, followed by setting the job to "fixed".

As with a Gantt move/D&D, the travel time and job duration will be recalculated based on the new position/employee for the job.

Unlike a Gantt move/D&D, the job may be moved no matter what its current dispatch status (except where spares are involved or status is LoggedOff or Cleared, see below). No unearmark dispatch interface call will be made. It is assumed that the person moving the job is the employee themselves, or has spoken to the employee in order to decide that the job should be moved.

Earmarking for the job in its new position will follow the usual rules.

Jobs may be moved to any date, including a date in the past - but only if this date is within the system horizon.

Having moved the job there may be conflicts/overlaps with other jobs and standard activities. An option is available, SP_OptForceFixAllowShuffle, to cause these conflicts to be addressed (as far as is possible). If the option is not set the conflicts may never be resolved.

As with general usage, once a job has been marked as fixed it will remain fixed unless express action is taken to change it.

In line with Gantt D&D rules (see [2]), the following constraints cannot be overridden:

  • This API method applies to previously booked jobs only (whether allocated or in the in-tray) - if not true, SP_JOBID_INVALID (1) is returned.
  • The employee must have a shift assignment for the full duration of the job - if not true, SP_EMP_NO_SHIFT_ASS (271) is returned.
  • The job may only be allocated within the same FRU as it is currently booked (i.e. the employee must be posted to that FRU at the time required) - if not true, SP_OUTSIDE_FRU_POSTING (264) is returned.
  • The interface will error if the job requires spares and is not at status SPDS_Tentative - the return value will be SP_SPARES_AND_NOT_TENTATIVE (272).
  • Jobs that are already at status LoggedOff or Cleared will generate a return value of SP_JOB_GT_LOGGEDON (275).

Definition

The definition of this API is:

 Click here to expand...

Web Service

Type

Description

Req?

Val?

<sp:DVForceFixJobRequest>

 

 

 

 

 

<JobID>?</JobID>

JobID

The caller’s identifier of the job to be booked. The error SP_JOBID_INVALID (1) will be returned if the supplied JobID does not exist in the ServicePower database.

(tick)

(tick)

 

<empID>?</empID>

EmpID

is the caller’s identifier of the employee who is to do the job. The function will error (returning SP_EMPID_INVALID (5)) if EmpID does not exist in the ServicePower database.

(tick)

(tick)

 

<startDateTime>?</startDateTime>

spDateTime

is the time at which the employee will start travelling to the job. The function will error if StartDateTime breaks any of the hard constraints required by JobID, unless appropriate ForceOptions are used. Various soft constraints may also cause error – again appropriate ForceOptions can overcome these.

(tick)

 

 

<options>

 

is a set of options which specify which constraints normally applied when moving jobs should be ignored for this fn.

These are optional parameters.

(error)

 

 

 

<IgnAll>?</IgnAll>

 

All the overrides are applied

(error)

 

 

 

<AllowShuffle>?</AllowShuffle>

 

(0x100000)

(error)

 

 

 

<IgnOverlapJobs>?</IgnOverlapJobs>

 

If new position for the job overlaps existing jobs, this will be ignored. (0x4000)

(error)

 

 

 

<IgnOverlapStdActs>?</IgnOverlapStdActs>

 

If new position for the job overlaps existing standard activities, this will be ignored. (0x8000)

(error)

 

 

 

<IgnEmpReqs>?</IgnEmpReqs>

 

If the job has Mandatory/Preferred employees other than EmpID, or EmpID is one of the excluded employees, this will be ignored. (0x80)

(error)

 

 

 

<IgnLK>?</IgnLK>

 

If EmpID does not have any local knowledge for the region of the job, this will be ignored. (0x400)

(error)

 

 

 

<IgnContract>?</IgnContract>

 

If  new position for the job is outside its required contract hours (SLA only), this will be ignored. (0x10000)

(error)

 

 

 

<IgnSkill>?</IgnSkill>

 

If EmpID does not have all the required skills, at the required level, for the job, this will be ignored. (0x800)

(error)

 

 

 

<IgnStatus>?</IgnStatus>

 

If the job currently has status other than SPDS_Tentative, this will be ignored. (0x20000)

(error)

 

 

 

<IgnSpares>?</IgnSpares>

 

If the job requires spares that EmpID does not have, this will be ignored (0x40000)

(error)

 

 

 

<IgnMaxOvertime>?</IgnMaxOvertime>

 

If the new job position would take EmpID over his defined maximum allowed over time, this will be ignored (0x80000)

(error)

 

 

 

<IgnAppointment>?</IgnAppointment>

 

If new position for the job is outside the period Earliest time to Latest time (appoinments only), this will be ignored (0x200000)

(error)

 

 

 

<IgnServiceHours>?</IgnServiceHours>

 

If new position for the job is outside the defined Service Hours,including the Grace Period (SLAonly), this will be ignored. (0x400000)

(error)

 

 

 

<IgnAccessHours>?</IgnAccessHours>

 

If new start time (or end time if CallToFix) for the job is outside the defined open Access Hours, or within the defined closed Access Hours(SLA only), this will be ignored (0x800000)

(error)

 

 

 

<IgnCapacity>?</IgnCapacity>

 

Any capacity constraints on the day in question will be ignored. (0x8)

(error)

 

 

 

<IgnSched>?</IgnSched>

 

If  EmpID is marked as unschedulable this will be ignored (0x100).

(error)

 

 

 

<IgnShift>?</IgnShift>

 

If  EmpID is not on shift at the time of the job this will be ignored. (0x200)

(error)

 

 

</options>

 

 

 

 

</sp:DVForceFixJobRequest>

 

 

 

 

The startDateTime is local to what is specified in the tz_CJS database parameter.

This can be set such that startDateTime is local to the timezone of the region where the job is located, local to the timezone of the responsibility unit which contains the job, local to the employee that the job is allocated to, or local to a specified or default timezone.

Return Structure

The API returns the standard return structure.

Return Codes

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

 Click here to expand...
  • SP_OK (0)
  • SP_JOBID_INVALID (1)
  • SP_EMPID_INVALID (5)
  • SP_NO_TIME_AVAILABLE (8)
  • SP_DATE_INVALID (14)
  • SP_JOBTYPE_NOT_IN_DATE (49)
  • SP_JOBTYPE_CANNOT_BE_FORCED (51)
  • SP_OUTSIDE_HORIZON (53)
  • SP_EMP_NOT_SKILLED (75)
  • SP_STATUS_BACKWARDS (85)
  • SP_OVERLAPPED_JOBS (132)
  • SP_FORCEOPTIONS_INVALID (150)
  • SP_EMP_ZERO_LK (155)
  • SP_OVERLAPPED_STDACTS (160)
  • SP_OUTSIDE_FRU_POSTING (264)
  • SP_OUTSIDE_CONTRACT (266)
  • SP_EMP_NO_SPARES (267)
  • SP_EMP_MAXOVERTIME_EXCEEDED (268)
  • SP_CAPACITY_EXCEEDED (269)
  • SP_EMP_NOT_REQEMP (270)
  • SP_EMP_NO_SHIFT_ASS (271)
  • SP_SPARES_AND_NOT_TENTATIVE (272)
  • SP_EMP_NOT_SCHEDULABLE (273)
  • SP_EMP_NOT_ON_SHIFT (274)
  • SP_JOB_GT_LOGGEDON (275)
  • SP_OUTSIDE_APPOINTMENT (276)
  • SP_OUTSIDE_SERVICE_HOURS (404)
  • SP_OUTSIDE_ACCHOURS (423)
  • SP_AFTER_JEOPARDY_ETA (440)