You are viewing an old version of this content. View the current version.
Compare with Current
View Version History
« Previous
Version 45
Next »
On This Page:
Related Pages:
The sp:EmpRestoreRequest API method can be used to restore an operative's shift and/or locations.
Description
Shifts and locations can be restored to their original values by the removal of any overrides.
A public holiday is restored as a holiday; i.e. the operative’s shift pattern won’t be restored. If an operative has assigned jobs on a public holiday, the call will succeed and return SP_OK_JOBS_ON_HOLIDAY (328)
. The jobs won’t be de-allocated, but, unless they are fixed, or have a status > tentative, the Optimizer may de-allocate them when it next runs if it can’t re-allocate them.
Similarly, if an operative has assigned jobs on a no-shift day, the call to sp:EmpRestoreRequest
will succeed and return SP_OK_JOBS_ON_NO_SHIFT (329)
. The jobs won’t be de-allocated, but, unless they are fixed or have a status > tentative, the Optimizer may de-allocate them when it next runs if it can’t re-allocate them.
Definition
The definition of this API is:
Click here to expand...
Web Service | Type | Description | Req? | Val? |
<sp:EmpRestoreRequest>
| | | | |
| <empID>?</empID>
| EmpID
| The operative’s ID | 
| 
|
| <date>?</date>
|
| The date that the override is on | 
| |
| <options>
|
| | | |
| | <RestoreShift>?</RestoreShift>
| | If RestoreShift is set then the shift override on Date will be removed from the operative EmpID. This will have the effect of restoring the shift period, if there is one, from his assigned shift pattern, if there is one, for that Date; previous overrides will be lost. | | |
| | <RestoreLocs>?</RestoreLocs>
|
| If RestoreLocs is set then the locations overridden on Date will be removed from the operative EmpID. This will have the effect of restoring the original start, end and Local Knowledge Centroid locations for that Date; previous overrides will be lost. | | |
| </options>
|
| | | |
</sp:EmpRestoreRequest>
|
| | | |
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_EMPID_INVALID (5)
SP_DATE_INVALID (14)
SP_OUTSIDE_HORIZON (53)
SP_OPTIONS_INVALID (80)
SP_EMP_NOT_IN_TEAM (124)
SP_EMPID_DOES_NOT_EXIST (231)
SP_OK_JOBS_ON_HOLIDAY (328)
SP_OK_JOBS_ON_NO_SHIFT (329)
SP_SHIFTS_WOULD_OVERLAP (344)
SP_SHIFTS_TOO_CLOSE (345)
SP_OK_WITH_OVERLAPS (373)
SP_SO_NWD_TOO_SHORT (551)
SP_SO_ADJ_IN_SHIFT (558)
SP_OK_NO_SHIFT_OVERRIDE (560)
SP_OK_NO_LOC_OVERRIDES (561)
SP_NO_RESTORES (562)
SP_OK_CAPACITY_EXCEEDED (640)
SP_BREAKTYPE_INVALID (650)