WSUser |
public GetUserDetailOut GetUserDetail( GetUserDetailIn input )
Caution |
---|
The EffectiveDate input parameter is key to successfully pulling effective dated items. If you’re not seeing a specific value returned, then double check its effective date to make sure it is valid. To get the most current live setting for a give effective dated item use todays date as the input parameter for the EffectiveDate value. |
Note |
---|
To improve the performance and responsiveness of the GetUserDetail(GetUserDetailIn) call it is recommend to set the
Enable*Data (i.e EnableAccrualsData, EnableRatesData, etc.) properties to false for each specific section if the data is not going to be used.
This model is a full detail of a user. For light-weight fast calls please see GetUserBasic(GetUserBasicIn) call |
Name | Description | Values Example |
---|---|---|
SELECT-ALL | Returns all users in system regardless of any state. | [ignored] |
SELECT-EMPID | Returns only the users with the specified employee ID passed in the values property. | "abc-123","123","efg"... |
SELECT-USERID | Returns only the users with the specified user ID passed in the values property. | "1234","12","5"... |
SELECT-BADGE | Returns only the users with the specified badge ID passed in the values property. | "abc","123-1B","111"... |
SELECT-LNAME | Returns only the users with the specified case insensitive last name passed in the values property. | "Smith","jones","Adams"... |
//EXAMPLE 1: Return all users in the system. { "AuthToken":"...", "EffectiveDate":"\/Date(1435734000000-0700)\/", "EnableAccrualsData":true, "EnableCustomFieldsData":true, "EnableRatesData":true, "DataAction":{ "Name":"SELECT-ALL", "Values":[] } } //EXAMPLE 2: Return only the employees based on empID { "AuthToken":"...", "EffectiveDate":"\/Date(1435734000000-0700)\/", "EnableAccrualsData":true, "EnableCustomFieldsData":true, "EnableRatesData":true, "DataAction":{ "Name":"SELECT-EMPID", "Values":["444-123", "555-125a", "12345", "46789"] } } //EXAMPLE 3: Return all employees and filter the results to only show those //who live in the state of Arizona { "AuthToken":"...", "EffectiveDate":"\/Date(1435734000000-0700)\/", "EnableAccrualsData":true, "EnableCustomFieldsData":true, "EnableRatesData":true, "DataAction":{ "Name":"SELECT-ALL", "Values":[] }, "DataFilter":{ "Name":"BY-STATE", "HideValues":false, "Values":["AZ"] } }
//EXAMPLE JSON RESPONSE { "Report": { "ProcessTime": "0.1534092", "RequestTime": "/Date(1434409666309-0700)/", "ResponseTime": "/Date(1434409666462-0700)/", "Results": 1 }, "Results": [ { "Profile": { "Address1": "1234 Main Street", "Address2": "Apt 1001", "AlertEmail": "", "Badge": "222", "City": "Scottsdale", "Email": "grantc@somecompany.com", "EmpIdentifier": "1234", "FirstName": "Shanna", "LastName": "Banana", "Manager": "", "ManagerEffDate": "/Date(-2208963600000-0700)/", "ManagerID": "", "MiddleName": "Q", "Phone1": "480-296-0400", "Phone2": "", "Phone3": "", "PostalCode": "85250", "StartDate": "/Date(-2044803600000-0700)/", "State": "AZ", "Status": "Active", "StatusEffDate": "/Date(-2044803600000-0700)/", "TimeZoneKey": "US Mountain Standard Time", "Title": "", "UserID": 3, "WebLogin": "Shanna" }, "Policies": { "CallBack": "", "CallBackEffDate": "/Date(-2208963600000-0700)/", "CallBackID": 0, "Exceptions": "Basic", "ExceptionsEffDate": "/Date(1433142000000-0700)/", "ExceptionsID": 2, "FAT": "admin", "FATEffDate": "/Date(1370847600000-0700)/", "Groups": { "Employee": [ "Group 9876" ], "Manager": [ "Group 1234" ], "Primary": null }, "HolidayList": null, "HolidayListEffDate": "/Date(-2208963600000-0700)/", "HolidayListID": 0, "IPAccess": "", "Password": "Default", "Payroll": "Daily", "PayrollEffDate": "/Date(1306911600000-0700)/", "Preference": "Standard", "ScheduleTemplate": "", "ScheduleTemplateEffDate": "/Date(-2208963600000-0700)/", "ShiftDiff": "", "ShiftDiffEffDate": "/Date(1304406000000-0700)/" }, "Rates": { "ChargeRate": "0.0000", "ChargeRateEffDate": "/Date(-2208963600000-0700)/", "ExemptStatus": null, "ExemptStatusEffDate": "/Date(-62135571600000-0700)/", "PayRate": "34.0000", "PayRateEffDate": "/Date(1309849200000-0700)/", "SalaryType": null, "SalaryTypeEffDate": "/Date(-62135571600000-0700)/" }, "Accruals": { "AccrualsStartDate": "/Date(1207033200000-0700)/", "AdditionalMonthsOfService": 0, "TimeOffAccruals": "AZ Policy", "TimeOffAccrualsEffDate": "/Date(1346569200000-0700)/" }, "Access": { "KioskPunchingAllowed": true, "MobileEnforceIPPolicies": false, "MobileGeolocPunchTrack": true, "MobileGeolocPunchTrackOnly": false, "MobilePunchingAllowed": true, "WebPunchingAllowed": true, "WebSystemAccessAllowed": true }, "CustomFields": [ { "Name": "Mobile Phone Provider", "Type": 0, "Value": "T-Mobile" }, { "Name": "License Type", "Type": 0, "Value": "" }, { "Name": "License Exp.", "Type": 1, "Value": "" }, { "Name": "Certification", "Type": 1, "Value": "" }, { "Name": "Laptop Manufacturer", "Type": 0, "Value": "Select One" } ] } ] }
// ================================== //TEST 1: SELECT-ALL int countTest_1 = 0; SoapServiceV2.GetUserDetailRequest request1 = new SoapServiceV2.GetUserDetailRequest(); request1.input = new SoapServiceV2.GetUserDetailIn { AuthToken = AuthToken, DataAction = new DataAction { Name = "SELECT-ALL", }, EffectiveDate=DateTime.Now }; SoapServiceV2.GetUserDetailResponse response1 = client.GetUserDetail(request1); countTest_1 = (response1.GetUserDetailResult.Results != null) ? response1.GetUserDetailResult.Results.Count : 0; // ================================== //TEST 2: SELECT-USERID int countTest_2 = 0; SoapServiceV2.GetUserDetailRequest request2 = new SoapServiceV2.GetUserDetailRequest(); request2.input = new SoapServiceV2.GetUserDetailIn { AuthToken = AuthToken, DataAction = new DataAction { Name = "SELECT-USERID", Values = new List<string></string>() { response1.GetUserDetailResult.Results[0].Profile.UserID.ToString(), response1.GetUserDetailResult.Results[1].Profile.UserID.ToString() } }, EffectiveDate=DateTime.Now }; SoapServiceV2.GetUserDetailResponse response2 = client.GetUserDetail(request2); countTest_2 = (response2.GetUserDetailResult.Results != null) ? response2.GetUserDetailResult.Results.Count : 0; Assert.IsTrue(countTest_2 > 0 && countTest_1 > 0);