Account not Aggregate after Correlation Rule Attached

Hi Sailor,

I have attached the correlation rule below to my CSV source. When I try to aggregate accounts from the CSV file, the aggregation shows as successful, but the accounts are still not aggregated into the source. Wonder which part of the rule is causing the error.

// identity attributes to match: family name, date of birth, first name
import sailpoint.object.*;
import sailpoint.rule.IdnRuleUtil;
import java.util.*;

String first = (String) account.getAttribute("FIRST_NAME");
String dob = (String) account.getAttribute("DOB");
String last = (String) account.getAttribute("LAST_NAME");
Map returnMap = new HashMap();

// Skip if critical account attributes are missing
if (first == null || last == null || dob == null) {
    return returnMap;
}

// Find identities by searchable first name
List identities = idn.findIdentitiesBySearchableIdentityAttribute("identity_attribute_first_name","Equals",first,"identity_attribute_first_name");

if (identities != null && !identities.isEmpty()) {
    for (Identity identity : identities) {

        // Last name check
        String identityLastName = identity.getLastname();
        if (identityLastName != null && identityLastName.equalsIgnoreCase(last)) {

            // DOB check
            Object identityDob = identity.getAttribute("birthDate");
            if (identityDob != null && identityDob.toString().equals(dob)) {

                // Successful correlation
                returnMap.put("identityName", identity.getName());
                return returnMap;
            }
        }
    }
}

return returnMap;

Hi @Bernardc ,

Currently, the values passed in the returnMap include only the identityName. Could you please update the implementation to also include identityAttributeValue, as both are required to be retained when returning the returnMap.

The Map object should contain references to the identity attributes used for correlation and must include both identityAttributeName and identityAttributeValue as keys.

Additionally, for troubleshooting purposes, please review the CCG VA logs to validate that the expected values are being populated correctly.

Hi @pkMishra ,

so the returnmap pair should be something like?

// Successful correlation

returnMap.put( “identityAttributeName”, “firstname”);

returnMap.put( “identityAttributeValue”, first);

return returnMap;

Yes, that’s correct. ReturnMap should have both values which are attributeName and it’s attributeValue.

@Bernardc

you can refer to the below rule .your rule misses the value

 import java.util.HashMap;
    import java.util.Map;
    import org.apache.commons.lang3.StringUtils;
    import sailpoint.tools.Util;

    String ACCOUNT_P = "sample_";
	String accountUserName = "";
    Map returnMap = new HashMap();
    
    if (account != null) {
			accountUserName = account.getStringAttribute("uid");
			if (Util.isNullOrEmpty(accountUserName)) {
				accountUserName = StringUtils.removeStartIgnoreCase(accountUserName, sample_);
			}
		}
		returnMap.put("identityAttributeName", "employeeid");
		returnMap.put("identityAttributeValue", accountUserName);

    return returnMap;

Hi @pkMishra ,

Below is latest uploaded correlation rule:

// identity attributes to match: family name, date of birth, first name
import sailpoint.object.*;
import sailpoint.rule.IdnRuleUtil;
import java.util.*;

String first = (String) account.getAttribute("FIRST_NAME");
String dob = (String) account.getAttribute("DOB");
String last = (String) account.getAttribute("LAST_NAME");
Map returnMap = new HashMap();

// Skip if critical account attributes are missing
if (first == null || last == null || dob == null) {
    return returnMap;
}

// Find identities by searchable first name
List identities = idn.findIdentitiesBySearchableIdentityAttribute("firstname", "Equals", first, "firstname");

if (identities != null && !identities.isEmpty()) {
    for (Identity identity : identities) {

        // Last name check
        String identityLastName = identity.getLastname();
        if (identityLastName != null && identityLastName.equalsIgnoreCase(last)) {

            // DOB check
            String identityDob = identity.getAttribute("birthDate");
            if (identityDob != null && identityDob.equalsIgnoreCase(dob)) {

                // Successful correlation
                returnMap.put( "identityAttributeName", "firstname");
                returnMap.put( "identityAttributeValue", first);
                return returnMap;
            }
        }
    }
}

return returnMap;

But still having same issue.

Hi Bernard,

The rule looks fine to me. Do you see any errors at the CCG level? Additionally, I recommend capturing the returnMap values using appropriate logging to verify whether the expected matching values are being populated.

Hi @Bernardc ,

can you confirm that DOB fallow single pattern
either 07-01-2026v or 07/01/2026 if not EqualsToIgoreCase Method may
fail in that use DOB normalizers something like

                String normalizedAccountDob = dob.replaceAll("[/-]", "").trim();
                String normalizedIdentityDob = identityDob.replaceAll("[/-]", "").trim();

in you code also add few debug logs and take SailPoint Support to see where exactly correlation is failing by adding

log.debug(“Error” + Var);

this may help for better troubleshooting

Hi @avinashrjgoudar ,

Yes, the dob follow below pattern:

15/05/1990

Thanks for the idea for debug.

Hi Bernard,

As mentioned earlier did you review the CG-level logs during the aggregation process? Checking the returnMap values in the logs should help with troubleshooting, as it will allow you to verify whether the map contains matching values for existing identities to support correlation.