Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 12:55 PM
Is there any way to convert date format for account fields mapping - CREATED_ON and LASTLOGONDATE, while importing accounts?
XML Response from REST API:
<CREATION_DATE>2020-04-02T01:01:01Z</CREATION_DATE> <LAST_LOGIN_DATE>2020-04-02T01:01:01Z</LAST_LOGIN_DATE>
Mapping of these 2 fields in ImportAccountEntJSON:
"colsToPropsMap": { "accountID": "USER_ID~#~char", "name": "USER_LOGIN~#~char", "status": "USER_STATUS~#~char", "CREATED_ON": "CREATION_DATE~#~date", "LASTLOGONDATE": "LAST_LOGIN_DATE~#~date",
I have tried 3 datatypes and it doesn't work i.e. accounts created_on field value is empty after accounts import:
1. "CREATED_ON": "CREATION_DATE~#~customDate--yyyy-MM-dd'T'HH:mm:ss'Z'"
2. "CREATED_ON": "CREATION_DATE~#~char"
3. "CREATED_ON": "CREATION_DATE~#~date"
But if I just map it with any customproperty of account using char datatype, it works.
Now my requirement is to map it directly with the out-of-the-box field - create_on. Is it possible please?
Solved! Go to Solution.
04/12/2022 01:52 PM
Hi Ramanpreet,
You need to specify a separate attribute called globalSettings where you can provide the date format that coming in API response body as below.
"globalSettings": {
"dateFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
SSM will now able to convert the incoming date format into consumable format i.e. "yyyy-MM-dd HH:mm:ss".
The below mapping can be used to map date type mappings in colsToPropsMap.
"CREATED_ON": "CREATION_DATE~#~date"
Also, please find the sample JSON as an attachment for reference.
04/12/2022 01:52 PM
Hi Khalid,
Thank you very much. It works perfectly.
Please see attached screenshot.
The only thing is in accounts its showing dates in MM-dd-yyyy format instead of dd-MM-yyyy which can be confusing for non-USA users such as in the UK. Is it possible to change the display format?
04/12/2022 01:52 PM
I just found out there is an option in Global configurations-> Common -> Select Date Format
I will play with it and will see it works
04/12/2022 01:52 PM
So 5.5.0 have the option to select dd-MM-yyyy option and it works.
All sorted now.