Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/17/2024 09:37 PM - edited 06/17/2024 09:40 PM
Hi,
A user was imported from our HR API connection the other day with a username of:
${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse("yyyy-MM-dd",response.start_date).getTime()){return response.payroll_id;}}
It's the first time it has occured, 5 months have past since go live. Config is below, any ideas of why this may have occured?
TIA
{
"connection": "userAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://URL?limit=50&page=1",
"httpMethod": "GET",
"httpHeaders": {
"app_key": "ddd",
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "#CONST#${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse(\"yyyy-MM-dd\",response.start_date).getTime()){return response.payroll_id;}}~#~char",
"systemUserName": "payroll_id~#~char",
"firstname": "first_name~#~char",
"displayname": "#CONST#${response.preferred_name ? response.surname+', '+response.preferred_name : response.surname+', '+response.first_name}~#~char",
"preferedFirstName": "preferred_name~#~char",
"middlename": "middle_name~#~char",
"lastname": "surname~#~char",
"employeeid": "#CONST#${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse(\"yyyy-MM-dd\",response.start_date).getTime()){return response.payroll_id;}}~#~char",
"title": "title~#~char",
"customproperty1": "primary_payroll_id~#~char",
"startdate": "start_date~#~char",
"termDate": "termination_date~#~char",
"employeeType": "#CONST#${((response.occupancy[0].employee_status_code=='ZZ')?'Consultant': ((response.occupancy[0].employee_status_code=='SP')?'Third Party':'City Employee'))}~#~char",
"companyname": "#CONST#Company Name~#~char",
"jobCode": "occupancy[0].position.position_id~#~char",
"jobCodedesc": "occupancy[0].position.position_title~#~char",
"customproperty24": "terminated~#~char",
"manager": "line_leader[0].payroll_id~#~char",
"customproperty2": "occupancy[0].employee_status_code~#~char",
"customproperty3": "occupancy[0].employee_status~#~char",
"customproperty12": "work_phone~#~char",
"phonenumber": "mobile~#~char",
"customproperty4": "termination_reason_code~#~char",
"costcenter": "Orgstructure.cost_centre_code~#~char",
"customproperty5": "Orgstructure.cost_centre~#~char",
"departmentNumber": "Orgstructure.directorate_code~#~char",
"departmentname": "Orgstructure.directorate~#~char",
"customproperty6": "Orgstructure.branch_code~#~char",
"customproperty7": "Orgstructure.branch~#~char",
"customproperty10": "Orgstructure.section~#~char",
"customproperty11": "Orgstructure.section_code~#~char",
"customproperty13": "Orgstructure.subsection~#~char",
"customproperty16": "classification_code~#~char",
"customproperty17": "delegation[0].position_id~#~char",
"customproperty19": "line_leader[0].position_id~#~char",
"customproperty20": "leave_approver[0].payroll_id~#~char",
"customproperty21": "occupancy[0].position.position_status_code~#~char",
"customproperty22": "occupancy[0].position.position_status~#~char",
"customproperty8": "current~#~char",
"customproperty9": "new~#~char",
"doNotDisturbDelegate": "NULL~#~char",
"location": "area~#~char",
"locationnumber": "area_code~#~char",
"customproperty18": "delegation[0].payroll_id~#~char"
},
"statusConfig": {
"active": "false",
"inactive": "true"
},
"userResponsePath": "employees",
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.objectList?.size()>0?'https://URL?limit=50&page='+Math.addExact(response.completeResponseMap.pagination.current_page,1):nu...}"
}
}
}
06/17/2024 10:11 PM
Hi @Huddos , is the response_startdate empty or not in the format to be used in the function which you have defined?
As it couldn't resolve the script.
06/17/2024 10:23 PM - edited 06/17/2024 11:00 PM
Hi NM,
Each user has a startdate from a dump I have taken of users exposed in HR API. So your saying potentially there may be an invalid date causing it to return incorrect information?
Update: All dates are valid in start_date
06/18/2024 08:19 PM
Print start date in one of the customproperty and validate format or null check