Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/23/2023 06:56 AM
Hello ,
I have a requirement where need to skip the attribute "Last_Working_Date__c" if the enddate of user is null.
I dont want to change the entire payload using if else, rather looking for an alternative option within the payload to skip an attribute.
When End date is present
"httpParams": "{\"Name\":\"${user.firstname}\",\"Last_Working_Date__c\":\"${user.enddate}\"}"
When End date is null
"httpParams": "{\"Name\":\"${user.firstname}\"}",
05/23/2023 12:26 PM
You will need to use if else clause in case an attribute needs to be skipped from the payload.
You can use Java operations to tweak any attributes by using if-else conditions, substrings, or operators in the JSON for provisioning. Below is an example you can refer to and construct your condition accordingly.
"Username": "${if(((user.departmentNumber!=account.customproperty23.substring(3,5)) && (user.customproperty30==account.customproperty27))||((user.departmentNumber==account.customproperty23.substring(3,5)) && (user.customproperty30!=account.customproperty27))){user.email+'.everest'} else if(((user.departmentNumber!=account.customproperty23.substring(3,5)) && (user.customproperty30!=account.customproperty27))|| user.customproperty3!=account.customproperty31||user.customproperty9=='Terminated'|| user.customproperty21=='ASAP'){user.email+'.everest'+'_'+Calendar.getInstance().getTime().format('yyyyMMdd')} else {user.email+'.everest'}}"