Service |
public GetUserLaborLevelOut GetUserLaborLevel( GetUserLaborLevelIn input )
Note |
---|
The returned AssignID property from this calls is used on calls such as DeleteUserLaborLevel(DeleteUserLaborLevelIn). In the case of DeleteUserLaborLevel(DeleteUserLaborLevelIn) the IDList property could take in a list of AssignID. |
Note |
---|
Business Rules: Labor levels are used to create a structure for labor distribution, job costing and reporting. Labor-level-details track where employees spend their time. Employees are only able punch against specific labor-level-details to which they are assigned. Employees can be assigned to home or default labor-level-details by which they can be automatically assigned when accessing specific interfaces. Labor-levels (GetLaborLevelModel) are merely group containers for labor-level-details (GetLaborLevelDetailModel); basically a GetLaborLevelDetailModel is a child element of GetLaborLevelModel. Setup: Manager > Employees > Labor Levels Configuration > Imports > New Employee Defaults Configuration > Labor Levels > Define (Labor Levels GetLaborLevelModel) Configuration > Labor Levels > Setup (Labor Levels Details GetLaborLevelDetailModel) |
Caution |
---|
When "Implied Labor Level Hierarchy" is enabled it will change the way in which labor levels are displayed for a given users. See Configuration > Labor Levels Hierarchy (which is enabled from the General Configuration interface). |
//EXAMPLE 1 GetUserLaborLevel: Return all users in the system. { "AuthToken":"...", "EffectiveDate":"\/Date(1435734000000-0700)\/", "EnableHierarchyData":true, "EnableChargeRateHistory":true, "EnablePayRateHistory":true, "DataAction":{ "Name":"SELECT-ALL", "Values":[] } } //EXAMPLE 2 GetUserLaborLevel: Return only the employees based on empID { "AuthToken":"...", "EffectiveDate":"\/Date(1435734000000-0700)\/", "DataAction":{ "Name":"SELECT-EMPID", "Values":["444-123", "555-125a", "12345", "46789"] } }
//Example JSON Response { "Report": { "ProcessTime": "0.3433623", "RequestTime": "/Date(1440619700592-0700)/", "ResponseTime": "/Date(1440619700936-0700)/", "Results": 1 }, "Results": [ { "EmpIdentifier": "1234", "AssignedLaborLevelDetails": [ { "AssignID": 4541, "ChargeRate": 33.55, "ChargeRateHistory": [ { "EndDateTime": "/Date(928220399000-0700)/", "StartDateTime": "/Date(928134000000-0700)/", "Value": 14 }, { "EndDateTime": "/Date(4102556399000-0700)/", "StartDateTime": "/Date(1607065200000-0700)/", "Value": 33.55 } ], "Code": "10", "EffDate": "/Date(-2208963600000-0700)/", "ID": 3, "Name": "Manufacturing", "ParentID": 89, "PayRate": 14.87, "PayRateHistory": [ { "EndDateTime": "/Date(1607065199000-0700)/", "StartDateTime": "/Date(1543734000000-0700)/", "Value": 14.87 }] }, { "AssignID": 4547, "ChargeRate": 105.98, "ChargeRateHistory": null, "Code": "CO", "EffDate": "/Date(1251788400000-0700)/", "ID": 1, "Name": "Colorado", "ParentID": 90, "PayRate": 16.16, "PayRateHistory": null } ], "HomeLaborLevelDetails": { "LL01Code": "10", "LL01EffDate": "/Date(-2208963600000-0700)/", "LL01ID": 3, "LL01Name": "Manufacturing", "LL01ParentID": 89, "LL02Code": "CO", "LL02EffDate": "/Date(1251788400000-0700)/", "LL02ID": 1, "LL02Name": "Colorado", "LL02ParentID": 90, "LL03Code": "100", "LL03EffDate": "/Date(1251788400000-0700)/", "LL03ID": 5, "LL03Name": "Admin", "LL03ParentID": 91, "LL04Code": "10020", "LL04EffDate": "/Date(1251788400000-0700)/", "LL04ID": 16, "LL04Name": "10020", "LL04ParentID": 127, "LL05Code": null, "LL05EffDate": "/Date(-62135571600000-0700)/", "LL05ID": 0, "LL05Name": null, "LL05ParentID": 0, "LL06Code": null, "LL06EffDate": "/Date(-62135571600000-0700)/", "LL06ID": 0, "LL06Name": null, "LL06ParentID": 0, "LL07Code": null, "LL07EffDate": "/Date(-62135571600000-0700)/", "LL07ID": 0, "LL07Name": null, "LL07ParentID": 0, "LL08Code": null, "LL08EffDate": "/Date(-62135571600000-0700)/", "LL08ID": 0, "LL08Name": null, "LL08ParentID": 0, "LL09Code": null, "LL09EffDate": "/Date(-62135571600000-0700)/", "LL09ID": 0, "LL09Name": null, "LL09ParentID": 0, "LL10Code": null, "LL10EffDate": "/Date(-62135571600000-0700)/", "LL10ID": 0, "LL10Name": null, "LL10ParentID": 0, "LL11Code": null, "LL11EffDate": "/Date(-62135571600000-0700)/", "LL11ID": 0, "LL11Name": null, "LL11ParentID": 0, "LL12Code": null, "LL12EffDate": "/Date(-62135571600000-0700)/", "LL12ID": 0, "LL12Name": null, "LL12ParentID": 0, "LL13Code": null, "LL13EffDate": "/Date(-62135571600000-0700)/", "LL13ID": 0, "LL13Name": null, "LL13ParentID": 0, "LL14Code": null, "LL14EffDate": "/Date(-62135571600000-0700)/", "LL14ID": 0, "LL14Name": null, "LL14ParentID": 0, "LL15Code": null, "LL15EffDate": "/Date(-62135571600000-0700)/", "LL15ID": 0, "LL15Name": null, "LL15ParentID": 0 }, "HierarchyLaborLevelDetails": [ { "Code": "10", "EffDate": "/Date(-2208963600000-0700)/", "ID": 3, "ParentID": 89, "Name": "Manufacturing", "Child": [ { "Code": "CO", "EffDate": "/Date(1251788400000-0700)/", "ID": 1, "ParentID": 90, "Name": "Colorado", "Child": [ { "Code": "100", "EffDate": "/Date(1251788400000-0700)/", "ID": 5, "ParentID": 91, "Name": "Admin", "Child": [] }, { "Code": "200", "EffDate": "/Date(1435734000000-0700)/", "ID": 4, "ParentID": 91, "Name": "Sales", "Child": [] } ] }, { "Code": "AZ", "EffDate": "/Date(1330585200000-0700)/", "ID": 2, "ParentID": 90, "Name": "Arizona", "Child": [ { "Code": "200", "EffDate": "/Date(1435734000000-0700)/", "ID": 4, "ParentID": 91, "Name": "Sales", "Child": [] } ] } ] }, { "Code": "20", "EffDate": "/Date(1332054000000-0700)/", "ID": 6, "ParentID": 89, "Name": "Software", "Child": [ { "Code": "AZ", "EffDate": "/Date(1330585200000-0700)/", "ID": 2, "ParentID": 90, "Name": "Arizona", "Child": [] } ] } ] } ] }
// ================================== //TEST 1: SELECT-EMPID int countTest_1 = 0; SoapServiceV2.GetUserLaborLevelRequest request1 = new SoapServiceV2.GetUserLaborLevelRequest(); request1.input = new SoapServiceV2.GetUserLaborLevelIn { AuthToken = AuthToken, DataAction = new DataAction { Name = "SELECT-EMPID", Values = new List<string>() { "82" } }, EffectiveDate = new DateTime(2015, 1, 15) }; SoapServiceV2.GetUserLaborLevelResponse response3 = client.GetUserLaborLevel(request1); countTest_1 = (response3.GetUserLaborLevelResult.Results != null) ? response3.GetUserLaborLevelResult.Results.Count : 0; Assert.IsTrue(countTest_1 > 0);