Click HERE to see how Saviynt Intelligence is transforming the industry. |
11/17/2023 06:33 AM
Hi Team,
I need to send system timestamp in createaccountJSON for a REST connector in the following format -
17-Nov-23 19:58:26
Below is the JSON -
{
"accountIdPath": "accountName",
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "<URL>",
"httpMethod": "POST",
"httpParams": "{ \"XGUID\": \"${user.customproperty21}\", \"S3_USER_ID\": \"${user.username}\", \"PERSON_STATUS\": \"${com.adw.PersonStatus.Personstatus(user.customproperty49)}\", \"LAST_NAME\": \"${user.lastname}\", \"FIRST_NAME\": \"${user.firstname}\", \"EMAIL\": \"${user.email}\", \"S3_EMPLOYEE_TYPE\": \"${user.employeeType}\", \"COUNTRY_CODE\": \"${com.adw.CountryCodeConverter_2.convertToThreeLetterCode(user.customproperty3)}\", \"COMPANY\": \"${user.companyname}\", \"STREET\": \"${user.street}\", \"STATE\": \"${user.state}\", \"POSTAL_CODE\": \"${user.region}\", \"MANAGER_NAME\": \"${com.adw.ManagerData.Mdp(user.owner.toString())}\", \"MANAGER_XGUID\": \"${com.adw.ManagerData.xguid(user.owner.toString())}\", \"TIME_STAMP\": \"${com.adw.SystemDateCalculator.getFormattedSystemDate()}\", \"RECORD_TYPE\": \"NEW\", \"SOR\": \"${user.customproperty15}\", \"FEED_PK\": \"${user.customproperty40}\", \"PERSONNEL_NUMBER\": \"${user.employeeid}\" }",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"statusCode": [200]
}
}]
}
It is the http param - TIME_STAMP
11/17/2023 07:35 AM - edited 11/17/2023 07:59 AM
@anuragG : You can use ${Calendar.instance.format('dd-MMM-yy hh:mm:ss')}
If you want to use specific time zone then use below format
${Calendar.getInstance(TimeZone.getTimeZone("EST5EDT")).format("dd-MMM-yy hh:mm:ss")}
11/21/2023 06:07 AM
Hi @Saathvik Thanks for the help it worked. One Question- Is this method Saviynt specific. If yes is there any documentation for such?
11/21/2023 08:49 AM
@anuragG : No it is not saviynt specific. It is just a java/groovy script. Also please mark the respective solution so that it will help others who are looking for similar solution.