Get Capacity Statistics SOAP API
- Jason Andrew
The sp:GetCapacityStatsRequest
API method can be used to obtain daily statistics about the capacity for jobs in the system, either for one or more specific FRU, or for all FRUs in the system.
Description
The sp:GetCapacityStatsRequest
API method returns statistics about job capacity in the system, at a daily level.
Definition
The definition of this API is:
Web Service | Type | Description | Req? | Val? | ||||
|
|
|
| |||||
| <FRUs>?</FRUs> | The FRUs field may be supplied zero or more times.
| ||||||
<iruLevel>?</iruLevel> | boolean | When set to Default value is false. | ||||||
<teamLevel>?</teamLevel> | boolean | When set to Default value is | ||||||
<startDate>?</startDate> | spDate | The inclusive start date of the date range for which capacity information should be returned.
| ||||||
<endDate>?</endDate> | spDate | The inclusive end date of the date range for which capacity information should be returned. | ||||||
</sp:GetCapacityStatsRequest> |
Return Structure
The API returns a non-standard return structure.
Web Service | Type | Description | Req? | Val? | ||||||||
|
|
|
| |||||||||
| A structure containing details of the success or failure of the API call. | |||||||||||
<type>?</type> | string | The Return Code name, representing the result of the API call. | ||||||||||
<code>?</code> | int | The Return Code number, representing the result of the API call. | ||||||||||
</result> | ||||||||||||
<capacityStatsResponse> | This structure is only returned when the API call does not return an error Return Code. | |||||||||||
<capacityStatsPerDate> | One or more capacityStatsPerDate structures will be present, with each describing the job capacity for a single day. | |||||||||||
<Date>?</Date> | spDate | The date for which the parent capacityStatsPerDate structure relates to. | ||||||||||
<capacityStatForAllFru> | This structure contains total job capacity for all FRUs contained within the response, for the day of the parent capacityStatsPerDate structure. | |||||||||||
<shiftTime>?</shiftTime> | int | For all FRUs in the response, the total number of minutes in all shifts, including shifts override time, excluding break time, and excluding allowed overtime. | ||||||||||
<allowedOvertime>?</allowedOvertime> | int | For all FRUs in the response, the total number of minutes of allowed overtime. | ||||||||||
<breakTime>?</breakTime> | int | For all FRUs in the response, the total number of minutes of break time. | ||||||||||
<saTime>?</saTime> | int | For all FRUs in the response, the total number of minutes of standard activity time, excluding travel time and excluding break time.
| ||||||||||
<jobTime>?</jobTime> | int | For all FRUs in the response, the total number of minutes of job time, excluding travel time and excluding break time. | ||||||||||
<travelTime>?</travelTime> | int | For all FRUs in the response, the total number of minutes of travel time for all jobs, including travel home time, including SA travel, excluding travel in overtime, and excluding travel outside shift time. | ||||||||||
<overTimeUsed>?</overTimeUsed> | int | For all FRUs in the response, the total number of minutes of used overtime, excluding travel time. | ||||||||||
<outShiftTimeUsed>?</outShiftTimeUsed> | int | For all FRUs in the response, the total number of minutes of used outside shift time, excluding travel time. | ||||||||||
<travelInOverTime>?</travelInOverTime> | int | For all FRUs in the response, the total number of minutes of travel time occurring in overtime. | ||||||||||
<travelOutsideShift>?</travelOutsideShift> | int | For all FRUs in the response, the total number of minutes of travel time occurring in outside shift time. | ||||||||||
</capacityStatForAllFru> | ||||||||||||
| One or more | |||||||||||
<FRU>?</FRU> | FRUID | The ID of the FRU to which the parent capacityStatPerFru structure relates to. | ||||||||||
<capacityStatsFru> | ||||||||||||
<shiftTime>?</shiftTime> | int | For the FRU, the total number of minutes in all shifts, including shifts override time, excluding break time, and excluding allowed overtime. | ||||||||||
<allowedOvertime>?</allowedOvertime> | int | For the FRU, the total number of minutes of allowed overtime. | ||||||||||
<breakTime>?</breakTime> | int | For the FRU, the total number of minutes of break time. | ||||||||||
<saTime>?</saTime> | int | For the FRU, the total number of minutes of standard activity time, excluding travel time and excluding break time. | ||||||||||
<jobTime>?</jobTime> | int | For the FRU, the total number of minutes of job time, excluding travel time and excluding break time. | ||||||||||
<travelTime>?</travelTime> | int | For the FRU, the total number of minutes of travel time for all jobs, including travel home time, including SA travel, excluding travel in overtime, and excluding travel outside shift time. | ||||||||||
<overTimeUsed>?</overTimeUsed> | int | For the FRU, the total number of minutes of used overtime, excluding travel time. | ||||||||||
<outShiftTimeUsed>?</outShiftTimeUsed> | int | For the FRU, the total number of minutes of used outside shift time, excluding travel time. | ||||||||||
<travelInOverTime>?</travelInOverTime> | int | For the FRU, the total number of minutes of travel time occurring in overtime. | ||||||||||
<travelOutsideShift>?</travelOutsideShift> | int | For the FRU, the total number of minutes of travel time occurring in outside shift time. | ||||||||||
</capacityStatsFru> | ||||||||||||
| When the iruLevel or teamLevel parameter in the API call was set to true, then one or more capacityStatPerIru structures will be present, with each describing the job capacity for a single IRU of the FRU of the parent capacityStatPerFru structure, for the day of the parent capacityStatsPerDate structure. | |||||||||||
<IRU>?</IRU> | IRUID | The ID of the IRU to which the parent capacityStatPerIru structure relates to. | ||||||||||
<capacityStatsIru> | ||||||||||||
<shiftTime>?</shiftTime> | int | For the IRU, the total number of minutes in all shifts, including shifts override time, excluding break time, and excluding allowed overtime. | ||||||||||
<allowedOvertime>?</allowedOvertime> | int | For the IRU, the total number of minutes of allowed overtime. | ||||||||||
<breakTime>?</breakTime> | int | For the IRU, the total number of minutes of break time. | ||||||||||
<saTime>?</saTime> | int | For the IRU, the total number of minutes of standard activity time, excluding travel time and excluding break time. | ||||||||||
<jobTime>?</jobTime> | int | For the IRU, the total number of minutes of job time, excluding travel time and excluding break time. | ||||||||||
<travelTime>?</travelTime> | int | For the IRU, the total number of minutes of travel time for all jobs, including travel home time, including SA travel, excluding travel in overtime, and excluding travel outside shift time. | ||||||||||
<overTimeUsed>?</overTimeUsed> | int | For the IRU, the total number of minutes of used overtime, excluding travel time. | ||||||||||
<outShiftTimeUsed>?</outShiftTimeUsed> | int | For the IRU, the total number of minutes of used outside shift time, excluding travel time. | ||||||||||
<travelInOverTime>?</travelInOverTime> | int | For the IRU, the total number of minutes of travel time occurring in overtime. | ||||||||||
<travelOutsideShift>?</travelOutsideShift> | int | For the IRU, the total number of minutes of travel time occurring in outside shift time. | ||||||||||
</capacityStatsIru> | ||||||||||||
<capacityStatPerTeam> | When the teamLevel parameter in the API call was set to true, then one or more capacityStatPerTeam structures will be present, with each describing the job capacity for a single team of the IRU of the parent capacityStatPerIru structure, for the FRU of the parent capacityStatPerFru structure, for the day of the parent capacityStatsPerDate structure. | |||||||||||
<teamID>?</teamID> | TeamID | The ID of the team to which the parent capacityStatPerTeam structure relates to. | ||||||||||
<CapacityStatsTeam> | This structure contains total job capacity for all technicians contained within the team for the parent capacityStatPerTeam structure. | |||||||||||
<shiftTime>?</shiftTime> | int | For all technicians in the team, the total number of minutes in all shifts, including shifts override time, excluding break time, and excluding allowed overtime. | ||||||||||
<allowedOvertime>?</allowedOvertime> | int | For all technicians in the team, the total number of minutes of allowed overtime. | ||||||||||
<breakTime>?</breakTime> | int | For all technicians in the team, the total number of minutes of break time. | ||||||||||
<saTime>?</saTime> | int | For all technicians in the team, the total number of minutes of standard activity time, excluding travel time and excluding break time. | ||||||||||
<jobTime>?</jobTime> | int | For all technicians in the team, the total number of minutes of job time, excluding travel time and excluding break time. | ||||||||||
<travelTime>?</travelTime> | int | For all technicians in the team, the total number of minutes of travel time for all jobs, including travel home time, including SA travel, excluding travel in overtime, and excluding travel outside shift time. | ||||||||||
<overTimeUsed>?</overTimeUsed> | int | For all technicians in the team, the total number of minutes of used overtime, excluding travel time. | ||||||||||
<outShiftTimeUsed>?</outShiftTimeUsed> | int | For all technicians in the team, the total number of minutes of used outside shift time, excluding travel time. | ||||||||||
<travelInOverTime>?</travelInOverTime> | int | For all technicians in the team, the total number of minutes of travel time occurring in overtime. | ||||||||||
<travelOutsideShift>?</travelOutsideShift> | int | For all technicians in the team, the total number of minutes of travel time occurring in outside shift time. | ||||||||||
</CapacityStatsTeam> | ||||||||||||
| One or more | |||||||||||
<empID>?</empID> | EmpID | The ID of the technician to which the parent capacityStatPerTechnician structure relates to. | ||||||||||
<empName>?</empName> | EmpName | The technician's full name. | ||||||||||
<empSurname>?</empSurname> | EmpSurname | The technician's surname. | ||||||||||
<capacityStats> | ||||||||||||
<shiftTime>?</shiftTime> | int | For the technician, the total number of minutes in all shifts, including shifts override time, excluding break time, and excluding allowed overtime. | ||||||||||
<allowedOvertime>?</allowedOvertime> | int | For the technician, the total number of minutes of allowed overtime. | ||||||||||
<breakTime>?</breakTime> | int | For the technician, the total number of minutes of break time. | ||||||||||
<saTime>?</saTime> | int | For the technician, the total number of minutes of standard activity time, excluding travel time and excluding break time. | ||||||||||
<jobTime>?</jobTime> | int | For the technician, the total number of minutes of job time, excluding travel time and excluding break time. | ||||||||||
<travelTime>?</travelTime> | int | For the technician, the total number of minutes of travel time for all jobs, including travel home time, including SA travel, excluding travel in overtime, and excluding travel outside shift time. | ||||||||||
<overTimeUsed>?</overTimeUsed> | int | For the technician, the total number of minutes of used overtime, excluding travel time. | ||||||||||
<outShiftTimeUsed>?</outShiftTimeUsed> | int | For the technician, the total number of minutes of used outside shift time, excluding travel time. | ||||||||||
<travelInOverTime>?</travelInOverTime> | int | For the technician, the total number of minutes of travel time occurring in overtime. | ||||||||||
<travelOutsideShift>?</travelOutsideShift> | int | For the technician, the total number of minutes of travel time occurring in outside shift time. | ||||||||||
</capacityStats> | ||||||||||||
</capacityStatPerTechnician> | ||||||||||||
</capacityStatPerTeam> | ||||||||||||
</capacityStatPerIru> | ||||||||||||
</capacityStatPerFru> | ||||||||||||
</capacityStatsPerDate> | ||||||||||||
</capacityStatsResponse> | ||||||||||||
</sp:GetCapacityStatsResponse> |
Notes
Standard Activities
If a standard activity's time is longer than the time of the shift in which it is contained, then the shift time excluding break time is returned as the standard activity time.
Overlapping Items
The total time of all individual jobs, standard activities etc. are counted, even if there is some degree of item overlap.
Return Codes
In addition to the Standard Return Codes, the possible Return Codes from this API are:
SP_END_NOT_GE_START_DATE (19)
SP_UNIT_INVALID (28)
SP_OUTSIDE_HORIZON (53)
SP_START_DATE_INVALID (55)
SP_END_DATE_INVALID (56)
SP_FRU_UNAVAILABLE (259)
SP_DATE_NOT_SUPPLIED (638)
SP_DUPLICATE_FRUID (811)
SP_DATERANGE_GT_MAX_DAYS_STATS (812)
SP_NOT_ALL_FRU_RESPOND (813)