Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Possible to use actionable analytics to generate disable account tasks based on date calc?

jralexander137
New Contributor III
New Contributor III

Hi I have a need to check the last logon value on an account's CustomProperty that has a date value stored as a unix timestamp and if its greater than 60 days in the past, disable the associated account. I believe this is possible leveraging actionable analytics report in some way but have read conflicting information on some forums post. That being said, is it possible to accomplish this via actionable analytics or is there some other better OOTB way?

If its possible, are there any examples of how to create the analytics query to pull the date from the CP, do a conversion from unix timestamp to a date and check to see if its 60 days in the past? Then generate a disable account task.

 

The only other option that comes to mind is to leverage sav4sav to pull the value and store it on the user record, then potentially could use either an adv query in user update rule or maybe pre-processor config to do the date conversion and 60 day check.

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Share sample date format


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

I was able to convert this unix timestamp to just a date using the following: SELECT DISTINCT NAME, DATE_FORMAT(FROM_UNIXTIME(customproperty6), '%Y-%m-%d') AS date FROM accounts WHERE customproperty6 IS NOT NULL AND endpointkey = '2';

The problem is that when I use this analytics in the user import config below:

{
"connection": "userAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://removed-dev.saviyntcloud.com/ECM/api/v5/fetchRuntimeControlsData",
"httpParams": "{\"analyticsname\": \"DUO Update Last Login\"}",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"userResponsePath": "result",
"colsToPropsMap": {
"systemUserName": "NAME~#~char",
"customproperty50": "DATE~#~string"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 500,
"totalCountPath": "completeResponseMap.total"
}
}
}

I get errors like this

"2024-06-13T12:53:27.781+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-24-99k6w","DEBUG","contentType - text/json"
"2024-06-13T12:53:27.782+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-24-99k6w","DEBUG","contentTypeFromConfig - application/json"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","Inside retrieveColumnsAndFilters"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","returnMap:: [leftFilterWithDefaultFeildList:[], columnAndTypeMap:[DATE:1, NAME:1], selectedFilterCols:[NAME, DATE], selectedCols:[NAME###1, DATE###1]]"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","Exit retrieveColumnsAndFilters"
"2024-06-13T12:53:27.847+00:00","ecm","analytics.AnalyticsHistoryController","http-nio-8080-exec-5-99k6w","DEBUG","result list size 657"
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-04-17""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-10-25""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-12""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-03""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-05-20""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-06""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-19""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-05-10""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-08""

Despite the analytics results looking fine 

jralexander137_0-1718283694594.png

What am I overlooking here?

SELECT DISTINCT NAME, DATE_FORMAT(FROM_UNIXTIME(customproperty6), '%Y-%m-%d') AS dateconverted FROM accounts WHERE customproperty6 IS NOT NULL AND endpointkey = '2';


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.