Accounts to Disable

Hey Everyone, we have an application where there is no API to disable nor delete accounts but we still can disable those account while reading them as we can set status values (which is an attribute on account level). However the catch here is there is more than one status for enabled accounts which is status ‘1’ and ‘0’ we need both of these status users to show up as enabled and the other status ‘3’ being inactive as disabled.

Any help is appreciated. Thankyou :slight_smile:

Hey @ShashankNoolvi , how are you?

You can use a AfterOperation Rule on the aggregation to change the variables from 1 and 3 to Active and anything else as inactive for example.

for (Map iterateMap : processedResponseObject) {
            if (iterateMap != null ) {
                Set keySet = iterateMap.keySet();
                for (Object s : keySet) {
                    if (s.equals("status")) {
                        String status = (String) iterateMap.get("status");
                           if(status==1 || status == 3){
iterateMap.put("status","active");
}else{
 iterateMap.put("status","inactive");
}
					
							}
						
                       
                    }
                }
            }
        }

try and let me know!