There are many L2L reports that include data for Labor Costs. We also provide APIs to retrieve labor costs for Work Orders and Dispatches.
Labor Costs are attributed to both Work Orders and Dispatches. It is important to understand the relationship between Work Order costs and Dispatch costs, since costs are frequently shared between the two.
Inside a Work Order, you can schedule labor. Actual labor minutes are never stored in a Work Order, however. When a Work Order is ready to be completed, a Dispatch is launched from the Work Order. This creates a hard link between the Work Order and its Dispatch. Once a Dispatch is launched, all Labor minutes are recorded on the Dispatch.
The following APIs can be used to report Work Order and Dispatch Labor costs:
Dispatch Labor Costs
Use this process to gather labor records for a Dispatch. Since Work Orders do not contain labor records, use this process to retrieve labor records for a Work Order as well.
Objective: Retrieve labor costs from a Dispatch
Process Outline:
- Retrieve all Dispatch Technician records for a Dispatch
GET https://[customer].leading2lean.com/api/1.0/dispatchtechnicians/?auth=[api key]&site=[site id]&dispatchnumber=[dispatch number]&completed__isnull=false
- Sum the
resourcecost
properties of all the records to calculate the total labor cost of the dispatch
Work Order Labor Costs
Work Orders labor records are stored in a Dispatch after a Work Order as been launched. Follow this outline to identify the Dispatch that is linked to a Work Order, then use the process above to gather labor costs from a Dispatch.
Objective: Retrieve labor costs from a Work Order
Process Outline:
- Identify the Dispatch ID that is linked to the Work Order
GET https://[customer].leading2lean.com/api/1.0/workorders/?auth=[api key]&site=[site id]&number=[work order number]
- Take note of the
dispatch
property. This is the Dispatch ID, and it will be used in the next step.
- Take note of the
- Identify the Dispatch number
GET https://[customer].leading2lean.com/api/1.0/dispatches/?auth=[api key]&site=[site id]&id=[dispatch id]
- The Dispatch number is the
dispatchnumber
property in the results.
- The Dispatch number is the
- Follow the Dispatch Labor Costs process above, using the Dispatch Number identified here.