Hi everyone,
I’m working with a Workflow in SailPoint where I’ve set up a trigger to fire on identity attribute change. My goal is to parse an attribute newValue that contains a complex JSON string representing various events related to a user’s profile.
Here’s an example of the JSON structure I’m dealing with:
{ “Actions”: [{ “ActionTypeCode” : “02”, “ActionTypeName”: “Organizational Change”, “ReasonCode” : “01”, “ReasonTypeText”: “Transfer without change of pay”, “ActionStartDate” : “2022-09-01”, “ActionEndDate” : “9999-12-31”, “EmployeeNumber” : “01000014” } ,{ “ActionTypeCode” : “90”, “ActionTypeName”: “Migration”, “ReasonCode” : “”, “ReasonTypeText”: “”, “ActionStartDate” : “2018-04-01”, “ActionEndDate” : “2022-08-31”, “EmployeeNumber” : “01000014” } ] }
In the beautified view:
{
"Actions": [
{
"ActionTypeCode": "02",
"ActionTypeName": "Organizational Change",
"ReasonCode": "01",
"ReasonTypeText": "Transfer without change of pay",
"ActionStartDate": "2022-09-01",
"ActionEndDate": "9999-12-31",
"EmployeeNumber": "01000014"
},
{
"ActionTypeCode": "90",
"ActionTypeName": "Migration",
"ReasonCode": "",
"ReasonTypeText": "",
"ActionStartDate": "2018-04-01",
"ActionEndDate": "2022-08-31",
"EmployeeNumber": "01000014"
}
]
}
The challenge is that SailPoint treats this entire JSON data as a string stored in the identity attribute, which makes it difficult to perform complex parsing and filtering.
For example, I need to extract the ActionStartDate of specific events based on criteria like ActionTypeCode and compare these dates with the current date to determine further actions (e.g., sending emails to the responsible manager).
Any guidance or examples on how to achieve this would be greatly appreciated. Thanks in advance for your help!