Table of Contents

Interface SzEngine

Namespace
Senzing.Sdk
Assembly
Senzing.Sdk.dll

Defines the interface to the Senzing engine functions.

public interface SzEngine

Examples

An SzEngine instance is typically obtained from an SzEnvironment instance via the GetEngine() method as follows.

For example:

// How to obtain an SzEngine instance
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    . . .

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to get SzEngine.", e);
}

Remarks

The Senzing engine functions primarily provide means of working with identity data records, entities and their relationships.

Methods

AddRecord(string, string, string, SzFlag?)

Loads a record into the repository and performs entity resolution.

string AddRecord(string dataSourceCode, string recordID, string recordDefinition, SzFlag? flags = (SzFlag)0)

Parameters

dataSourceCode string

The data source code identifying the data source for the record being added.

recordID string

The record ID that uniquely identifies the record being added within the scope of its associated data source.

recordDefinition string

The string that defines the record, typically in JSON format.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzAddRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzAddRecordDefaultFlags. Specify SzWithInfo for an INFO response. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by adding the record to the repository, or null if the specified flags do not indicate that an INFO message should be returned.

Examples

Usage:

// How to load a record
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get a record definition (varies by application)
    string recordDefinition =
            """
            {
                "DATA_SOURCE": "TEST",
                "RECORD_ID": "ABC123",
                "NAME_FULL": "Joe Schmoe",
                "PHONE_NUMBER": "702-555-1212",
                "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
            }
            """;

    // add the record to the repository
    string info = engine.AddRecord(
        "TEST", "ABC123", recordDefinition, SzWithInfo);

    // do something with the "info JSON" (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
    {
        JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();
        for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
        {
            JsonObject? affected = affectedArr[index]?.AsObject();
            long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to add record.", e);
}

Example Result: (formatted for readability)

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "ABC123",
  "AFFECTED_ENTITIES": [
    {
      "ENTITY_ID": 100002
    }
  ]
}

Remarks

If a record already exists with the same data source code and record ID, it will be replaced. If the record definition contains DATA_SOURCE and RECORD_ID JSON keys, the values must match the dataSourceCode and recordId parameters.

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzAddRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzBadInputException

If the specified record definition has a data source or record ID value that conflicts with the specified data source code and/or record ID values.

SzException

If a failure occurs.

See Also

CloseExportReport(IntPtr)

Closes an export report.

void CloseExportReport(IntPtr exportHandle)

Parameters

exportHandle IntPtr

The export handle of the export report to close.

Examples

Usage (JSON Export):

// How to export entity data in JSON format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportJsonEntityReport(SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the first JSON record
        string jsonData = engine.FetchNext(exportHandle);

        while (jsonData != null)
        {
            // parse the JSON data
            JsonObject? jsonObject = JsonNode.Parse(jsonData)?.AsObject();

            // do something with the parsed data (varies by application)
            ProcessJsonRecord(jsonObject);

            // fetch the next JSON record
            jsonData = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform JSON export.", e);
}

Usage (CSV Export):

// How to export entity data in CSV format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportCsvEntityReport("*", SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the CSV header line from the exported data
        string csvHeaders = engine.FetchNext(exportHandle);

        // process the CSV headers (varies by application)
        ProcessCsvHeaders(csvHeaders);

        // fetch the first CSV record from the exported data
        string csvRecord = engine.FetchNext(exportHandle);

        while (csvRecord != null)
        {
            // do something with the exported record (varies by application)
            ProcessCsvRecord(csvRecord);

            // fetch the next exported CSV record
            csvRecord = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform CSV export.", e);
}

Remarks

Exceptions

SzException

If the specified export handle has already been closed or if any other failure occurs.

See Also

CountRedoRecords()

Gets the number of redo records pending processing.

long CountRedoRecords()

Returns

long

The number of redo records pending to be processed.

Examples

Usage:

// How to check for and process redo records
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the redo count
    long redoCount = engine.CountRedoRecords();

    // check if we have redo records
    if (redoCount > 0L)
    {
        // get the next redo record
        string redoRecord = engine.GetRedoRecord();

        // loop while we still have redo records
        while (redoRecord != null)
        {
            try
            {
                // process the redo record
                string info = engine.ProcessRedoRecord(redoRecord, SzWithInfo);

                // do something with the "info JSON" (varies by application)
                JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
                if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
                {
                    JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();
                    for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
                    {
                        JsonObject? affected = affectedArr[index]?.AsObject();
                        long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

                        . . .
                    }
                }

            }
            catch (SzException e)
            {
                // handle or rethrow the other exceptions
                LogError("Failed to process redo record: " + redoRecord, e);
            }

            // get the next redo record
            redoRecord = engine.GetRedoRecord();
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to process redos.", e);
}

Remarks

This method is used in conjunction with GetRedoRecord() and ProcessRedoRecord(string, SzFlag?).

Exceptions

SzException

If a failure occurs.

See Also

DeleteRecord(string, string, SzFlag?)

Deletes a record from the repository and performs entity resolution.

string DeleteRecord(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)

Parameters

dataSourceCode string

The data source code identifying the data source for the record being deleted.

recordID string

The record ID that uniquely identifies the record being deleted within the scope of its associated data source.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzDeleteRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzDeleteRecordDefaultFlags. Specify SzWithInfo for an INFO response. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by deleting the record from the repository, or null if the specified flags do not indicate that an INFO message should be returned.

Examples

Usage:

// How to delete a record
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // delete the record from the repository
    string info = engine.DeleteRecord("TEST", "ABC123", SzWithInfo);

    // do something with the "info JSON" (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
    {
        JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();

        for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
        {
            JsonObject? affected = affectedArr[index]?.AsObject();

            long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to delete record.", e);
}

Example Result: (formatted for readability)

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "ABC123",
  "AFFECTED_ENTITIES": [
    {
      "ENTITY_ID": 100001
    }
  ]
}

Remarks

NOTE: This method is idempotent in that it succeeds with no changes being made when the record is not found in the repository.

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzDeleteRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzException

If a failure occurs.

See Also

ExportCsvEntityReport(string, SzFlag?)

Initiates an export report of entity data in CSV format.

IntPtr ExportCsvEntityReport(string csvColumnList, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludeSingleRecordEntities | SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)

Parameters

csvColumnList string

Specify "*" to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-separated list of column names.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzExportFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzExportDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

IntPtr

The export handle to use for retrieving the export data.

Examples

Usage:

// How to export entity data in CSV format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportCsvEntityReport("*", SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the CSV header line from the exported data
        string csvHeaders = engine.FetchNext(exportHandle);

        // process the CSV headers (varies by application)
        ProcessCsvHeaders(csvHeaders);

        // fetch the first CSV record from the exported data
        string csvRecord = engine.FetchNext(exportHandle);

        while (csvRecord != null)
        {
            // do something with the exported record (varies by application)
            ProcessCsvRecord(csvRecord);

            // fetch the next exported CSV record
            csvRecord = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform CSV export.", e);
}

Example Complete Export Report:

RESOLVED_ENTITY_ID,RESOLVED_ENTITY_NAME,RELATED_ENTITY_ID,MATCH_LEVEL,MATCH_LEVEL_CODE,MATCH_KEY,MATCH_KEY_DETAILS,IS_DISCLOSED,IS_AMBIGUOUS,DATA_SOURCE,RECORD_ID,JSON_DATA,FIRST_SEEN_DT,LAST_SEEN_DT,UNMAPPED_DATA,ERRULE_CODE,RELATED_ENTITY_NAME
1,"Joseph Schmidt",0,0,"","","",0,0,"PASSENGERS","ABC123","{""RECORD_ID"":""ABC123"",""NAME_FIRST"":""Joseph"",""NAME_LAST"":""Schmidt"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-777-2424"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""12-JAN-1981"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:25Z","2025-08-29T19:45:25Z","{}","",""
1,"Joseph Schmidt",2,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":5,""INBOUND_FEAT_DESC"":""213-555-1212"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":5,""CANDIDATE_FEAT_DESC"":""213-555-1212"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":79,""ADDITIONAL_SCORES"":{""FULL_SCORE"":79},""INBOUND_FEAT_ID"":21,""INBOUND_FEAT_DESC"":""15-MAR-1982"",""CANDIDATE_FEAT_ID"":2,""CANDIDATE_FEAT_DESC"":""12-JAN-1981"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","DEF456","{""RECORD_ID"":""DEF456"",""NAME_FIRST"":""Joann"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""15-MAR-1982"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:28Z","2025-08-29T19:45:28Z","{}","SF1","Joann Smith"
1,"Joseph Schmidt",5,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":3,""INBOUND_FEAT_DESC"":""101 Main Street, Los Angeles, CA 90011"",""CANDIDATE_FEAT_ID"":3,""CANDIDATE_FEAT_DESC"":""101 Main Street, Los Angeles, CA 90011"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":82,""ADDITIONAL_SCORES"":{""FULL_SCORE"":82},""INBOUND_FEAT_ID"":81,""INBOUND_FEAT_DESC"":""22-AUG-1981"",""CANDIDATE_FEAT_ID"":2,""CANDIDATE_FEAT_DESC"":""12-JAN-1981"",""SCORE_BUCKET"":""UNLIKELY""}]}",0,0,"EMPLOYEES","MNO345","{""RECORD_ID"":""MNO345"",""NAME_FIRST"":""Bill"",""NAME_LAST"":""Bandley"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-123-4567"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""22-AUG-1981"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Bill Bandley"
2,"Joann Smith",0,0,"","","",0,0,"PASSENGERS","DEF456","{""RECORD_ID"":""DEF456"",""NAME_FIRST"":""Joann"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""15-MAR-1982"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:28Z","2025-08-29T19:45:28Z","{}","",""
2,"Joann Smith",1,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":5,""INBOUND_FEAT_DESC"":""213-555-1212"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":5,""CANDIDATE_FEAT_DESC"":""213-555-1212"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":79,""ADDITIONAL_SCORES"":{""FULL_SCORE"":79},""INBOUND_FEAT_ID"":2,""INBOUND_FEAT_DESC"":""12-JAN-1981"",""CANDIDATE_FEAT_ID"":21,""CANDIDATE_FEAT_DESC"":""15-MAR-1982"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","ABC123","{""RECORD_ID"":""ABC123"",""NAME_FIRST"":""Joseph"",""NAME_LAST"":""Schmidt"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-777-2424"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""12-JAN-1981"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:25Z","2025-08-29T19:45:25Z","{}","SF1","Joseph Schmidt"
2,"Joann Smith",3,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":22,""INBOUND_FEAT_DESC"":""101 Fifth Ave, Los Angeles, CA 90018"",""CANDIDATE_FEAT_ID"":22,""CANDIDATE_FEAT_DESC"":""101 Fifth Ave, Los Angeles, CA 90018"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":69,""ADDITIONAL_SCORES"":{""FULL_SCORE"":69},""INBOUND_FEAT_ID"":48,""INBOUND_FEAT_DESC"":""17-DEC-1977"",""CANDIDATE_FEAT_ID"":21,""CANDIDATE_FEAT_DESC"":""15-MAR-1982"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","GHI789","{""RECORD_ID"":""GHI789"",""NAME_FIRST"":""John"",""NAME_LAST"":""Parker"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-999-2121"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-DEC-1977"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","John Parker"
2,"Joann Smith",6,3,"POSSIBLY_RELATED","+SURNAME+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""SURNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/SUR_NAME"",""SCORE"":67,""ADDITIONAL_SCORES"":{""GNR_FN"":67,""GNR_SN"":100,""GNR_GN"":34,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":106,""INBOUND_FEAT_DESC"":""Craig Smith"",""CANDIDATE_FEAT_ID"":20,""CANDIDATE_FEAT_DESC"":""Joann Smith"",""SCORE_BUCKET"":""UNLIKELY""},{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":23,""INBOUND_FEAT_DESC"":""818-888-3939"",""INBOUND_FEAT_USAGE_TYPE"":""HOME"",""CANDIDATE_FEAT_ID"":23,""CANDIDATE_FEAT_DESC"":""818-888-3939"",""CANDIDATE_FEAT_USAGE_TYPE"":""HOME"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":81,""ADDITIONAL_SCORES"":{""FULL_SCORE"":81},""INBOUND_FEAT_ID"":107,""INBOUND_FEAT_DESC"":""17-OCT-1983"",""CANDIDATE_FEAT_ID"":21,""CANDIDATE_FEAT_DESC"":""15-MAR-1982"",""SCORE_BUCKET"":""UNLIKELY""}]}",0,0,"EMPLOYEES","PQR678","{""RECORD_ID"":""PQR678"",""NAME_FIRST"":""Craig"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""818-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""451 Dover Street, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-OCT-1983"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","CFF_SURNAME","Craig Smith"
3,"John Parker",0,0,"","","",0,0,"PASSENGERS","GHI789","{""RECORD_ID"":""GHI789"",""NAME_FIRST"":""John"",""NAME_LAST"":""Parker"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-999-2121"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-DEC-1977"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
3,"John Parker",2,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":22,""INBOUND_FEAT_DESC"":""101 Fifth Ave, Los Angeles, CA 90018"",""CANDIDATE_FEAT_ID"":22,""CANDIDATE_FEAT_DESC"":""101 Fifth Ave, Los Angeles, CA 90018"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":69,""ADDITIONAL_SCORES"":{""FULL_SCORE"":69},""INBOUND_FEAT_ID"":21,""INBOUND_FEAT_DESC"":""15-MAR-1982"",""CANDIDATE_FEAT_ID"":48,""CANDIDATE_FEAT_DESC"":""17-DEC-1977"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","DEF456","{""RECORD_ID"":""DEF456"",""NAME_FIRST"":""Joann"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""15-MAR-1982"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:28Z","2025-08-29T19:45:28Z","{}","SFF","Joann Smith"
3,"John Parker",4,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":50,""INBOUND_FEAT_DESC"":""818-555-1313"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":50,""CANDIDATE_FEAT_DESC"":""818-555-1313"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":65,""ADDITIONAL_SCORES"":{""FULL_SCORE"":65},""INBOUND_FEAT_ID"":64,""INBOUND_FEAT_DESC"":""23-MAY-1973"",""CANDIDATE_FEAT_ID"":48,""CANDIDATE_FEAT_DESC"":""17-DEC-1977"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","JKL012","{""RECORD_ID"":""JKL012"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Donaldson"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-222-3131"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""23-MAY-1973"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","Jane Donaldson"
4,"Jane Donaldson",0,0,"","","",0,0,"PASSENGERS","JKL012","{""RECORD_ID"":""JKL012"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Donaldson"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-222-3131"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""23-MAY-1973"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
4,"Jane Donaldson",3,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":50,""INBOUND_FEAT_DESC"":""818-555-1313"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":50,""CANDIDATE_FEAT_DESC"":""818-555-1313"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":65,""ADDITIONAL_SCORES"":{""FULL_SCORE"":65},""INBOUND_FEAT_ID"":48,""INBOUND_FEAT_DESC"":""17-DEC-1977"",""CANDIDATE_FEAT_ID"":64,""CANDIDATE_FEAT_DESC"":""23-MAY-1973"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","GHI789","{""RECORD_ID"":""GHI789"",""NAME_FIRST"":""John"",""NAME_LAST"":""Parker"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-999-2121"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-DEC-1977"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","John Parker"
4,"Jane Donaldson",10,3,"POSSIBLY_RELATED","+PNAME+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/PART_NAME"",""SCORE"":84,""ADDITIONAL_SCORES"":{""GNR_FN"":84,""GNR_SN"":68,""GNR_GN"":100,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":195,""INBOUND_FEAT_DESC"":""Jane Johnson"",""CANDIDATE_FEAT_ID"":63,""CANDIDATE_FEAT_DESC"":""Jane Donaldson"",""SCORE_BUCKET"":""LIKELY""},{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":65,""INBOUND_FEAT_DESC"":""400 River Street, Pasadena, CA 90034"",""CANDIDATE_FEAT_ID"":65,""CANDIDATE_FEAT_DESC"":""400 River Street, Pasadena, CA 90034"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":63,""ADDITIONAL_SCORES"":{""FULL_SCORE"":63},""INBOUND_FEAT_ID"":196,""INBOUND_FEAT_DESC"":""6-SEP-1975"",""CANDIDATE_FEAT_ID"":64,""CANDIDATE_FEAT_DESC"":""23-MAY-1973"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","XYZ234","{""RECORD_ID"":""XYZ234"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Johnson"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""6-SEP-1975"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Jane Johnson"
5,"Bill Bandley",0,0,"","","",0,0,"EMPLOYEES","MNO345","{""RECORD_ID"":""MNO345"",""NAME_FIRST"":""Bill"",""NAME_LAST"":""Bandley"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-123-4567"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""22-AUG-1981"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
5,"Bill Bandley",1,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":3,""INBOUND_FEAT_DESC"":""101 Main Street, Los Angeles, CA 90011"",""CANDIDATE_FEAT_ID"":3,""CANDIDATE_FEAT_DESC"":""101 Main Street, Los Angeles, CA 90011"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":82,""ADDITIONAL_SCORES"":{""FULL_SCORE"":82},""INBOUND_FEAT_ID"":2,""INBOUND_FEAT_DESC"":""12-JAN-1981"",""CANDIDATE_FEAT_ID"":81,""CANDIDATE_FEAT_DESC"":""22-AUG-1981"",""SCORE_BUCKET"":""UNLIKELY""}]}",0,0,"PASSENGERS","ABC123","{""RECORD_ID"":""ABC123"",""NAME_FIRST"":""Joseph"",""NAME_LAST"":""Schmidt"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-777-2424"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""12-JAN-1981"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:25Z","2025-08-29T19:45:25Z","{}","SFF","Joseph Schmidt"
5,"Bill Bandley",8,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":83,""INBOUND_FEAT_DESC"":""818-444-2121"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":83,""CANDIDATE_FEAT_DESC"":""818-444-2121"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":79,""ADDITIONAL_SCORES"":{""FULL_SCORE"":79},""INBOUND_FEAT_ID"":160,""INBOUND_FEAT_DESC"":""27-JUN-1980"",""CANDIDATE_FEAT_ID"":81,""CANDIDATE_FEAT_DESC"":""22-AUG-1981"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"EMPLOYEES","DEF890","{""RECORD_ID"":""DEF890"",""NAME_FIRST"":""Katrina"",""NAME_LAST"":""Osmond"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-111-2222"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""27-JUN-1980"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","Katrina Osmond"
6,"Craig Smith",0,0,"","","",0,0,"EMPLOYEES","PQR678","{""RECORD_ID"":""PQR678"",""NAME_FIRST"":""Craig"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""818-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""451 Dover Street, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-OCT-1983"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
6,"Craig Smith",2,3,"POSSIBLY_RELATED","+SURNAME+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""SURNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/SUR_NAME"",""SCORE"":67,""ADDITIONAL_SCORES"":{""GNR_FN"":67,""GNR_SN"":100,""GNR_GN"":34,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":20,""INBOUND_FEAT_DESC"":""Joann Smith"",""CANDIDATE_FEAT_ID"":106,""CANDIDATE_FEAT_DESC"":""Craig Smith"",""SCORE_BUCKET"":""UNLIKELY""},{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":23,""INBOUND_FEAT_DESC"":""818-888-3939"",""INBOUND_FEAT_USAGE_TYPE"":""HOME"",""CANDIDATE_FEAT_ID"":23,""CANDIDATE_FEAT_DESC"":""818-888-3939"",""CANDIDATE_FEAT_USAGE_TYPE"":""HOME"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":81,""ADDITIONAL_SCORES"":{""FULL_SCORE"":81},""INBOUND_FEAT_ID"":21,""INBOUND_FEAT_DESC"":""15-MAR-1982"",""CANDIDATE_FEAT_ID"":107,""CANDIDATE_FEAT_DESC"":""17-OCT-1983"",""SCORE_BUCKET"":""UNLIKELY""}]}",0,0,"PASSENGERS","DEF456","{""RECORD_ID"":""DEF456"",""NAME_FIRST"":""Joann"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""101 Fifth Ave, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""15-MAR-1982"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:28Z","2025-08-29T19:45:28Z","{}","CFF_SURNAME","Joann Smith"
6,"Craig Smith",7,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":108,""INBOUND_FEAT_DESC"":""451 Dover Street, Los Angeles, CA 90018"",""CANDIDATE_FEAT_ID"":108,""CANDIDATE_FEAT_DESC"":""451 Dover Street, Los Angeles, CA 90018"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":63,""ADDITIONAL_SCORES"":{""FULL_SCORE"":63},""INBOUND_FEAT_ID"":134,""INBOUND_FEAT_DESC"":""24-NOV-1975"",""CANDIDATE_FEAT_ID"":107,""CANDIDATE_FEAT_DESC"":""17-OCT-1983"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"EMPLOYEES","ABC567","{""RECORD_ID"":""ABC567"",""NAME_FIRST"":""Kim"",""NAME_LAST"":""Long"",""MOBILE_PHONE_NUMBER"":""818-246-8024"",""HOME_PHONE_NUMBER"":""818-135-7913"",""ADDR_FULL"":""451 Dover Street, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""24-NOV-1975"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Kim Long"
7,"Kim Long",0,0,"","","",0,0,"EMPLOYEES","ABC567","{""RECORD_ID"":""ABC567"",""NAME_FIRST"":""Kim"",""NAME_LAST"":""Long"",""MOBILE_PHONE_NUMBER"":""818-246-8024"",""HOME_PHONE_NUMBER"":""818-135-7913"",""ADDR_FULL"":""451 Dover Street, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""24-NOV-1975"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
7,"Kim Long",6,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":108,""INBOUND_FEAT_DESC"":""451 Dover Street, Los Angeles, CA 90018"",""CANDIDATE_FEAT_ID"":108,""CANDIDATE_FEAT_DESC"":""451 Dover Street, Los Angeles, CA 90018"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":63,""ADDITIONAL_SCORES"":{""FULL_SCORE"":63},""INBOUND_FEAT_ID"":107,""INBOUND_FEAT_DESC"":""17-OCT-1983"",""CANDIDATE_FEAT_ID"":134,""CANDIDATE_FEAT_DESC"":""24-NOV-1975"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"EMPLOYEES","PQR678","{""RECORD_ID"":""PQR678"",""NAME_FIRST"":""Craig"",""NAME_LAST"":""Smith"",""MOBILE_PHONE_NUMBER"":""818-555-1212"",""HOME_PHONE_NUMBER"":""818-888-3939"",""ADDR_FULL"":""451 Dover Street, Los Angeles, CA 90018"",""DATE_OF_BIRTH"":""17-OCT-1983"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Craig Smith"
8,"Katrina Osmond",0,0,"","","",0,0,"EMPLOYEES","DEF890","{""RECORD_ID"":""DEF890"",""NAME_FIRST"":""Katrina"",""NAME_LAST"":""Osmond"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-111-2222"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""27-JUN-1980"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
8,"Katrina Osmond",5,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":83,""INBOUND_FEAT_DESC"":""818-444-2121"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":83,""CANDIDATE_FEAT_DESC"":""818-444-2121"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":79,""ADDITIONAL_SCORES"":{""FULL_SCORE"":79},""INBOUND_FEAT_ID"":81,""INBOUND_FEAT_DESC"":""22-AUG-1981"",""CANDIDATE_FEAT_ID"":160,""CANDIDATE_FEAT_DESC"":""27-JUN-1980"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"EMPLOYEES","MNO345","{""RECORD_ID"":""MNO345"",""NAME_FIRST"":""Bill"",""NAME_LAST"":""Bandley"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-123-4567"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""22-AUG-1981"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","Bill Bandley"
8,"Katrina Osmond",12,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":161,""INBOUND_FEAT_DESC"":""707 Seventh Ave, Los Angeles, CA 90043"",""CANDIDATE_FEAT_ID"":161,""CANDIDATE_FEAT_DESC"":""707 Seventh Ave, Los Angeles, CA 90043"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":70,""ADDITIONAL_SCORES"":{""FULL_SCORE"":70},""INBOUND_FEAT_ID"":236,""INBOUND_FEAT_DESC"":""15-JAN-1979"",""CANDIDATE_FEAT_ID"":160,""CANDIDATE_FEAT_DESC"":""27-JUN-1980"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","JKL456","{""RECORD_ID"":""JKL456"",""NAME_FIRST"":""Kelly"",""NAME_LAST"":""Rogers"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-789-6543"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""15-JAN-1979"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Kelly Rogers"
9,"Martha Wayne",0,0,"","","",0,0,"VIPS","STU901","{""RECORD_ID"":""STU901"",""NAME_FIRST"":""Martha"",""NAME_LAST"":""Wayne"",""MOBILE_PHONE_NUMBER"":""818-891-9292"",""HOME_PHONE_NUMBER"":""818-987-1234"",""ADDR_FULL"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""DATE_OF_BIRTH"":""27-NOV-1973"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
9,"Martha Wayne",11,3,"POSSIBLY_RELATED","+PNAME+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/PART_NAME"",""SCORE"":68,""ADDITIONAL_SCORES"":{""GNR_FN"":68,""GNR_SN"":34,""GNR_GN"":100,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":221,""INBOUND_FEAT_DESC"":""Martha Kent"",""CANDIDATE_FEAT_ID"":176,""CANDIDATE_FEAT_DESC"":""Martha Wayne"",""SCORE_BUCKET"":""UNLIKELY""},{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":178,""INBOUND_FEAT_DESC"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""CANDIDATE_FEAT_ID"":178,""CANDIDATE_FEAT_DESC"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":67,""ADDITIONAL_SCORES"":{""FULL_SCORE"":67},""INBOUND_FEAT_ID"":222,""INBOUND_FEAT_DESC"":""17-AUG-1978"",""CANDIDATE_FEAT_ID"":177,""CANDIDATE_FEAT_DESC"":""27-NOV-1973"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","GHI123","{""RECORD_ID"":""GHI123"",""NAME_FIRST"":""Martha"",""NAME_LAST"":""Kent"",""MOBILE_PHONE_NUMBER"":""818-333-5757"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""DATE_OF_BIRTH"":""17-AUG-1978"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Martha Kent"
10,"Jane Johnson",0,0,"","","",0,0,"VIPS","XYZ234","{""RECORD_ID"":""XYZ234"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Johnson"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""6-SEP-1975"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
10,"Jane Johnson",4,3,"POSSIBLY_RELATED","+PNAME+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/PART_NAME"",""SCORE"":84,""ADDITIONAL_SCORES"":{""GNR_FN"":84,""GNR_SN"":68,""GNR_GN"":100,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":63,""INBOUND_FEAT_DESC"":""Jane Donaldson"",""CANDIDATE_FEAT_ID"":195,""CANDIDATE_FEAT_DESC"":""Jane Johnson"",""SCORE_BUCKET"":""LIKELY""},{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":65,""INBOUND_FEAT_DESC"":""400 River Street, Pasadena, CA 90034"",""CANDIDATE_FEAT_ID"":65,""CANDIDATE_FEAT_DESC"":""400 River Street, Pasadena, CA 90034"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":63,""ADDITIONAL_SCORES"":{""FULL_SCORE"":63},""INBOUND_FEAT_ID"":64,""INBOUND_FEAT_DESC"":""23-MAY-1973"",""CANDIDATE_FEAT_ID"":196,""CANDIDATE_FEAT_DESC"":""6-SEP-1975"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"PASSENGERS","JKL012","{""RECORD_ID"":""JKL012"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Donaldson"",""MOBILE_PHONE_NUMBER"":""818-555-1313"",""HOME_PHONE_NUMBER"":""818-222-3131"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""23-MAY-1973"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Jane Donaldson"
10,"Jane Johnson",11,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":197,""INBOUND_FEAT_DESC"":""818-123-9876"",""INBOUND_FEAT_USAGE_TYPE"":""HOME"",""CANDIDATE_FEAT_ID"":197,""CANDIDATE_FEAT_DESC"":""818-123-9876"",""CANDIDATE_FEAT_USAGE_TYPE"":""HOME"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":67,""ADDITIONAL_SCORES"":{""FULL_SCORE"":67},""INBOUND_FEAT_ID"":222,""INBOUND_FEAT_DESC"":""17-AUG-1978"",""CANDIDATE_FEAT_ID"":196,""CANDIDATE_FEAT_DESC"":""6-SEP-1975"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","GHI123","{""RECORD_ID"":""GHI123"",""NAME_FIRST"":""Martha"",""NAME_LAST"":""Kent"",""MOBILE_PHONE_NUMBER"":""818-333-5757"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""DATE_OF_BIRTH"":""17-AUG-1978"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Martha Kent"
10,"Jane Johnson",12,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":198,""INBOUND_FEAT_DESC"":""818-333-7171"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":198,""CANDIDATE_FEAT_DESC"":""818-333-7171"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":76,""ADDITIONAL_SCORES"":{""FULL_SCORE"":76},""INBOUND_FEAT_ID"":236,""INBOUND_FEAT_DESC"":""15-JAN-1979"",""CANDIDATE_FEAT_ID"":196,""CANDIDATE_FEAT_DESC"":""6-SEP-1975"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","JKL456","{""RECORD_ID"":""JKL456"",""NAME_FIRST"":""Kelly"",""NAME_LAST"":""Rogers"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-789-6543"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""15-JAN-1979"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","Kelly Rogers"
11,"Martha Kent",0,0,"","","",0,0,"VIPS","GHI123","{""RECORD_ID"":""GHI123"",""NAME_FIRST"":""Martha"",""NAME_LAST"":""Kent"",""MOBILE_PHONE_NUMBER"":""818-333-5757"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""DATE_OF_BIRTH"":""17-AUG-1978"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
11,"Martha Kent",9,3,"POSSIBLY_RELATED","+PNAME+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PNAME"",""FTYPE_CODE"":""NAME"",""SCORE_BEHAVIOR"":""NAME"",""SOURCE"":""/PART_NAME"",""SCORE"":68,""ADDITIONAL_SCORES"":{""GNR_FN"":68,""GNR_SN"":34,""GNR_GN"":100,""GENERATION_MATCH"":-1,""GNR_ON"":-1},""INBOUND_FEAT_ID"":176,""INBOUND_FEAT_DESC"":""Martha Wayne"",""CANDIDATE_FEAT_ID"":221,""CANDIDATE_FEAT_DESC"":""Martha Kent"",""SCORE_BUCKET"":""UNLIKELY""},{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":178,""INBOUND_FEAT_DESC"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""CANDIDATE_FEAT_ID"":178,""CANDIDATE_FEAT_DESC"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":67,""ADDITIONAL_SCORES"":{""FULL_SCORE"":67},""INBOUND_FEAT_ID"":177,""INBOUND_FEAT_DESC"":""27-NOV-1973"",""CANDIDATE_FEAT_ID"":222,""CANDIDATE_FEAT_DESC"":""17-AUG-1978"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","STU901","{""RECORD_ID"":""STU901"",""NAME_FIRST"":""Martha"",""NAME_LAST"":""Wayne"",""MOBILE_PHONE_NUMBER"":""818-891-9292"",""HOME_PHONE_NUMBER"":""818-987-1234"",""ADDR_FULL"":""888 Sepulveda Blvd, Los Angeles, CA 90034"",""DATE_OF_BIRTH"":""27-NOV-1973"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Martha Wayne"
11,"Martha Kent",10,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":197,""INBOUND_FEAT_DESC"":""818-123-9876"",""INBOUND_FEAT_USAGE_TYPE"":""HOME"",""CANDIDATE_FEAT_ID"":197,""CANDIDATE_FEAT_DESC"":""818-123-9876"",""CANDIDATE_FEAT_USAGE_TYPE"":""HOME"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":67,""ADDITIONAL_SCORES"":{""FULL_SCORE"":67},""INBOUND_FEAT_ID"":196,""INBOUND_FEAT_DESC"":""6-SEP-1975"",""CANDIDATE_FEAT_ID"":222,""CANDIDATE_FEAT_DESC"":""17-AUG-1978"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","XYZ234","{""RECORD_ID"":""XYZ234"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Johnson"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""6-SEP-1975"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Jane Johnson"
12,"Kelly Rogers",0,0,"","","",0,0,"VIPS","JKL456","{""RECORD_ID"":""JKL456"",""NAME_FIRST"":""Kelly"",""NAME_LAST"":""Rogers"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-789-6543"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""15-JAN-1979"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""
12,"Kelly Rogers",8,3,"POSSIBLY_RELATED","+ADDRESS-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""ADDRESS"",""FTYPE_CODE"":""ADDRESS"",""SCORE_BEHAVIOR"":""FF"",""SOURCE"":""ADDRESS"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":161,""INBOUND_FEAT_DESC"":""707 Seventh Ave, Los Angeles, CA 90043"",""CANDIDATE_FEAT_ID"":161,""CANDIDATE_FEAT_DESC"":""707 Seventh Ave, Los Angeles, CA 90043"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":70,""ADDITIONAL_SCORES"":{""FULL_SCORE"":70},""INBOUND_FEAT_ID"":160,""INBOUND_FEAT_DESC"":""27-JUN-1980"",""CANDIDATE_FEAT_ID"":236,""CANDIDATE_FEAT_DESC"":""15-JAN-1979"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"EMPLOYEES","DEF890","{""RECORD_ID"":""DEF890"",""NAME_FIRST"":""Katrina"",""NAME_LAST"":""Osmond"",""MOBILE_PHONE_NUMBER"":""818-444-2121"",""HOME_PHONE_NUMBER"":""818-111-2222"",""ADDR_FULL"":""707 Seventh Ave, Los Angeles, CA 90043"",""DATE_OF_BIRTH"":""27-JUN-1980"",""DATA_SOURCE"":""EMPLOYEES""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SFF","Katrina Osmond"
12,"Kelly Rogers",10,3,"POSSIBLY_RELATED","+PHONE-DOB","{""CONFIRMATIONS"":[{""TOKEN"":""PHONE"",""FTYPE_CODE"":""PHONE"",""SCORE_BEHAVIOR"":""F1"",""SOURCE"":""PHONE"",""SCORE"":100,""ADDITIONAL_SCORES"":{""FULL_SCORE"":100},""INBOUND_FEAT_ID"":198,""INBOUND_FEAT_DESC"":""818-333-7171"",""INBOUND_FEAT_USAGE_TYPE"":""MOBILE"",""CANDIDATE_FEAT_ID"":198,""CANDIDATE_FEAT_DESC"":""818-333-7171"",""CANDIDATE_FEAT_USAGE_TYPE"":""MOBILE"",""SCORE_BUCKET"":""SAME""}],""DENIALS"":[{""TOKEN"":""DOB"",""FTYPE_CODE"":""DOB"",""SCORE_BEHAVIOR"":""FMES"",""SOURCE"":""DOB"",""SCORE"":76,""ADDITIONAL_SCORES"":{""FULL_SCORE"":76},""INBOUND_FEAT_ID"":196,""INBOUND_FEAT_DESC"":""6-SEP-1975"",""CANDIDATE_FEAT_ID"":236,""CANDIDATE_FEAT_DESC"":""15-JAN-1979"",""SCORE_BUCKET"":""NO_CHANCE""}]}",0,0,"VIPS","XYZ234","{""RECORD_ID"":""XYZ234"",""NAME_FIRST"":""Jane"",""NAME_LAST"":""Johnson"",""MOBILE_PHONE_NUMBER"":""818-333-7171"",""HOME_PHONE_NUMBER"":""818-123-9876"",""ADDR_FULL"":""400 River Street, Pasadena, CA 90034"",""DATE_OF_BIRTH"":""6-SEP-1975"",""DATA_SOURCE"":""VIPS""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","SF1","Jane Johnson"
100002,"Joe Schmoe",0,0,"","","",0,0,"TEST","ABC123","{""DATA_SOURCE"":""TEST"",""RECORD_ID"":""ABC123"",""NAME_FULL"":""Joe Schmoe"",""PHONE_NUMBER"":""702-555-1212"",""EMAIL_ADDRESS"":""joeschmoe@nowhere.com""}","2025-08-29T19:45:38Z","2025-08-29T19:45:38Z","{}","",""

Remarks

Used in conjunction with FetchNext(IntPtr) and CloseExportReport(IntPtr). The first FetchNext(IntPtr) call after calling this method returns the CSV header. Subsequent FetchNext(IntPtr) calls return exported entity data in CSV format.

WARNING: Use with large repositories is not advised.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzExportFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

ExportJsonEntityReport(SzFlag?)

Initiates an export report of entity data in JSON Lines format.

IntPtr ExportJsonEntityReport(SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludeSingleRecordEntities | SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)

Parameters

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzExportFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzExportDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

IntPtr

The export handle to use for retrieving the export data.

Examples

Usage:

// How to export entity data in JSON format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportJsonEntityReport(SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the first JSON record
        string jsonData = engine.FetchNext(exportHandle);

        while (jsonData != null)
        {
            // parse the JSON data
            JsonObject? jsonObject = JsonNode.Parse(jsonData)?.AsObject();

            // do something with the parsed data (varies by application)
            ProcessJsonRecord(jsonObject);

            // fetch the next JSON record
            jsonData = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform JSON export.", e);
}

Example Complete Export Report:

{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"Joseph Schmidt","FEATURES":{"ADDRESS":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3,"FEAT_DESC_VALUES":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12-JAN-1981","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12-JAN-1981","LIB_FEAT_ID":2}]}],"NAME":[{"FEAT_DESC":"Joseph Schmidt","LIB_FEAT_ID":1,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Joseph Schmidt","LIB_FEAT_ID":1}]}],"PHONE":[{"FEAT_DESC":"818-777-2424","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-777-2424","LIB_FEAT_ID":4}]},{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"PASSENGERS","RECORD_ID":"ABC123","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":2,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joann Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":5,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Bill Bandley","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":2,"ENTITY_NAME":"Joann Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"101 Fifth Ave, Los Angeles, CA 90018","LIB_FEAT_ID":22,"FEAT_DESC_VALUES":[{"FEAT_DESC":"101 Fifth Ave, Los Angeles, CA 90018","LIB_FEAT_ID":22}]}],"DOB":[{"FEAT_DESC":"15-MAR-1982","LIB_FEAT_ID":21,"FEAT_DESC_VALUES":[{"FEAT_DESC":"15-MAR-1982","LIB_FEAT_ID":21}]}],"NAME":[{"FEAT_DESC":"Joann Smith","LIB_FEAT_ID":20,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Joann Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"818-888-3939","LIB_FEAT_ID":23,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-888-3939","LIB_FEAT_ID":23}]},{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"PASSENGERS","RECORD_ID":"DEF456","INTERNAL_ID":2,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":1,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joseph Schmidt","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":3,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"John Parker","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":6,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+SURNAME+PHONE-DOB","ERRULE_CODE":"CFF_SURNAME","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Craig Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":3,"ENTITY_NAME":"John Parker","FEATURES":{"ADDRESS":[{"FEAT_DESC":"101 Fifth Ave, Los Angeles, CA 90018","LIB_FEAT_ID":22,"FEAT_DESC_VALUES":[{"FEAT_DESC":"101 Fifth Ave, Los Angeles, CA 90018","LIB_FEAT_ID":22}]}],"DOB":[{"FEAT_DESC":"17-DEC-1977","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"17-DEC-1977","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"John Parker","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"John Parker","LIB_FEAT_ID":47}]}],"PHONE":[{"FEAT_DESC":"818-999-2121","LIB_FEAT_ID":49,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-999-2121","LIB_FEAT_ID":49}]},{"FEAT_DESC":"818-555-1313","LIB_FEAT_ID":50,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-555-1313","LIB_FEAT_ID":50}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"PASSENGERS","RECORD_ID":"GHI789","INTERNAL_ID":3,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":2,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joann Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":4,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Jane Donaldson","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":4,"ENTITY_NAME":"Jane Donaldson","FEATURES":{"ADDRESS":[{"FEAT_DESC":"400 River Street, Pasadena, CA 90034","LIB_FEAT_ID":65,"FEAT_DESC_VALUES":[{"FEAT_DESC":"400 River Street, Pasadena, CA 90034","LIB_FEAT_ID":65}]}],"DOB":[{"FEAT_DESC":"23-MAY-1973","LIB_FEAT_ID":64,"FEAT_DESC_VALUES":[{"FEAT_DESC":"23-MAY-1973","LIB_FEAT_ID":64}]}],"NAME":[{"FEAT_DESC":"Jane Donaldson","LIB_FEAT_ID":63,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Jane Donaldson","LIB_FEAT_ID":63}]}],"PHONE":[{"FEAT_DESC":"818-222-3131","LIB_FEAT_ID":66,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-222-3131","LIB_FEAT_ID":66}]},{"FEAT_DESC":"818-555-1313","LIB_FEAT_ID":50,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-555-1313","LIB_FEAT_ID":50}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"PASSENGERS","RECORD_ID":"JKL012","INTERNAL_ID":4,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":3,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"John Parker","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":10,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PNAME+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Jane Johnson","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":5,"ENTITY_NAME":"Bill Bandley","FEATURES":{"ADDRESS":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3,"FEAT_DESC_VALUES":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"22-AUG-1981","LIB_FEAT_ID":81,"FEAT_DESC_VALUES":[{"FEAT_DESC":"22-AUG-1981","LIB_FEAT_ID":81}]}],"NAME":[{"FEAT_DESC":"Bill Bandley","LIB_FEAT_ID":80,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Bill Bandley","LIB_FEAT_ID":80}]}],"PHONE":[{"FEAT_DESC":"818-123-4567","LIB_FEAT_ID":82,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-123-4567","LIB_FEAT_ID":82}]},{"FEAT_DESC":"818-444-2121","LIB_FEAT_ID":83,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-444-2121","LIB_FEAT_ID":83}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"EMPLOYEES","RECORD_ID":"MNO345","INTERNAL_ID":5,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":1,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joseph Schmidt","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":8,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Katrina Osmond","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":6,"ENTITY_NAME":"Craig Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"451 Dover Street, Los Angeles, CA 90018","LIB_FEAT_ID":108,"FEAT_DESC_VALUES":[{"FEAT_DESC":"451 Dover Street, Los Angeles, CA 90018","LIB_FEAT_ID":108}]}],"DOB":[{"FEAT_DESC":"17-OCT-1983","LIB_FEAT_ID":107,"FEAT_DESC_VALUES":[{"FEAT_DESC":"17-OCT-1983","LIB_FEAT_ID":107}]}],"NAME":[{"FEAT_DESC":"Craig Smith","LIB_FEAT_ID":106,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Craig Smith","LIB_FEAT_ID":106}]}],"PHONE":[{"FEAT_DESC":"818-888-3939","LIB_FEAT_ID":23,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-888-3939","LIB_FEAT_ID":23}]},{"FEAT_DESC":"818-555-1212","LIB_FEAT_ID":109,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-555-1212","LIB_FEAT_ID":109}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"EMPLOYEES","RECORD_ID":"PQR678","INTERNAL_ID":6,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":2,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+SURNAME+PHONE-DOB","ERRULE_CODE":"CFF_SURNAME","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joann Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":7,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Kim Long","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":7,"ENTITY_NAME":"Kim Long","FEATURES":{"ADDRESS":[{"FEAT_DESC":"451 Dover Street, Los Angeles, CA 90018","LIB_FEAT_ID":108,"FEAT_DESC_VALUES":[{"FEAT_DESC":"451 Dover Street, Los Angeles, CA 90018","LIB_FEAT_ID":108}]}],"DOB":[{"FEAT_DESC":"24-NOV-1975","LIB_FEAT_ID":134,"FEAT_DESC_VALUES":[{"FEAT_DESC":"24-NOV-1975","LIB_FEAT_ID":134}]}],"NAME":[{"FEAT_DESC":"Kim Long","LIB_FEAT_ID":133,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kim Long","LIB_FEAT_ID":133}]}],"PHONE":[{"FEAT_DESC":"818-135-7913","LIB_FEAT_ID":135,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-135-7913","LIB_FEAT_ID":135}]},{"FEAT_DESC":"818-246-8024","LIB_FEAT_ID":136,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-246-8024","LIB_FEAT_ID":136}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"EMPLOYEES","RECORD_ID":"ABC567","INTERNAL_ID":7,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":6,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Craig Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":8,"ENTITY_NAME":"Katrina Osmond","FEATURES":{"ADDRESS":[{"FEAT_DESC":"707 Seventh Ave, Los Angeles, CA 90043","LIB_FEAT_ID":161,"FEAT_DESC_VALUES":[{"FEAT_DESC":"707 Seventh Ave, Los Angeles, CA 90043","LIB_FEAT_ID":161}]}],"DOB":[{"FEAT_DESC":"27-JUN-1980","LIB_FEAT_ID":160,"FEAT_DESC_VALUES":[{"FEAT_DESC":"27-JUN-1980","LIB_FEAT_ID":160}]}],"NAME":[{"FEAT_DESC":"Katrina Osmond","LIB_FEAT_ID":159,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Katrina Osmond","LIB_FEAT_ID":159}]}],"PHONE":[{"FEAT_DESC":"818-111-2222","LIB_FEAT_ID":162,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-111-2222","LIB_FEAT_ID":162}]},{"FEAT_DESC":"818-444-2121","LIB_FEAT_ID":83,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-444-2121","LIB_FEAT_ID":83}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"EMPLOYEES","RECORD_ID":"DEF890","INTERNAL_ID":8,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":5,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Bill Bandley","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]},{"ENTITY_ID":12,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Kelly Rogers","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":9,"ENTITY_NAME":"Martha Wayne","FEATURES":{"ADDRESS":[{"FEAT_DESC":"888 Sepulveda Blvd, Los Angeles, CA 90034","LIB_FEAT_ID":178,"FEAT_DESC_VALUES":[{"FEAT_DESC":"888 Sepulveda Blvd, Los Angeles, CA 90034","LIB_FEAT_ID":178}]}],"DOB":[{"FEAT_DESC":"27-NOV-1973","LIB_FEAT_ID":177,"FEAT_DESC_VALUES":[{"FEAT_DESC":"27-NOV-1973","LIB_FEAT_ID":177}]}],"NAME":[{"FEAT_DESC":"Martha Wayne","LIB_FEAT_ID":176,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Martha Wayne","LIB_FEAT_ID":176}]}],"PHONE":[{"FEAT_DESC":"818-987-1234","LIB_FEAT_ID":179,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-987-1234","LIB_FEAT_ID":179}]},{"FEAT_DESC":"818-891-9292","LIB_FEAT_ID":180,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-891-9292","LIB_FEAT_ID":180}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"VIPS","RECORD_ID":"STU901","INTERNAL_ID":9,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":11,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PNAME+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Martha Kent","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":10,"ENTITY_NAME":"Jane Johnson","FEATURES":{"ADDRESS":[{"FEAT_DESC":"400 River Street, Pasadena, CA 90034","LIB_FEAT_ID":65,"FEAT_DESC_VALUES":[{"FEAT_DESC":"400 River Street, Pasadena, CA 90034","LIB_FEAT_ID":65}]}],"DOB":[{"FEAT_DESC":"6-SEP-1975","LIB_FEAT_ID":196,"FEAT_DESC_VALUES":[{"FEAT_DESC":"6-SEP-1975","LIB_FEAT_ID":196}]}],"NAME":[{"FEAT_DESC":"Jane Johnson","LIB_FEAT_ID":195,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Jane Johnson","LIB_FEAT_ID":195}]}],"PHONE":[{"FEAT_DESC":"818-123-9876","LIB_FEAT_ID":197,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-123-9876","LIB_FEAT_ID":197}]},{"FEAT_DESC":"818-333-7171","LIB_FEAT_ID":198,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-333-7171","LIB_FEAT_ID":198}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"VIPS","RECORD_ID":"XYZ234","INTERNAL_ID":10,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":4,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PNAME+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Jane Donaldson","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":11,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Martha Kent","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]},{"ENTITY_ID":12,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Kelly Rogers","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":11,"ENTITY_NAME":"Martha Kent","FEATURES":{"ADDRESS":[{"FEAT_DESC":"888 Sepulveda Blvd, Los Angeles, CA 90034","LIB_FEAT_ID":178,"FEAT_DESC_VALUES":[{"FEAT_DESC":"888 Sepulveda Blvd, Los Angeles, CA 90034","LIB_FEAT_ID":178}]}],"DOB":[{"FEAT_DESC":"17-AUG-1978","LIB_FEAT_ID":222,"FEAT_DESC_VALUES":[{"FEAT_DESC":"17-AUG-1978","LIB_FEAT_ID":222}]}],"NAME":[{"FEAT_DESC":"Martha Kent","LIB_FEAT_ID":221,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Martha Kent","LIB_FEAT_ID":221}]}],"PHONE":[{"FEAT_DESC":"818-123-9876","LIB_FEAT_ID":197,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-123-9876","LIB_FEAT_ID":197}]},{"FEAT_DESC":"818-333-5757","LIB_FEAT_ID":223,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-333-5757","LIB_FEAT_ID":223}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"VIPS","RECORD_ID":"GHI123","INTERNAL_ID":11,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":9,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PNAME+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Martha Wayne","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]},{"ENTITY_ID":10,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Jane Johnson","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":12,"ENTITY_NAME":"Kelly Rogers","FEATURES":{"ADDRESS":[{"FEAT_DESC":"707 Seventh Ave, Los Angeles, CA 90043","LIB_FEAT_ID":161,"FEAT_DESC_VALUES":[{"FEAT_DESC":"707 Seventh Ave, Los Angeles, CA 90043","LIB_FEAT_ID":161}]}],"DOB":[{"FEAT_DESC":"15-JAN-1979","LIB_FEAT_ID":236,"FEAT_DESC_VALUES":[{"FEAT_DESC":"15-JAN-1979","LIB_FEAT_ID":236}]}],"NAME":[{"FEAT_DESC":"Kelly Rogers","LIB_FEAT_ID":235,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kelly Rogers","LIB_FEAT_ID":235}]}],"PHONE":[{"FEAT_DESC":"818-789-6543","LIB_FEAT_ID":237,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-789-6543","LIB_FEAT_ID":237}]},{"FEAT_DESC":"818-333-7171","LIB_FEAT_ID":198,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-333-7171","LIB_FEAT_ID":198}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"VIPS","RECORD_ID":"JKL456","INTERNAL_ID":12,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":8,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Katrina Osmond","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]},{"ENTITY_ID":10,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Jane Johnson","RECORD_SUMMARY":[{"DATA_SOURCE":"VIPS","RECORD_COUNT":1}]}]}
{"RESOLVED_ENTITY":{"ENTITY_ID":100002,"ENTITY_NAME":"Joe Schmoe","FEATURES":{"EMAIL":[{"FEAT_DESC":"joeschmoe@nowhere.com","LIB_FEAT_ID":100003,"FEAT_DESC_VALUES":[{"FEAT_DESC":"joeschmoe@nowhere.com","LIB_FEAT_ID":100003}]}],"NAME":[{"FEAT_DESC":"Joe Schmoe","LIB_FEAT_ID":100001,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Joe Schmoe","LIB_FEAT_ID":100001}]}],"PHONE":[{"FEAT_DESC":"702-555-1212","LIB_FEAT_ID":100002,"FEAT_DESC_VALUES":[{"FEAT_DESC":"702-555-1212","LIB_FEAT_ID":100002}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"ABC123","INTERNAL_ID":100002,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[]}

Remarks

Used in conjunction with FetchNext(IntPtr) and CloseExportReport(IntPtr). Each FetchNext(IntPtr) call returns exported entity data as a JSON object.

WARNING: Use with large repositories is not advised.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzExportFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

FetchNext(IntPtr)

Fetches the next line of entity data from an open export report.

string FetchNext(IntPtr exportHandle)

Parameters

exportHandle IntPtr

The export handle for the export report from which to retrieve the next line of data.

Returns

string

The next line of export data whose format depends on which function was used to initiate the export, or null if there is no more data to be exported via the specified handle.

Examples

Usage (JSON Export):

// How to export entity data in JSON format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportJsonEntityReport(SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the first JSON record
        string jsonData = engine.FetchNext(exportHandle);

        while (jsonData != null)
        {
            // parse the JSON data
            JsonObject? jsonObject = JsonNode.Parse(jsonData)?.AsObject();

            // do something with the parsed data (varies by application)
            ProcessJsonRecord(jsonObject);

            // fetch the next JSON record
            jsonData = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform JSON export.", e);
}

Example JSON Line Result:

{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"Joseph Schmidt","FEATURES":{"ADDRESS":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3,"FEAT_DESC_VALUES":[{"FEAT_DESC":"101 Main Street, Los Angeles, CA 90011","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12-JAN-1981","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12-JAN-1981","LIB_FEAT_ID":2}]}],"NAME":[{"FEAT_DESC":"Joseph Schmidt","LIB_FEAT_ID":1,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Joseph Schmidt","LIB_FEAT_ID":1}]}],"PHONE":[{"FEAT_DESC":"818-777-2424","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"818-777-2424","LIB_FEAT_ID":4}]},{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"213-555-1212","LIB_FEAT_ID":5}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"PASSENGERS","RECORD_ID":"ABC123","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":""}]},"RELATED_ENTITIES":[{"ENTITY_ID":2,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+PHONE-DOB","ERRULE_CODE":"SF1","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Joann Smith","RECORD_SUMMARY":[{"DATA_SOURCE":"PASSENGERS","RECORD_COUNT":1}]},{"ENTITY_ID":5,"MATCH_LEVEL_CODE":"POSSIBLY_RELATED","MATCH_KEY":"+ADDRESS-DOB","ERRULE_CODE":"SFF","IS_DISCLOSED":0,"IS_AMBIGUOUS":0,"ENTITY_NAME":"Bill Bandley","RECORD_SUMMARY":[{"DATA_SOURCE":"EMPLOYEES","RECORD_COUNT":1}]}]}

Usage (CSV Export):

// How to export entity data in CSV format
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // export the JSON data
    IntPtr exportHandle = engine.ExportCsvEntityReport("*", SzExportDefaultFlags);

    // read the data
    try
    {
        // fetch the CSV header line from the exported data
        string csvHeaders = engine.FetchNext(exportHandle);

        // process the CSV headers (varies by application)
        ProcessCsvHeaders(csvHeaders);

        // fetch the first CSV record from the exported data
        string csvRecord = engine.FetchNext(exportHandle);

        while (csvRecord != null)
        {
            // do something with the exported record (varies by application)
            ProcessCsvRecord(csvRecord);

            // fetch the next exported CSV record
            csvRecord = engine.FetchNext(exportHandle);
        }

    }
    finally
    {
        // close the export handle
        engine.CloseExportReport(exportHandle);
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to perform CSV export.", e);
}

Example CSV Header Result:

RESOLVED_ENTITY_ID,RESOLVED_ENTITY_NAME,RELATED_ENTITY_ID,MATCH_LEVEL,MATCH_LEVEL_CODE,MATCH_KEY,MATCH_KEY_DETAILS,IS_DISCLOSED,IS_AMBIGUOUS,DATA_SOURCE,RECORD_ID,JSON_DATA,FIRST_SEEN_DT,LAST_SEEN_DT,UNMAPPED_DATA,ERRULE_CODE,RELATED_ENTITY_NAME

Example CSV Data Result:

1,"Joseph Schmidt",0,0,"","","",0,0,"PASSENGERS","ABC123","{""RECORD_ID"":""ABC123"",""NAME_FIRST"":""Joseph"",""NAME_LAST"":""Schmidt"",""MOBILE_PHONE_NUMBER"":""213-555-1212"",""HOME_PHONE_NUMBER"":""818-777-2424"",""ADDR_FULL"":""101 Main Street, Los Angeles, CA 90011"",""DATE_OF_BIRTH"":""12-JAN-1981"",""DATA_SOURCE"":""PASSENGERS""}","2025-08-29T19:45:25Z","2025-08-29T19:45:25Z","{}","",""

Remarks

Used in conjunction with ExportJsonEntityReport(SzFlag?), ExportCsvEntityReport(string, SzFlag?) and CloseExportReport(IntPtr).

If the export handle was obtained from ExportCsvEntityReport(string, SzFlag?), this returns the CSV header on the first call and exported entity data in CSV format on subsequent calls.

If the export handle was obtained from ExportJsonEntityReport(SzFlag?) this returns exported entity data as a JSON object.

When null is returned, the export report is complete and the caller should invoke CloseExportReport(IntPtr) to free resources.

Exceptions

SzException

If the specified export handle has already been closed or if any other failure occurs.

See Also

FindInterestingEntities(long, SzFlag?)

Experimental method.

string FindInterestingEntities(long entityID, SzFlag? flags = (SzFlag)0)

Parameters

entityID long

The entity ID identifying the entity that will be the focus for the interesting entities to be returned.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindInterestingEntitiesFlags group control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzFindInterestingEntitiesDefaultFlags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the interesting entities.

Examples

Usage:

// How to find interesting entities related to an entity via entity ID
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the ID of an entity to retrieve (varies by application)
    long entityID = GetEntityID();

    // find the interesting entities by entity ID
    string result = engine.FindInterestingEntities(
        entityID, SzFindInterestingEntitiesDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();

    . . .

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to find interesting entities by entity ID.", e);
}

Remarks

Contact Senzing support for the further information.

The optionally specified bitwise-OR'd SzFlag values may contain any flags, but only flags belonging to the SzFindInterestingEntitiesFlags group are guaranteed to be recognized (other SzFlag instances will be ignored unless they have equivalent bit flags to supported flags).

Exceptions

SzNotFoundException

If no entity could be found with the specified entity ID.

SzException

If a failure occurs.

See Also

FindInterestingEntities(string, string, SzFlag?)

Experimental method.

string FindInterestingEntities(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)

Parameters

dataSourceCode string

The data source code that identifies the data source of the constituent record belonging to the entity that is the focus for the interesting entities to be returned.

recordID string

The record ID (unique within the scope of the record's data source) identifying the constituent record belonging to the entity that is the focus for the interesting entities to be returned.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindInterestingEntitiesFlags group control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzFindInterestingEntitiesDefaultFlags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the interesting entities.

Examples

Usage:

// How to find interesting entities related to an entity via record key
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // retrieve the entity by record key                
    string result = engine.FindInterestingEntities(
        "TEST", "ABC123", SzFindInterestingEntitiesDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();

    . . .

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to find interesting entities by record key.", e);
}

Remarks

Contact Senzing support for the further information.

The optionally specified bitwise-OR'd SzFlag values may contain any flags, but only flags belonging to the SzFindInterestingEntitiesFlags group are guaranteed to be recognized (other SzFlag instances will be ignored unless they have equivalent bit flags to supported flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If no record can be found for the specified record ID.

SzException

If a failure occurs.

FindNetwork(ISet<long>, int, int, int, SzFlag?)

Retrieves a network of relationships among entities, specified by entity IDs.

string FindNetwork(ISet<long> entityIDs, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindNetworkIncludeMatchingInfo)

Parameters

entityIDs ISet<long>

The non-null ISet<T> of long entity ID's identifying the entities for which to build the network.

maxDegrees int

The maximum number of degrees for the path search between the specified entities. The maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size.

buildOutDegrees int

The number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out. If this is non-zero, the size of the network can be limited to a maximum total number of build-out entities for the whole network.

buildOutMaxEntities int

The maximum number of entities to build out for the entire network. This limits the size of the build-out network when the build-out degrees is non-zero.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindNetworkFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindNetworkDefaultFlags). Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the resultant entity network and the entities on the network.

Examples

Usage:

// How to find an entity network using entity ID's
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get entity ID's for the path endpoints (varies by application)
    ISet<long> entityIDs = GetNetworkEntityIDs();

    // determine the maximum path degrees (varies by application)
    int maxDegrees = 3;

    // determine the degrees to build-out the network (varies by application)
    int buildOutDegrees = 0;

    // determine the max entities to build-out (varies by application)
    int buildOutMaxEntities = 10;

    // retrieve the entity network using the entity ID's
    string result = engine.FindNetwork(entityIDs,
                                       maxDegrees,
                                       buildOutDegrees,
                                       buildOutMaxEntities,
                                       SzFindNetworkDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonArray? pathArr = jsonObject?["ENTITY_PATHS"]?.AsArray();

    for (int index = 0; pathArr != null && index < pathArr.Count; index++)
    {
        JsonObject? path = pathArr[index]?.AsObject();

        long startEntityID = path?["START_ENTITY_ID"]?.GetValue<long>() ?? 0L;
        long endEntityID = path?["END_ENTITY_ID"]?.GetValue<long>() ?? 0L;
        JsonArray? pathIDs = path?["ENTITIES"]?.AsArray();

        for (int index2 = 0; pathIDs != null && index2 < pathIDs.Count; index2++)
        {
            long entityID = pathIDs[index2]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity network.", e);
}

Example Result: (formatted for readability)

{
  "ENTITY_PATHS": [
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 7,
      "ENTITIES": [
        1,
        2,
        6,
        7
      ]
    },
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 12,
      "ENTITIES": [
        1,
        5,
        8,
        12
      ]
    },
    {
      "START_ENTITY_ID": 7,
      "END_ENTITY_ID": 12,
      "ENTITIES": []
    }
  ],
  "ENTITY_NETWORK_LINKS": [
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 2,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 5,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 2,
      "MAX_ENTITY_ID": 6,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE\u002BSURNAME-DOB",
      "ERRULE_CODE": "CFF_SURNAME",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 5,
      "MAX_ENTITY_ID": 8,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 6,
      "MAX_ENTITY_ID": 7,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 8,
      "MAX_ENTITY_ID": 12,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 1,
        "ENTITY_NAME": "Joseph Schmidt",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 2,
        "ENTITY_NAME": "Joann Smith",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5,
        "ENTITY_NAME": "Bill Bandley",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 6,
        "ENTITY_NAME": "Craig Smith",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 7,
        "ENTITY_NAME": "Kim Long",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8,
        "ENTITY_NAME": "Katrina Osmond",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 12,
        "ENTITY_NAME": "Kelly Rogers",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "VIPS",
            "RECORD_COUNT": 1
          }
        ]
      }
    }
  ]
}

Remarks

WARNING: Entity networks may be very large due to the volume of inter-related data in the repository. The parameters of this method can be used to limit the information returned.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzFindNetworkFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If any of the entities for the specified entity ID's cannot be found.

SzException

If a failure occurs.

See Also

FindNetwork(ISet<(string dataSourceCode, string recordID)>, int, int, int, SzFlag?)

Retrieves a network of relationships among entities, specified by record IDs.

string FindNetwork(ISet<(string dataSourceCode, string recordID)> recordKeys, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindNetworkIncludeMatchingInfo)

Parameters

recordKeys ISet<(string dataSourceCode, string recordID)>

The non-null ISet<T> of tuples of data source code and record ID pairs identifying the constituent records of the entities for which to build the network.

maxDegrees int

The maximum number of degrees for the path search between the specified entities. The maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size.

buildOutDegrees int

The number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out. If this is non-zero, the size of the network can be limited to a maximum total number of build-out entities for the whole network.

buildOutMaxEntities int

The maximum number of entities to build out for the entire network. This limits the size of the build-out network when the build-out degrees is non-zero.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindNetworkFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindNetworkDefaultFlags). Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the resultant entity network and the entities on the network.

Examples

Usage:

// How to find an entity network using record keys
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get entity ID's for the path endpoints (varies by application)
    ISet<(string, string)> recordKeys = GetNetworkRecordKeys();

    // determine the maximum path degrees (varies by application)
    int maxDegrees = 3;

    // determine the degrees to build-out the network (varies by application)
    int buildOutDegrees = 0;

    // determine the max entities to build-out (varies by application)
    int buildOutMaxEntities = 10;

    // retrieve the entity network using the record keys
    string result = engine.FindNetwork(recordKeys,
                                       maxDegrees,
                                       buildOutDegrees,
                                       buildOutMaxEntities,
                                       SzFindNetworkDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonArray? pathArr = jsonObject?["ENTITY_PATHS"]?.AsArray();

    for (int index = 0; pathArr != null && index < pathArr.Count; index++)
    {
        JsonObject? path = pathArr[index]?.AsObject();

        long startEntityID = path?["START_ENTITY_ID"]?.GetValue<long>() ?? 0L;
        long endEntityID = path?["END_ENTITY_ID"]?.GetValue<long>() ?? 0L;
        JsonArray? pathIDs = path?["ENTITIES"]?.AsArray();

        for (int index2 = 0; pathIDs != null && index2 < pathIDs.Count; index2++)
        {
            long entityID = pathIDs[index2]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity network.", e);
}

Example Result: (formatted for readability)

{
  "ENTITY_PATHS": [
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 7,
      "ENTITIES": [
        1,
        2,
        6,
        7
      ]
    },
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 12,
      "ENTITIES": [
        1,
        5,
        8,
        12
      ]
    },
    {
      "START_ENTITY_ID": 7,
      "END_ENTITY_ID": 12,
      "ENTITIES": []
    }
  ],
  "ENTITY_NETWORK_LINKS": [
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 2,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 5,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 2,
      "MAX_ENTITY_ID": 6,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE\u002BSURNAME-DOB",
      "ERRULE_CODE": "CFF_SURNAME",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 5,
      "MAX_ENTITY_ID": 8,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 6,
      "MAX_ENTITY_ID": 7,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 8,
      "MAX_ENTITY_ID": 12,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 1,
        "ENTITY_NAME": "Joseph Schmidt",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 2,
        "ENTITY_NAME": "Joann Smith",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5,
        "ENTITY_NAME": "Bill Bandley",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 6,
        "ENTITY_NAME": "Craig Smith",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 7,
        "ENTITY_NAME": "Kim Long",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8,
        "ENTITY_NAME": "Katrina Osmond",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 12,
        "ENTITY_NAME": "Kelly Rogers",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "VIPS",
            "RECORD_COUNT": 1
          }
        ]
      }
    }
  ]
}

Remarks

WARNING: Entity networks may be very large due to the volume of inter-related data in the repository. The parameters of this method can be used to limit the information returned.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzFindNetworkFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If any of the records for the specified data source code and record ID pairs cannot be found.

SzException

If a failure occurs.

See Also

FindPath(long, long, int, ISet<long>, ISet<string>, SzFlag?)

Searches for the shortest relationship path between two entities, specified by entity IDs.

string FindPath(long startEntityID, long endEntityID, int maxDegrees, ISet<long> avoidEntityIDs = null, ISet<string> requiredDataSources = null, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindPathIncludeMatchingInfo)

Parameters

startEntityID long

The entity ID of the first entity.

endEntityID long

The entity ID of the second entity.

maxDegrees int

The maximum number of degrees for the path search.

avoidEntityIDs ISet<long>

The optional ISet<T> of long entity ID's identifying entities to be avoided when finding the path, or null if no entities are to be avoided. By default the entities will be avoided unless necessary to find the path. To strictly avoid the entities specify the SzFindPathStrictAvoid flag.

requiredDataSources ISet<string>

The optional ISet<T> of non-null string data source codes identifying the data sources for which at least one record must be included on the path, or null if none are required.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindPathFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindPathDefaultFlags). Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters.

Examples

Usage:

// How to find an entity path using entity ID's
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get entity ID's for the path endpoints (varies by application)
    long startEntityID = GetPathStartEntityID();
    long endEntityID = GetPathEndEntityID();

    // determine the maximum path degrees (varies by application)
    int maxDegrees = 4;

    // determine any entities to be avoided (varies by application)
    ISet<long> avoidEntities = GetPathAvoidEntityIDs();

    // determine any data sources to require in the path (varies by application)
    ISet<string>? requiredSources = null;

    // retrieve the entity path using the entity ID's
    string result = engine.FindPath(startEntityID,
                                    endEntityID,
                                    maxDegrees,
                                    avoidEntities,
                                    requiredSources,
                                    SzFindPathDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonArray? pathArr = jsonObject?["ENTITY_PATHS"]?.AsArray();

    for (int index = 0; pathArr != null && index < pathArr.Count; index++)
    {
        JsonObject? path = pathArr[index]?.AsObject();
        JsonArray? entityIDs = path?["ENTITIES"]?.AsArray();

        for (int index2 = 0; entityIDs != null && index2 < entityIDs.Count; index2++)
        {
            long entityID = entityIDs[index2]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity path by entity ID.", e);
}

Example Result: (formatted for readability)

{
  "ENTITY_PATHS": [
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 12,
      "ENTITIES": [
        1,
        5,
        8,
        12
      ]
    }
  ],
  "ENTITY_PATH_LINKS": [
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 5,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 5,
      "MAX_ENTITY_ID": 8,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 8,
      "MAX_ENTITY_ID": 12,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 1,
        "ENTITY_NAME": "Joseph Schmidt",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5,
        "ENTITY_NAME": "Bill Bandley",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8,
        "ENTITY_NAME": "Katrina Osmond",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 12,
        "ENTITY_NAME": "Kelly Rogers",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "VIPS",
            "RECORD_COUNT": 1
          }
        ]
      }
    }
  ]
}

Remarks

The returned path is the shortest path among the paths that satisfy the parameters.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the level of detail provided for the entity path and those entities on the path. Any SzFlag value may be included, but only flags belonging to the SzFindPathFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If either the path-start or path-end entities for the specified entity ID's cannot be found.

SzUnknownDataSourceException

If an unrecognized required data source is specified.

SzException

If a failure occurs.

See Also

FindPath(string, string, string, string, int, ISet<(string dataSourceCode, string recordID)>, ISet<string>, SzFlag?)

Searches for the shortest relationship path between two entities, specified by record IDs.

string FindPath(string startDataSourceCode, string startRecordID, string endDataSourceCode, string endRecordID, int maxDegrees, ISet<(string dataSourceCode, string recordID)> avoidRecordKeys = null, ISet<string> requiredDataSources = null, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindPathIncludeMatchingInfo)

Parameters

startDataSourceCode string

The data source code identifying the data source for the starting record of the requested path.

startRecordID string

The record ID that uniquely identifies the starting record of the requested path within the scope of its associated data source.

endDataSourceCode string

The data source code identifying the data source for the ending record of the requested path.

endRecordID string

The record ID that uniquely identifies the ending record of the requested path within the scope of its associated data source.

maxDegrees int

The maximum number of degrees for the path search.

avoidRecordKeys ISet<(string dataSourceCode, string recordID)>

The optional ISet<T> of tuples containing data source code and record ID pairs identifying records whose entities are to be avoided when finding the path, or null if no entities are to be avoided. By default the entities will be avoided unless necessary to find the path. To strictly avoid the entities specify the SzFindPathStrictAvoid flag.

requiredDataSources ISet<string>

The optionalISet<T> of non-null string data source codes identifying the data sources for which at least one record must be included on the path, or null if none are required.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzFindPathFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindPathDefaultFlags). Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters.

Examples

Usage:

// How to find an entity path using record keys
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get entity ID's for the path endpoints (varies by application)
    (string dataSourceCode, string recordID) startRecordKey = GetPathStartRecordKey();
    (string dataSourceCode, string recordID) endRecordKey = GetPathEndRecordKey();

    // determine the maximum path degrees (varies by application)
    int maxDegrees = 4;

    // determine any records to be avoided (varies by application)
    ISet<(string, string)> avoidRecords = GetPathAvoidRecordKeys();

    // determine any data sources to require in the path (varies by application)
    ISet<string>? requiredSources = null;

    // retrieve the entity path using the record keys
    string result = engine.FindPath(startRecordKey.dataSourceCode,
                                    startRecordKey.recordID,
                                    endRecordKey.dataSourceCode,
                                    endRecordKey.recordID,
                                    maxDegrees,
                                    avoidRecords,
                                    requiredSources,
                                    SzFindPathDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonArray? pathArr = jsonObject?["ENTITY_PATHS"]?.AsArray();

    for (int index = 0; pathArr != null && index < pathArr.Count; index++)
    {
        JsonObject? path = pathArr[index]?.AsObject();
        JsonArray? entityIDs = path?["ENTITIES"]?.AsArray();

        for (int index2 = 0; entityIDs != null && index2 < entityIDs.Count; index2++)
        {
            long entityID = entityIDs[index2]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity path by record key.", e);
}

Example Result: (formatted for readability)

{
  "ENTITY_PATHS": [
    {
      "START_ENTITY_ID": 1,
      "END_ENTITY_ID": 12,
      "ENTITIES": [
        1,
        5,
        8,
        12
      ]
    }
  ],
  "ENTITY_PATH_LINKS": [
    {
      "MIN_ENTITY_ID": 1,
      "MAX_ENTITY_ID": 5,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 5,
      "MAX_ENTITY_ID": 8,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BPHONE-DOB",
      "ERRULE_CODE": "SF1",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    },
    {
      "MIN_ENTITY_ID": 8,
      "MAX_ENTITY_ID": 12,
      "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
      "MATCH_KEY": "\u002BADDRESS-DOB",
      "ERRULE_CODE": "SFF",
      "IS_DISCLOSED": 0,
      "IS_AMBIGUOUS": 0
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 1,
        "ENTITY_NAME": "Joseph Schmidt",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "PASSENGERS",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5,
        "ENTITY_NAME": "Bill Bandley",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8,
        "ENTITY_NAME": "Katrina Osmond",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "EMPLOYEES",
            "RECORD_COUNT": 1
          }
        ]
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 12,
        "ENTITY_NAME": "Kelly Rogers",
        "RECORD_SUMMARY": [
          {
            "DATA_SOURCE": "VIPS",
            "RECORD_COUNT": 1
          }
        ]
      }
    }
  ]
}

Remarks

The returned path is the shortest path among the paths that satisfy the parameters.

The optionally specified bitwise-OR'd SzFlag values may contain any SzFlag value, but only flags belonging to the SzFindPathFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags).

Exceptions

SzNotFoundException

If either the path-start or path-end records for the specified data source code and record ID pairs cannot be found.

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzException

If a failure occurs.

See Also

GetEntity(long, SzFlag?)

Retrieves information about an entity, specified by entity ID.

string GetEntity(long entityID, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)

Parameters

entityID long

The entity ID identifying the entity to retrieve.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzEntityDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the entity.

Examples

Usage:

// How to retrieve an entity via its entity ID
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the ID of an entity to retrieve (varies by application)
    long entityID = GetEntityID();

    // retrieve the entity by entity ID                
    string result = engine.GetEntity(entityID, SzEntityDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonObject? entity = jsonObject?["RESOLVED_ENTITY"]?.AsObject();
    string? entityName = entity?["ENTITY_NAME"]?.GetValue<string>();

    . . .

    if (jsonObject != null && jsonObject.ContainsKey("RECORDS"))
    {

        JsonArray? recordArr = jsonObject["RECORDS"]?.AsArray();

        for (int index = 0; recordArr != null && index < recordArr.Count; index++)
        {
            JsonObject? record = recordArr[index]?.AsObject();

            string? dataSource = record?["DATA_SOURCE"]?.GetValue<string>();
            string? recordID = record?["RECORD_ID"]?.GetValue<string>();

            . . .
        }
    }

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity by entity ID.", e);
}

Example Result: (formatted for readability)

{
  "RESOLVED_ENTITY": {
    "ENTITY_ID": 100002,
    "ENTITY_NAME": "Joe Schmoe",
    "FEATURES": {
      "EMAIL": [
        {
          "FEAT_DESC": "joeschmoe@nowhere.com",
          "LIB_FEAT_ID": 100003,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "joeschmoe@nowhere.com",
              "LIB_FEAT_ID": 100003
            }
          ]
        }
      ],
      "NAME": [
        {
          "FEAT_DESC": "Joe Schmoe",
          "LIB_FEAT_ID": 100001,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "Joe Schmoe",
              "LIB_FEAT_ID": 100001
            }
          ]
        }
      ],
      "PHONE": [
        {
          "FEAT_DESC": "702-555-1212",
          "LIB_FEAT_ID": 100002,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "702-555-1212",
              "LIB_FEAT_ID": 100002
            }
          ]
        }
      ]
    },
    "RECORD_SUMMARY": [
      {
        "DATA_SOURCE": "TEST",
        "RECORD_COUNT": 1
      }
    ],
    "RECORDS": [
      {
        "DATA_SOURCE": "TEST",
        "RECORD_ID": "ABC123",
        "INTERNAL_ID": 100002,
        "MATCH_KEY": "",
        "MATCH_LEVEL_CODE": "",
        "ERRULE_CODE": ""
      }
    ]
  },
  "RELATED_ENTITIES": []
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If no entity could be found with the specified entity ID.

SzException

If a failure occurs.

See Also

GetEntity(string, string, SzFlag?)

Retrieves information about an entity, specified by record ID.

string GetEntity(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)

Parameters

dataSourceCode string

The data source code that identifies the data source of the constituent record belonging to the entity to be retrieved.

recordID string

The record ID (unique within the scope of the record's data source) identifying the constituent record belonging to the entity to be retrieved.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzEntityDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the entity.

Examples

Usage:

// How to retrieve an entity via its record key
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // retrieve the entity by record key
    string result = engine.GetEntity("TEST", "ABC123", SzEntityDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonObject? entity = jsonObject?["RESOLVED_ENTITY"]?.AsObject();
    string? entityName = entity?["ENTITY_NAME"]?.GetValue<string>();

    . . .

    if (jsonObject != null && jsonObject.ContainsKey("RECORDS"))
    {

        JsonArray? recordArr = jsonObject["RECORDS"]?.AsArray();

        for (int index = 0; recordArr != null && index < recordArr.Count; index++)
        {
            JsonObject? record = recordArr[index]?.AsObject();

            string? dataSource = record?["DATA_SOURCE"]?.GetValue<string>();
            string? recordID = record?["RECORD_ID"]?.GetValue<string>();

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve entity by record key.", e);
}

Example Result: (formatted for readability)

{
  "RESOLVED_ENTITY": {
    "ENTITY_ID": 100002,
    "ENTITY_NAME": "Joe Schmoe",
    "FEATURES": {
      "EMAIL": [
        {
          "FEAT_DESC": "joeschmoe@nowhere.com",
          "LIB_FEAT_ID": 100003,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "joeschmoe@nowhere.com",
              "LIB_FEAT_ID": 100003
            }
          ]
        }
      ],
      "NAME": [
        {
          "FEAT_DESC": "Joe Schmoe",
          "LIB_FEAT_ID": 100001,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "Joe Schmoe",
              "LIB_FEAT_ID": 100001
            }
          ]
        }
      ],
      "PHONE": [
        {
          "FEAT_DESC": "702-555-1212",
          "LIB_FEAT_ID": 100002,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "702-555-1212",
              "LIB_FEAT_ID": 100002
            }
          ]
        }
      ]
    },
    "RECORD_SUMMARY": [
      {
        "DATA_SOURCE": "TEST",
        "RECORD_COUNT": 1
      }
    ],
    "RECORDS": [
      {
        "DATA_SOURCE": "TEST",
        "RECORD_ID": "ABC123",
        "INTERNAL_ID": 100002,
        "MATCH_KEY": "",
        "MATCH_LEVEL_CODE": "",
        "ERRULE_CODE": ""
      }
    ]
  },
  "RELATED_ENTITIES": []
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If no entity could be found with the specified entity ID.

SzException

If a failure occurs.

See Also

GetRecord(string, string, SzFlag?)

Retrieves information about a record.

string GetRecord(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzEntityIncludeRecordJsonData)

Parameters

dataSourceCode string

The data source code identifying the data source for the record.

recordID string

The record ID that uniquely identifies the record within the scope of its associated data source.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzRecordDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the record.

Examples

Usage:

// How to retrieve a record via its record key
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // retrieve the entity by record key
    string result = engine.GetRecord("TEST", "ABC123", SzRecordDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    string? dataSource = jsonObject?["DATA_SOURCE"]?.GetValue<string>();
    string? recordID = jsonObject?["RECORD_ID"]?.GetValue<string>();

    . . .

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Record not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve record by record key.", e);
}

Example Result: (formatted for readability)

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "ABC123",
  "JSON_DATA": {
    "DATA_SOURCE": "TEST",
    "RECORD_ID": "ABC123",
    "NAME_FULL": "Joe Schmoe",
    "PHONE_NUMBER": "702-555-1212",
    "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
  }
}

Remarks

The returned information contains the original record data that was loaded and may contain other information depending on the flags parameter.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If the record for the specified data source code and record ID pairs cannot be found.

SzException

If a failure occurs.

See Also

GetRecordPreview(string, SzFlag?)

Describes the features resulting from the hypothetical load of a record.

string GetRecordPreview(string recordDefinition, SzFlag? flags = SzFlag.SzEntityIncludeRecordFeatureDetails)

Parameters

recordDefinition string

The string that defines the record, typically in JSON format.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzRecordPreviewDefaultFlags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by getting a record preview (depending on the specified flags).

Examples

Usage:

// How to get a record preview
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get a record definition (varies by application)
    string recordDefinition =
            """
            {
                "DATA_SOURCE": "TEST",
                "RECORD_ID": "DEF456",
                "NAME_FULL": "John Doe",
                "PHONE_NUMBER": "702-555-1212",
                "EMAIL_ADDRESS": "johndoe@nowhere.com"
            }
            """;

    // get the record preview
    String preview = engine.GetRecordPreview(
        recordDefinition, SzRecordPreviewDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(preview)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("FEATURES"))
    {
        JsonObject? featuresObj = jsonObject["FEATURES"]?.AsObject();

        if (featuresObj != null)
        {
            foreach (KeyValuePair<string, JsonNode?> pair in featuresObj)
            {
                string featureName = pair.Key;
                . . .
            }
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to get a record preview.", e);
}

Example Result: (formatted for readability)

{
  "FEATURES": {
    "NAME": [
      {
        "LIB_FEAT_ID": -2,
        "FEAT_DESC": "John Doe",
        "ATTRIBUTES": {
          "NAME_FULL": "John Doe"
        }
      }
    ],
    "PHONE": [
      {
        "LIB_FEAT_ID": 100002,
        "FEAT_DESC": "702-555-1212",
        "ATTRIBUTES": {
          "PHONE_NUMBER": "702-555-1212"
        }
      }
    ],
    "EMAIL": [
      {
        "LIB_FEAT_ID": -3,
        "FEAT_DESC": "johndoe@nowhere.com",
        "ATTRIBUTES": {
          "EMAIL_ADDRESS": "johndoe@nowhere.com"
        }
      }
    ]
  }
}

Remarks

This method is used to preview the features for a record that has not been loaded.

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzRecordPreviewFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

GetRedoRecord()

Retrieves and removes a pending redo record.

string GetRedoRecord()

Returns

string

The retrieved redo record or null if there were no pending redo records.

Examples

Usage:

// How to check for and process redo records
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the redo count
    long redoCount = engine.CountRedoRecords();

    // check if we have redo records
    if (redoCount > 0L)
    {
        // get the next redo record
        string redoRecord = engine.GetRedoRecord();

        // loop while we still have redo records
        while (redoRecord != null)
        {
            try
            {
                // process the redo record
                string info = engine.ProcessRedoRecord(redoRecord, SzWithInfo);

                // do something with the "info JSON" (varies by application)
                JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
                if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
                {
                    JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();
                    for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
                    {
                        JsonObject? affected = affectedArr[index]?.AsObject();
                        long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

                        . . .
                    }
                }

            }
            catch (SzException e)
            {
                // handle or rethrow the other exceptions
                LogError("Failed to process redo record: " + redoRecord, e);
            }

            // get the next redo record
            redoRecord = engine.GetRedoRecord();
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to process redos.", e);
}

Remarks

A null value will be returned if there are no pending redo records. Use ProcessRedoRecord(string, SzFlag?) to process the result of this method. Once Once a redo record is retrieved, it is no longer tracked by Senzing. The redo record may be stored externally for later processing.

This method is used in conjunction with ProcessRedoRecord(string, SzFlag?) and CountRedoRecords().

Exceptions

SzException

If a failure occurs.

See Also

GetStats()

Gets and resets the internal engine workload statistics for the current operating system process.

string GetStats()

Returns

string

The string describing the statistics as JSON.

Examples

Usage:

// How to get engine stats after loading records
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // load some records to prime the stats
    . . .

    // get the stats
    string stats = engine.GetStats();

    // do something with the stats
    Log(stats);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to load records with stats.", e);
}

Example Result:
The example result is rather large, but can be viewed here (formatted for readability).

Remarks

The output is helpful when interacting with Senzing support. Best practice to periodically log the results.

Exceptions

SzException

If a failure occurs.

See Also

GetVirtualEntity(ISet<(string dataSourceCode, string recordID)>, SzFlag?)

Describes how an entity would look if composed of a given set of records.

string GetVirtualEntity(ISet<(string dataSourceCode, string recordID)> recordKeys, SzFlag? flags = SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo)

Parameters

recordKeys ISet<(string dataSourceCode, string recordID)>

The non-null non-empty ISet<T> of tuples of data source code and record ID pairs identifying the records to use to build the virtual entity.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzVirtualEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyEntitiesDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the virtual entity having the specified constituent records.

Examples

Usage:

// How to retrieve a virtual entity via a set of record keys
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the records to operate on (varies by application)
    ISet<(string, string)> recordKeys = GetVirtualEntityRecordKeys();

    // retrieve the virtual entity for the record keys
    string result = engine.GetVirtualEntity(recordKeys, SzVirtualEntityDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(result)?.AsObject();
    JsonObject? entity = jsonObject?["RESOLVED_ENTITY"]?.AsObject();
    string? entityName = entity?["ENTITY_NAME"]?.GetValue<string>();

    . . .

    if (jsonObject != null && jsonObject.ContainsKey("RECORDS"))
    {
        JsonArray? recordArr = jsonObject["RECORDS"]?.AsArray();

        for (int index = 0; recordArr != null && index < recordArr.Count; index++)
        {
            JsonObject? record = recordArr[index]?.AsObject();

            string? dataSource = record?["DATA_SOURCE"]?.GetValue<string>();
            string? recordID = record?["RECORD_ID"]?.GetValue<string>();

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Specified record key was not found.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve virtual entity.", e);
}

Example Result: (formatted for readability)

{
  "RESOLVED_ENTITY": {
    "ENTITY_ID": 2,
    "ENTITY_NAME": "Joann Smith",
    "FEATURES": {
      "ADDRESS": [
        {
          "FEAT_DESC": "101 Fifth Ave, Los Angeles, CA 90018",
          "LIB_FEAT_ID": 22,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "101 Fifth Ave, Los Angeles, CA 90018",
              "LIB_FEAT_ID": 22
            }
          ]
        },
        {
          "FEAT_DESC": "400 River Street, Pasadena, CA 90034",
          "LIB_FEAT_ID": 65,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "400 River Street, Pasadena, CA 90034",
              "LIB_FEAT_ID": 65
            }
          ]
        }
      ],
      "DOB": [
        {
          "FEAT_DESC": "15-MAR-1982",
          "LIB_FEAT_ID": 21,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "15-MAR-1982",
              "LIB_FEAT_ID": 21
            }
          ]
        },
        {
          "FEAT_DESC": "17-DEC-1977",
          "LIB_FEAT_ID": 48,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "17-DEC-1977",
              "LIB_FEAT_ID": 48
            }
          ]
        },
        {
          "FEAT_DESC": "23-MAY-1973",
          "LIB_FEAT_ID": 64,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "23-MAY-1973",
              "LIB_FEAT_ID": 64
            }
          ]
        }
      ],
      "NAME": [
        {
          "FEAT_DESC": "Jane Donaldson",
          "LIB_FEAT_ID": 63,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "Jane Donaldson",
              "LIB_FEAT_ID": 63
            }
          ]
        },
        {
          "FEAT_DESC": "Joann Smith",
          "LIB_FEAT_ID": 20,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "Joann Smith",
              "LIB_FEAT_ID": 20
            }
          ]
        },
        {
          "FEAT_DESC": "John Parker",
          "LIB_FEAT_ID": 47,
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "John Parker",
              "LIB_FEAT_ID": 47
            }
          ]
        }
      ],
      "PHONE": [
        {
          "FEAT_DESC": "818-222-3131",
          "LIB_FEAT_ID": 66,
          "USAGE_TYPE": "HOME",
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "818-222-3131",
              "LIB_FEAT_ID": 66
            }
          ]
        },
        {
          "FEAT_DESC": "818-888-3939",
          "LIB_FEAT_ID": 23,
          "USAGE_TYPE": "HOME",
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "818-888-3939",
              "LIB_FEAT_ID": 23
            }
          ]
        },
        {
          "FEAT_DESC": "818-999-2121",
          "LIB_FEAT_ID": 49,
          "USAGE_TYPE": "HOME",
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "818-999-2121",
              "LIB_FEAT_ID": 49
            }
          ]
        },
        {
          "FEAT_DESC": "213-555-1212",
          "LIB_FEAT_ID": 5,
          "USAGE_TYPE": "MOBILE",
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "213-555-1212",
              "LIB_FEAT_ID": 5
            }
          ]
        },
        {
          "FEAT_DESC": "818-555-1313",
          "LIB_FEAT_ID": 50,
          "USAGE_TYPE": "MOBILE",
          "FEAT_DESC_VALUES": [
            {
              "FEAT_DESC": "818-555-1313",
              "LIB_FEAT_ID": 50
            }
          ]
        }
      ]
    },
    "RECORD_SUMMARY": [
      {
        "DATA_SOURCE": "PASSENGERS",
        "RECORD_COUNT": 3
      }
    ],
    "RECORDS": [
      {
        "DATA_SOURCE": "PASSENGERS",
        "RECORD_ID": "DEF456",
        "INTERNAL_ID": 2
      },
      {
        "DATA_SOURCE": "PASSENGERS",
        "RECORD_ID": "GHI789",
        "INTERNAL_ID": 3
      },
      {
        "DATA_SOURCE": "PASSENGERS",
        "RECORD_ID": "JKL012",
        "INTERNAL_ID": 4
      }
    ]
  }
}

Remarks

Virtual entities do not have relationships.

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzVirtualEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If any of the records for the specified data source code and record ID pairs cannot be found.

SzException

If a failure occurs.

See Also

HowEntity(long, SzFlag?)

Explains how an entity was constructed from its records.

string HowEntity(long entityID, SzFlag? flags = SzFlag.SzIncludeFeatureScores)

Parameters

entityID long

The entity ID of the entity.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzHowFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzHowEntityDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the how the entity was constructed.

Examples

Usage:

// How to retrieve the "how analysis" for an entity via its entity ID
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the entity ID on which to operate (varies by application)
    long entityID = GetEntityID();

    // determine how the entity was formed
    string results = engine.HowEntity(entityID, SzHowEntityDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    JsonObject? howResults = jsonObject?["HOW_RESULTS"]?.AsObject();
    JsonArray? stepsArr = howResults?["RESOLUTION_STEPS"]?.AsArray();

    for (int index = 0; stepsArr != null && index < stepsArr.Count; index++)
    {
        JsonObject? step = stepsArr[index]?.AsObject();

        JsonObject? matchInfo = step?["MATCH_INFO"]?.AsObject();

        . . .
    }

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to retrieve how analysis.", e);
}

Example Result: (formatted for readability)

{
  "HOW_RESULTS": {
    "RESOLUTION_STEPS": [
      {
        "STEP": 1,
        "VIRTUAL_ENTITY_1": {
          "VIRTUAL_ENTITY_ID": "V100002",
          "MEMBER_RECORDS": [
            {
              "INTERNAL_ID": 100002,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "ABC123"
                }
              ]
            }
          ]
        },
        "VIRTUAL_ENTITY_2": {
          "VIRTUAL_ENTITY_ID": "V100003",
          "MEMBER_RECORDS": [
            {
              "INTERNAL_ID": 100003,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "XYZ987"
                }
              ]
            }
          ]
        },
        "INBOUND_VIRTUAL_ENTITY_ID": "V100003",
        "RESULT_VIRTUAL_ENTITY_ID": "V100002-S1",
        "MATCH_INFO": {
          "MATCH_KEY": "\u002BNAME\u002BEMAIL",
          "ERRULE_CODE": "SF1_CNAME",
          "CANDIDATE_KEYS": {
            "EMAIL_KEY": [
              {
                "FEAT_ID": 100007,
                "FEAT_DESC": "joeschmoe@NOWHERE.COM"
              }
            ],
            "NAME_KEY": [
              {
                "FEAT_ID": 100005,
                "FEAT_DESC": "JSF|XM"
              }
            ]
          },
          "FEATURE_SCORES": {
            "EMAIL": [
              {
                "INBOUND_FEAT_ID": 100003,
                "INBOUND_FEAT_DESC": "joeschmoe@nowhere.com",
                "CANDIDATE_FEAT_ID": 100003,
                "CANDIDATE_FEAT_DESC": "joeschmoe@nowhere.com",
                "SCORE": 100,
                "ADDITIONAL_SCORES": {
                  "FULL_SCORE": 100
                },
                "SCORE_BUCKET": "SAME",
                "SCORE_BEHAVIOR": "F1"
              }
            ],
            "NAME": [
              {
                "INBOUND_FEAT_ID": 100010,
                "INBOUND_FEAT_DESC": "Joseph Schmoe",
                "CANDIDATE_FEAT_ID": 100001,
                "CANDIDATE_FEAT_DESC": "Joe Schmoe",
                "SCORE": 98,
                "ADDITIONAL_SCORES": {
                  "GNR_FN": 98,
                  "GNR_SN": -1,
                  "GNR_GN": -1,
                  "GENERATION_MATCH": -1,
                  "GNR_ON": -1
                },
                "SCORE_BUCKET": "CLOSE",
                "SCORE_BEHAVIOR": "NAME"
              }
            ],
            "PHONE": [
              {
                "INBOUND_FEAT_ID": 100012,
                "INBOUND_FEAT_DESC": "702-555-1313",
                "INBOUND_FEAT_USAGE_TYPE": "WORK",
                "CANDIDATE_FEAT_ID": 100002,
                "CANDIDATE_FEAT_DESC": "702-555-1212",
                "SCORE": 85,
                "ADDITIONAL_SCORES": {
                  "FULL_SCORE": 85
                },
                "SCORE_BUCKET": "LIKELY",
                "SCORE_BEHAVIOR": "FF"
              }
            ]
          }
        }
      },
      {
        "STEP": 2,
        "VIRTUAL_ENTITY_1": {
          "VIRTUAL_ENTITY_ID": "V100002-S1",
          "MEMBER_RECORDS": [
            {
              "INTERNAL_ID": 100002,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "ABC123"
                }
              ]
            },
            {
              "INTERNAL_ID": 100003,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "XYZ987"
                }
              ]
            }
          ]
        },
        "VIRTUAL_ENTITY_2": {
          "VIRTUAL_ENTITY_ID": "V100004",
          "MEMBER_RECORDS": [
            {
              "INTERNAL_ID": 100004,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "ZYX789"
                }
              ]
            }
          ]
        },
        "INBOUND_VIRTUAL_ENTITY_ID": "V100002-S1",
        "RESULT_VIRTUAL_ENTITY_ID": "V100002-S2",
        "MATCH_INFO": {
          "MATCH_KEY": "\u002BNAME\u002BADDRESS\u002BPHONE",
          "ERRULE_CODE": "MFF_CNAME",
          "CANDIDATE_KEYS": {
            "ADDR_KEY": [
              {
                "FEAT_ID": 100013,
                "FEAT_DESC": "101|MN||89101"
              },
              {
                "FEAT_ID": 100014,
                "FEAT_DESC": "101|MN||LS FKS"
              }
            ],
            "NAMEADDR_KEY": [
              {
                "FEAT_ID": 100016,
                "FEAT_DESC": "JSF|XM|ADDR_KEY.EXPRESSION=101|MN||LS FKS"
              },
              {
                "FEAT_ID": 100017,
                "FEAT_DESC": "JSF|XM|ADDR_KEY.EXPRESSION=101|MN||89101"
              }
            ],
            "NAMEPHONE_KEY": [
              {
                "FEAT_ID": 100008,
                "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51212"
              },
              {
                "FEAT_ID": 100020,
                "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51313"
              }
            ],
            "NAMEREGION_KEY": [
              {
                "FEAT_ID": 100018,
                "FEAT_DESC": "JSF|XM|POST=89101"
              },
              {
                "FEAT_ID": 100019,
                "FEAT_DESC": "JSF|XM|ADDRESS.CITY_STD=LS FKS"
              }
            ],
            "NAME_KEY": [
              {
                "FEAT_ID": 100005,
                "FEAT_DESC": "JSF|XM"
              }
            ],
            "PHONE_KEY": [
              {
                "FEAT_ID": 100006,
                "FEAT_DESC": "7025551212"
              },
              {
                "FEAT_ID": 100015,
                "FEAT_DESC": "7025551313"
              }
            ]
          },
          "FEATURE_SCORES": {
            "ADDRESS": [
              {
                "INBOUND_FEAT_ID": 100011,
                "INBOUND_FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                "CANDIDATE_FEAT_ID": 100011,
                "CANDIDATE_FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                "SCORE": 100,
                "ADDITIONAL_SCORES": {
                  "FULL_SCORE": 100
                },
                "SCORE_BUCKET": "SAME",
                "SCORE_BEHAVIOR": "FF"
              }
            ],
            "NAME": [
              {
                "INBOUND_FEAT_ID": 100010,
                "INBOUND_FEAT_DESC": "Joseph Schmoe",
                "CANDIDATE_FEAT_ID": 100021,
                "CANDIDATE_FEAT_DESC": "Joseph W Schmoe",
                "SCORE": 92,
                "ADDITIONAL_SCORES": {
                  "GNR_FN": 92,
                  "GNR_SN": -1,
                  "GNR_GN": -1,
                  "GENERATION_MATCH": -1,
                  "GNR_ON": -1
                },
                "SCORE_BUCKET": "CLOSE",
                "SCORE_BEHAVIOR": "NAME"
              }
            ],
            "PHONE": [
              {
                "INBOUND_FEAT_ID": 100002,
                "INBOUND_FEAT_DESC": "702-555-1212",
                "CANDIDATE_FEAT_ID": 100002,
                "CANDIDATE_FEAT_DESC": "702-555-1212",
                "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
                "SCORE": 100,
                "ADDITIONAL_SCORES": {
                  "FULL_SCORE": 100
                },
                "SCORE_BUCKET": "SAME",
                "SCORE_BEHAVIOR": "FF"
              }
            ]
          }
        }
      }
    ],
    "FINAL_STATE": {
      "NEED_REEVALUATION": 0,
      "VIRTUAL_ENTITIES": [
        {
          "VIRTUAL_ENTITY_ID": "V100002-S2",
          "MEMBER_RECORDS": [
            {
              "INTERNAL_ID": 100002,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "ABC123"
                }
              ]
            },
            {
              "INTERNAL_ID": 100003,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "XYZ987"
                }
              ]
            },
            {
              "INTERNAL_ID": 100004,
              "RECORDS": [
                {
                  "DATA_SOURCE": "TEST",
                  "RECORD_ID": "ZYX789"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzHowFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If the entity for the specified entity ID could not be found.

SzException

If a failure occurs.

See Also

PrimeEngine()

Pre-loads engine resources.

void PrimeEngine()

Examples

Usage:

// How to prime the SzEngine to expedite subsequent operations
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // prime the engine
    engine.PrimeEngine();

    // use the primed engine to perform additional tasks
    . . .

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to prime engine.", e);
}

Remarks

Explicitly calling this method ensures the performance cost is incurred at a predictable time rather than unexpectedly with the first call requiring the resources.

Exceptions

SzException

If a failure occurs.

See Also

ProcessRedoRecord(string, SzFlag?)

Processes the provided redo record.

string ProcessRedoRecord(string redoRecord, SzFlag? flags = (SzFlag)0)

Parameters

redoRecord string

The redo record to be processed.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzRedoFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzRedoDefaultFlags. Specify SzWithInfo for an INFO response. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by processing the redo record, or null if the specified flags do not indicate that an INFO message should be returned.

Examples

Usage:

// How to check for and process redo records
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the redo count
    long redoCount = engine.CountRedoRecords();

    // check if we have redo records
    if (redoCount > 0L)
    {
        // get the next redo record
        string redoRecord = engine.GetRedoRecord();

        // loop while we still have redo records
        while (redoRecord != null)
        {
            try
            {
                // process the redo record
                string info = engine.ProcessRedoRecord(redoRecord, SzWithInfo);

                // do something with the "info JSON" (varies by application)
                JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
                if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
                {
                    JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();
                    for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
                    {
                        JsonObject? affected = affectedArr[index]?.AsObject();
                        long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

                        . . .
                    }
                }

            }
            catch (SzException e)
            {
                // handle or rethrow the other exceptions
                LogError("Failed to process redo record: " + redoRecord, e);
            }

            // get the next redo record
            redoRecord = engine.GetRedoRecord();
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the other exceptions
    LogError("Failed to process redos.", e);
}

Example Info Result: (formatted for readability)

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "ABC123",
  "AFFECTED_ENTITIES": [
    {
      "ENTITY_ID": 100002
    }
  ]
}

Remarks

This operation performs entity resolution. Calling this method has the potential to create more redo records in certain situations.

This method is used in conjunction with GetRedoRecord() and CountRedoRecords().

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzRedoFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

ReevaluateEntity(long, SzFlag?)

Reevaluates an entity by entity ID.

string ReevaluateEntity(long entityID, SzFlag? flags = (SzFlag)0)

Parameters

entityID long

The ID of the resolved entity to reevaluate.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzReevaluateEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzReevaluateEntityDefaultFlags. Specify SzWithInfo for an INFO response. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by reevaluating the entity, or null if the specified flags do not indicate that an INFO message should be returned.

Examples

Usage:

// How to reevaluate an entity
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the ID of an entity to reevaluate (varies by application)
    long entityID = GetEntityID();

    // reevaluate an entity in the repository
    string info = engine.ReevaluateEntity(entityID, SzWithInfo);

    // do something with the "info JSON" (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
    {
        JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();

        for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
        {
            JsonObject? affected = affectedArr[index]?.AsObject();

            long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to reevaluate entity.", e);
}

Example Result: (formatted for readability)

{
  "AFFECTED_ENTITIES": [
    {
      "ENTITY_ID": 100002
    }
  ]
}

Remarks

This operation performs entity resolution. If the entity is not found, then no changes are made.

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzReevaluateEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

ReevaluateRecord(string, string, SzFlag?)

Reevaluates an entity by record ID.

string ReevaluateRecord(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)

Parameters

dataSourceCode string

The data source code identifying the data source for the record to reevaluate.

recordID string

The record ID that uniquely identifies the record to reevaluate within the scope of its associated data source.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzReevaluateRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzReevaluateRecordDefaultFlags. Specify SzWithInfo for an INFO response. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string result produced by reevaluating the record, or null if the specified flags do not indicate that an INFO message should be returned.

Examples

Usage:

// How to reevaluate a record
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // reevaluate a record in the repository
    string info = engine.ReevaluateRecord("TEST", "ABC123", SzWithInfo);

    // do something with the "info JSON" (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(info)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("AFFECTED_ENTITIES"))
    {
        JsonArray? affectedArr = jsonObject["AFFECTED_ENTITIES"]?.AsArray();

        for (int index = 0; affectedArr != null && index < affectedArr.Count; index++)
        {
            JsonObject? affected = affectedArr[index]?.AsObject();

            long affectedID = affected?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to reevaluate record.", e);
}

Example Result: (formatted for readability)

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "ABC123",
  "AFFECTED_ENTITIES": [
    {
      "ENTITY_ID": 100002
    }
  ]
}

Remarks

This operation performs entity resolution. If the record is not found, then no changes are made.

The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzReevaluateRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzException

If a failure occurs.

See Also

SearchByAttributes(string, SzFlag?)

Convenience method for calling SearchByAttributes(string, string, SzFlag?) with a null value for the search profile parameter.

string SearchByAttributes(string attributes, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludePossiblySame | SzFlag.SzExportIncludePossiblyRelated | SzFlag.SzExportIncludeNameOnly | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzIncludeFeatureScores | SzFlag.SzSearchIncludeStats)

Parameters

attributes string

The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzSearchFlags group to control how the operation is performed and the content of the response, omitting this parameter will default its value to SzSearchByAttributesDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The resulting JSON string describing the result of the search.

Examples

Usage:

// How to search for entities matching criteria
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the search attributes (varies by application)
    string searchAttributes =
            """
            {
                "NAME_FULL": "Joe Schmoe",
                "PHONE_NUMBER": "702-555-1212",
                "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
            }
            """;

    // search for matching entities in the repository                
    string results = engine.SearchByAttributes(
        searchAttributes,
        SzSearchByAttributesDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("RESOLVED_ENTITIES"))
    {
        JsonArray? resultsArr = jsonObject["RESOLVED_ENTITIES"]?.AsArray();

        for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
        {
            JsonObject? result = resultsArr[index]?.AsObject();

            // get the match info for the result
            JsonObject? matchInfo = result?["MATCH_INFO"]?.AsObject();

            . . .

            // get the entity for the result
            JsonObject? entityInfo = result?["ENTITY"]?.AsObject();
            JsonObject? entity = entityInfo?["RESOLVED_ENTITY"]?.AsObject();
            long entityID = entity?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to search for entities.", e);
}

Example Result: (formatted for readability)

{
  "RESOLVED_ENTITIES": [
    {
      "MATCH_INFO": {
        "MATCH_LEVEL_CODE": "RESOLVED",
        "MATCH_KEY": "\u002BNAME\u002BPHONE\u002BEMAIL",
        "ERRULE_CODE": "SF1_PNAME_CFF",
        "CANDIDATE_KEYS": {
          "EMAIL_KEY": [
            {
              "FEAT_ID": 100007,
              "FEAT_DESC": "joeschmoe@NOWHERE.COM"
            }
          ],
          "NAMEPHONE_KEY": [
            {
              "FEAT_ID": 100008,
              "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51212"
            },
            {
              "FEAT_ID": 100009,
              "FEAT_DESC": "JOE|XM|PHONE.PHONE_LAST_5=51212"
            }
          ],
          "NAME_KEY": [
            {
              "FEAT_ID": 100004,
              "FEAT_DESC": "JOE|XM"
            },
            {
              "FEAT_ID": 100005,
              "FEAT_DESC": "JSF|XM"
            }
          ],
          "PHONE_KEY": [
            {
              "FEAT_ID": 100006,
              "FEAT_DESC": "7025551212"
            }
          ]
        },
        "FEATURE_SCORES": {
          "EMAIL": [
            {
              "INBOUND_FEAT_ID": 100003,
              "INBOUND_FEAT_DESC": "joeschmoe@nowhere.com",
              "CANDIDATE_FEAT_ID": 100003,
              "CANDIDATE_FEAT_DESC": "joeschmoe@nowhere.com",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "F1"
            }
          ],
          "NAME": [
            {
              "INBOUND_FEAT_ID": 100001,
              "INBOUND_FEAT_DESC": "Joe Schmoe",
              "CANDIDATE_FEAT_ID": 100001,
              "CANDIDATE_FEAT_DESC": "Joe Schmoe",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "GNR_FN": 100,
                "GNR_SN": -1,
                "GNR_GN": -1,
                "GENERATION_MATCH": -1,
                "GNR_ON": -1
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "NAME"
            }
          ],
          "PHONE": [
            {
              "INBOUND_FEAT_ID": 100002,
              "INBOUND_FEAT_DESC": "702-555-1212",
              "CANDIDATE_FEAT_ID": 100002,
              "CANDIDATE_FEAT_DESC": "702-555-1212",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "FF"
            }
          ]
        }
      },
      "ENTITY": {
        "RESOLVED_ENTITY": {
          "ENTITY_ID": 100002,
          "ENTITY_NAME": "Joseph W Schmoe",
          "FEATURES": {
            "ADDRESS": [
              {
                "FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                "LIB_FEAT_ID": 100011,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                    "LIB_FEAT_ID": 100011
                  }
                ]
              }
            ],
            "EMAIL": [
              {
                "FEAT_DESC": "joeschmoe@nowhere.com",
                "LIB_FEAT_ID": 100003,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "joeschmoe@nowhere.com",
                    "LIB_FEAT_ID": 100003
                  }
                ]
              }
            ],
            "NAME": [
              {
                "FEAT_DESC": "Joseph W Schmoe",
                "LIB_FEAT_ID": 100021,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "Joseph W Schmoe",
                    "LIB_FEAT_ID": 100021
                  },
                  {
                    "FEAT_DESC": "Joseph Schmoe",
                    "LIB_FEAT_ID": 100010
                  },
                  {
                    "FEAT_DESC": "Joe Schmoe",
                    "LIB_FEAT_ID": 100001
                  }
                ]
              }
            ],
            "PHONE": [
              {
                "FEAT_DESC": "702-555-1212",
                "LIB_FEAT_ID": 100002,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1212",
                    "LIB_FEAT_ID": 100002
                  }
                ]
              },
              {
                "FEAT_DESC": "702-555-1212",
                "LIB_FEAT_ID": 100002,
                "USAGE_TYPE": "HOME",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1212",
                    "LIB_FEAT_ID": 100002
                  }
                ]
              },
              {
                "FEAT_DESC": "702-555-1313",
                "LIB_FEAT_ID": 100012,
                "USAGE_TYPE": "WORK",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1313",
                    "LIB_FEAT_ID": 100012
                  }
                ]
              }
            ]
          },
          "RECORD_SUMMARY": [
            {
              "DATA_SOURCE": "TEST",
              "RECORD_COUNT": 3
            }
          ]
        }
      }
    }
  ],
  "SEARCH_STATISTICS": [
    {
      "CANDIDATE_KEYS": {
        "FEATURE_TYPES": [
          {
            "FTYPE_CODE": "NAME_KEY",
            "FOUND": 2,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "PHONE_KEY",
            "FOUND": 1,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "EMAIL_KEY",
            "FOUND": 1,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "NAMEPHONE_KEY",
            "FOUND": 2,
            "NOT_FOUND": 0,
            "GENERIC": 0
          }
        ],
        "SUMMARY": {
          "FOUND": 6,
          "NOT_FOUND": 0,
          "GENERIC": 0
        }
      }
    }
  ]
}

Remarks

See SearchByAttributes(string, string, SzFlag?) documentation for details.

Exceptions

SzException

If a failure occurs.

See Also

SearchByAttributes(string, string, SzFlag?)

Searches for entities that match or relate to the provided attributes.

string SearchByAttributes(string attributes, string searchProfile, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludePossiblySame | SzFlag.SzExportIncludePossiblyRelated | SzFlag.SzExportIncludeNameOnly | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzIncludeFeatureScores | SzFlag.SzSearchIncludeStats)

Parameters

attributes string

The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.

searchProfile string

The optional search profile identifier, or null if the default search profile should be used for the search.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzSearchFlags group to control how the operation is performed and the content of the response, omitting this parameter will default its value to SzSearchByAttributesDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The resulting JSON string describing the result of the search.

Examples

Usage:

// How to search for entities matching criteria using a search profile
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the search attributes (varies by application)
    string searchAttributes =
            """
            {
                "NAME_FULL": "Joe Schmoe",
                "PHONE_NUMBER": "702-555-1212",
                "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
            }
            """;

    // get a search profile (varies by application)
    string searchProfile = GetSearchProfile();

    // search for matching entities in the repository                
    string results = engine.SearchByAttributes(
        searchAttributes,
        searchProfile,
        SzSearchByAttributesDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    if (jsonObject != null && jsonObject.ContainsKey("RESOLVED_ENTITIES"))
    {
        JsonArray? resultsArr = jsonObject["RESOLVED_ENTITIES"]?.AsArray();

        for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
        {
            JsonObject? result = resultsArr[index]?.AsObject();

            // get the match info for the result
            JsonObject? matchInfo = result?["MATCH_INFO"]?.AsObject();

            . . .

            // get the entity for the result
            JsonObject? entityInfo = result?["ENTITY"]?.AsObject();
            JsonObject? entity = entityInfo?["RESOLVED_ENTITY"]?.AsObject();
            long entityID = entity?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

            . . .
        }
    }

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to search for entities.", e);
}

Example Result: (formatted for readability)

{
  "RESOLVED_ENTITIES": [
    {
      "MATCH_INFO": {
        "MATCH_LEVEL_CODE": "RESOLVED",
        "MATCH_KEY": "\u002BNAME\u002BPHONE\u002BEMAIL",
        "ERRULE_CODE": "SF1_PNAME_CFF",
        "CANDIDATE_KEYS": {
          "EMAIL_KEY": [
            {
              "FEAT_ID": 100007,
              "FEAT_DESC": "joeschmoe@NOWHERE.COM"
            }
          ],
          "NAMEPHONE_KEY": [
            {
              "FEAT_ID": 100008,
              "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51212"
            },
            {
              "FEAT_ID": 100009,
              "FEAT_DESC": "JOE|XM|PHONE.PHONE_LAST_5=51212"
            }
          ],
          "NAME_KEY": [
            {
              "FEAT_ID": 100004,
              "FEAT_DESC": "JOE|XM"
            },
            {
              "FEAT_ID": 100005,
              "FEAT_DESC": "JSF|XM"
            }
          ],
          "PHONE_KEY": [
            {
              "FEAT_ID": 100006,
              "FEAT_DESC": "7025551212"
            }
          ]
        },
        "FEATURE_SCORES": {
          "EMAIL": [
            {
              "INBOUND_FEAT_ID": 100003,
              "INBOUND_FEAT_DESC": "joeschmoe@nowhere.com",
              "CANDIDATE_FEAT_ID": 100003,
              "CANDIDATE_FEAT_DESC": "joeschmoe@nowhere.com",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "F1"
            }
          ],
          "NAME": [
            {
              "INBOUND_FEAT_ID": 100001,
              "INBOUND_FEAT_DESC": "Joe Schmoe",
              "CANDIDATE_FEAT_ID": 100001,
              "CANDIDATE_FEAT_DESC": "Joe Schmoe",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "GNR_FN": 100,
                "GNR_SN": -1,
                "GNR_GN": -1,
                "GENERATION_MATCH": -1,
                "GNR_ON": -1
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "NAME"
            }
          ],
          "PHONE": [
            {
              "INBOUND_FEAT_ID": 100002,
              "INBOUND_FEAT_DESC": "702-555-1212",
              "CANDIDATE_FEAT_ID": 100002,
              "CANDIDATE_FEAT_DESC": "702-555-1212",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "FF"
            }
          ]
        }
      },
      "ENTITY": {
        "RESOLVED_ENTITY": {
          "ENTITY_ID": 100002,
          "ENTITY_NAME": "Joseph W Schmoe",
          "FEATURES": {
            "ADDRESS": [
              {
                "FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                "LIB_FEAT_ID": 100011,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "101 Main St.; Las Vegas, NV 89101",
                    "LIB_FEAT_ID": 100011
                  }
                ]
              }
            ],
            "EMAIL": [
              {
                "FEAT_DESC": "joeschmoe@nowhere.com",
                "LIB_FEAT_ID": 100003,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "joeschmoe@nowhere.com",
                    "LIB_FEAT_ID": 100003
                  }
                ]
              }
            ],
            "NAME": [
              {
                "FEAT_DESC": "Joseph W Schmoe",
                "LIB_FEAT_ID": 100021,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "Joseph W Schmoe",
                    "LIB_FEAT_ID": 100021
                  },
                  {
                    "FEAT_DESC": "Joseph Schmoe",
                    "LIB_FEAT_ID": 100010
                  },
                  {
                    "FEAT_DESC": "Joe Schmoe",
                    "LIB_FEAT_ID": 100001
                  }
                ]
              }
            ],
            "PHONE": [
              {
                "FEAT_DESC": "702-555-1212",
                "LIB_FEAT_ID": 100002,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1212",
                    "LIB_FEAT_ID": 100002
                  }
                ]
              },
              {
                "FEAT_DESC": "702-555-1212",
                "LIB_FEAT_ID": 100002,
                "USAGE_TYPE": "HOME",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1212",
                    "LIB_FEAT_ID": 100002
                  }
                ]
              },
              {
                "FEAT_DESC": "702-555-1313",
                "LIB_FEAT_ID": 100012,
                "USAGE_TYPE": "WORK",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-555-1313",
                    "LIB_FEAT_ID": 100012
                  }
                ]
              }
            ]
          },
          "RECORD_SUMMARY": [
            {
              "DATA_SOURCE": "TEST",
              "RECORD_COUNT": 3
            }
          ]
        }
      }
    }
  ],
  "SEARCH_STATISTICS": [
    {
      "CANDIDATE_KEYS": {
        "FEATURE_TYPES": [
          {
            "FTYPE_CODE": "NAME_KEY",
            "FOUND": 2,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "PHONE_KEY",
            "FOUND": 1,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "EMAIL_KEY",
            "FOUND": 1,
            "NOT_FOUND": 0,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "NAMEPHONE_KEY",
            "FOUND": 2,
            "NOT_FOUND": 0,
            "GENERIC": 0
          }
        ],
        "SUMMARY": {
          "FOUND": 6,
          "NOT_FOUND": 0,
          "GENERIC": 0
        }
      }
    }
  ]
}

Remarks

The default search profile is "SEARCH". Alternatively, "INGEST" may be used.

If the specified search profile is null then the default will be used (alternatively, use SearchByAttributes(string, SzFlag?) as a convenience method to omit the parameter).

The optionally specified bitwise-OR'd SzFlag values not only control how the search is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzSearchFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzException

If a failure occurs.

See Also

WhyEntities(long, long, SzFlag?)

Describes the ways two entities relate to each other.

string WhyEntities(long entityID1, long entityID2, SzFlag? flags = SzFlag.SzIncludeFeatureScores)

Parameters

entityID1 long

The entity ID of the first entity.

entityID2 long

The entity ID of the second entity.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzWhyEntitiesFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyEntitiesDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the ways in which the records are related to one another.

Examples

Usage:

// How to determine how two entities are related
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the entities on which to operate (varies by application)
    long entityID1 = GetWhyEntitiesID1();
    long entityID2 = GetWhyEntitiesID2();

    // determine how the entities are related
    string results = engine.WhyEntities(entityID1,
                                        entityID2,
                                        SzWhyEntitiesDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    JsonArray? resultsArr = jsonObject?["WHY_RESULTS"]?.AsArray();

    for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
    {
        JsonObject? result = resultsArr[index]?.AsObject();

        long whyEntityID1 = result?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

        long whyEntityID2 = result?["ENTITY_ID_2"]?.GetValue<long>() ?? 0L;

        . . .
    }

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to perform why entities.", e);
}

Example Result: (formatted for readability)

{
  "WHY_RESULTS": [
    {
      "ENTITY_ID": 5,
      "ENTITY_ID_2": 8,
      "MATCH_INFO": {
        "WHY_KEY": "\u002BPHONE-DOB",
        "WHY_ERRULE_CODE": "SF1",
        "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
        "CANDIDATE_KEYS": {
          "PHONE_KEY": [
            {
              "FEAT_ID": 86,
              "FEAT_DESC": "8184442121"
            }
          ]
        },
        "FEATURE_SCORES": {
          "ADDRESS": [
            {
              "INBOUND_FEAT_ID": 3,
              "INBOUND_FEAT_DESC": "101 Main Street, Los Angeles, CA 90011",
              "CANDIDATE_FEAT_ID": 161,
              "CANDIDATE_FEAT_DESC": "707 Seventh Ave, Los Angeles, CA 90043",
              "SCORE": 30,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 30
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "FF"
            }
          ],
          "DOB": [
            {
              "INBOUND_FEAT_ID": 81,
              "INBOUND_FEAT_DESC": "22-AUG-1981",
              "CANDIDATE_FEAT_ID": 160,
              "CANDIDATE_FEAT_DESC": "27-JUN-1980",
              "SCORE": 79,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 79
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "FMES"
            }
          ],
          "NAME": [
            {
              "INBOUND_FEAT_ID": 80,
              "INBOUND_FEAT_DESC": "Bill Bandley",
              "CANDIDATE_FEAT_ID": 159,
              "CANDIDATE_FEAT_DESC": "Katrina Osmond",
              "SCORE": 21,
              "ADDITIONAL_SCORES": {
                "GNR_FN": 21,
                "GNR_SN": 0,
                "GNR_GN": 7,
                "GENERATION_MATCH": -1,
                "GNR_ON": -1
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "NAME"
            }
          ],
          "PHONE": [
            {
              "INBOUND_FEAT_ID": 83,
              "INBOUND_FEAT_DESC": "818-444-2121",
              "INBOUND_FEAT_USAGE_TYPE": "MOBILE",
              "CANDIDATE_FEAT_ID": 83,
              "CANDIDATE_FEAT_DESC": "818-444-2121",
              "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "F1"
            },
            {
              "INBOUND_FEAT_ID": 83,
              "INBOUND_FEAT_DESC": "818-444-2121",
              "INBOUND_FEAT_USAGE_TYPE": "MOBILE",
              "CANDIDATE_FEAT_ID": 162,
              "CANDIDATE_FEAT_DESC": "818-111-2222",
              "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
              "SCORE": 70,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 70
              },
              "SCORE_BUCKET": "PLAUSIBLE",
              "SCORE_BEHAVIOR": "FF"
            }
          ]
        },
        "DISCLOSED_RELATIONS": {}
      }
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8
      }
    }
  ]
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyEntitiesFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If either of the entities for the specified entity ID's could not be found.

SzException

If a failure occurs.

See Also

WhyRecordInEntity(string, string, SzFlag?)

Describes the ways a record relates to the rest of its respective entity.

string WhyRecordInEntity(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzIncludeFeatureScores)

Parameters

dataSourceCode string

The data source code that identifies the data source of the record.

recordID string

The record ID that identifies the record within the scope of the record's data source.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzWhyRecordInEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyRecordInEntityDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing why the record is included in its respective entity.

Examples

Usage:

// How to determine why a record is a member of its respective entity
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // determine why the record is part of its entity                
    string results = engine.WhyRecordInEntity(
        "TEST", "ABC123", SzWhyRecordInEntityDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    JsonArray? resultsArr = jsonObject?["WHY_RESULTS"]?.AsArray();

    for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
    {
        JsonObject? result = resultsArr[index]?.AsObject();

        long entityID = result?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

        . . .
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to reevaluate record.", e);
}

Example Result: (formatted for readability)

{
  "WHY_RESULTS": [
    {
      "INTERNAL_ID": 100002,
      "ENTITY_ID": 100002,
      "FOCUS_RECORDS": [
        {
          "DATA_SOURCE": "TEST",
          "RECORD_ID": "ABC123"
        }
      ],
      "MATCH_INFO": {
        "WHY_KEY": "\u002BNAME\u002BPHONE\u002BEMAIL",
        "WHY_ERRULE_CODE": "SF1_PNAME_CFF",
        "MATCH_LEVEL_CODE": "RESOLVED",
        "CANDIDATE_KEYS": {
          "EMAIL_KEY": [
            {
              "FEAT_ID": 100007,
              "FEAT_DESC": "joeschmoe@NOWHERE.COM"
            }
          ],
          "NAMEPHONE_KEY": [
            {
              "FEAT_ID": 100008,
              "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51212"
            }
          ],
          "NAME_KEY": [
            {
              "FEAT_ID": 100005,
              "FEAT_DESC": "JSF|XM"
            }
          ],
          "PHONE_KEY": [
            {
              "FEAT_ID": 100006,
              "FEAT_DESC": "7025551212"
            }
          ]
        },
        "FEATURE_SCORES": {
          "EMAIL": [
            {
              "INBOUND_FEAT_ID": 100003,
              "INBOUND_FEAT_DESC": "joeschmoe@nowhere.com",
              "CANDIDATE_FEAT_ID": 100003,
              "CANDIDATE_FEAT_DESC": "joeschmoe@nowhere.com",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "F1"
            }
          ],
          "NAME": [
            {
              "INBOUND_FEAT_ID": 100001,
              "INBOUND_FEAT_DESC": "Joe Schmoe",
              "CANDIDATE_FEAT_ID": 100010,
              "CANDIDATE_FEAT_DESC": "Joseph Schmoe",
              "SCORE": 98,
              "ADDITIONAL_SCORES": {
                "GNR_FN": 98,
                "GNR_SN": -1,
                "GNR_GN": -1,
                "GENERATION_MATCH": -1,
                "GNR_ON": -1
              },
              "SCORE_BUCKET": "CLOSE",
              "SCORE_BEHAVIOR": "NAME"
            }
          ],
          "PHONE": [
            {
              "INBOUND_FEAT_ID": 100002,
              "INBOUND_FEAT_DESC": "702-555-1212",
              "CANDIDATE_FEAT_ID": 100002,
              "CANDIDATE_FEAT_DESC": "702-555-1212",
              "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "FF"
            }
          ]
        }
      }
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 100002
      }
    }
  ]
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyRecordInEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If any of the records for the specified data source code and record ID pairs cannot be found.

SzException

If a failure occurs.

See Also

WhyRecords(string, string, string, string, SzFlag?)

Describes the ways two records relate to each other.

string WhyRecords(string dataSourceCode1, string recordID1, string dataSourceCode2, string recordID2, SzFlag? flags = SzFlag.SzIncludeFeatureScores)

Parameters

dataSourceCode1 string

The data source code identifying the data source for the first record.

recordID1 string

The record ID that uniquely identifies the first record within the scope of its associated data source.

dataSourceCode2 string

The data source code identifying the data source for the second record.

recordID2 string

The record ID that uniquely identifies the second record within the scope of its associated data source.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzWhyRecordsFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyRecordsDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The JSON string describing the ways in which the records are related to one another.

Examples

Usage:

// How to determine how two records are related
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the records on which to operate (varies by application)
    (string dataSourceCode, string recordID) recordKey1 = GetWhyRecordsKey1();
    (string dataSourceCode, string recordID) recordKey2 = GetWhyRecordsKey2();

    // determine how the records are related
    string results = engine.WhyRecords(recordKey1.dataSourceCode,
                                       recordKey1.recordID,
                                       recordKey2.dataSourceCode,
                                       recordKey2.recordID,
                                       SzWhyRecordsDefaultFlags);

    // do something with the response JSON (varies by application)
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    JsonArray? resultsArr = jsonObject?["WHY_RESULTS"]?.AsArray();

    for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
    {
        JsonObject? result = resultsArr[index]?.AsObject();

        long entityID1 = result?["ENTITY_ID"]?.GetValue<long>() ?? 0L;
        long entityID2 = result?["ENTITY_ID_2"]?.GetValue<long>() ?? 0L;

        . . .
    }

}
catch (SzUnknownDataSourceException e)
{
    // handle the unknown data source exception
    LogError("Expected data source is not configured.", e);

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for record key.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to reevaluate record.", e);
}

Example Result: (formatted for readability)

{
  "WHY_RESULTS": [
    {
      "INTERNAL_ID": 5,
      "ENTITY_ID": 5,
      "FOCUS_RECORDS": [
        {
          "DATA_SOURCE": "EMPLOYEES",
          "RECORD_ID": "MNO345"
        }
      ],
      "INTERNAL_ID_2": 8,
      "ENTITY_ID_2": 8,
      "FOCUS_RECORDS_2": [
        {
          "DATA_SOURCE": "EMPLOYEES",
          "RECORD_ID": "DEF890"
        }
      ],
      "MATCH_INFO": {
        "WHY_KEY": "\u002BPHONE-DOB",
        "WHY_ERRULE_CODE": "SF1",
        "MATCH_LEVEL_CODE": "POSSIBLY_RELATED",
        "CANDIDATE_KEYS": {
          "PHONE_KEY": [
            {
              "FEAT_ID": 86,
              "FEAT_DESC": "8184442121"
            }
          ]
        },
        "FEATURE_SCORES": {
          "ADDRESS": [
            {
              "INBOUND_FEAT_ID": 3,
              "INBOUND_FEAT_DESC": "101 Main Street, Los Angeles, CA 90011",
              "CANDIDATE_FEAT_ID": 161,
              "CANDIDATE_FEAT_DESC": "707 Seventh Ave, Los Angeles, CA 90043",
              "SCORE": 30,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 30
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "FF"
            }
          ],
          "DOB": [
            {
              "INBOUND_FEAT_ID": 81,
              "INBOUND_FEAT_DESC": "22-AUG-1981",
              "CANDIDATE_FEAT_ID": 160,
              "CANDIDATE_FEAT_DESC": "27-JUN-1980",
              "SCORE": 79,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 79
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "FMES"
            }
          ],
          "NAME": [
            {
              "INBOUND_FEAT_ID": 80,
              "INBOUND_FEAT_DESC": "Bill Bandley",
              "CANDIDATE_FEAT_ID": 159,
              "CANDIDATE_FEAT_DESC": "Katrina Osmond",
              "SCORE": 21,
              "ADDITIONAL_SCORES": {
                "GNR_FN": 21,
                "GNR_SN": 0,
                "GNR_GN": 7,
                "GENERATION_MATCH": -1,
                "GNR_ON": -1
              },
              "SCORE_BUCKET": "NO_CHANCE",
              "SCORE_BEHAVIOR": "NAME"
            }
          ],
          "PHONE": [
            {
              "INBOUND_FEAT_ID": 83,
              "INBOUND_FEAT_DESC": "818-444-2121",
              "INBOUND_FEAT_USAGE_TYPE": "MOBILE",
              "CANDIDATE_FEAT_ID": 83,
              "CANDIDATE_FEAT_DESC": "818-444-2121",
              "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
              "SCORE": 100,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 100
              },
              "SCORE_BUCKET": "SAME",
              "SCORE_BEHAVIOR": "F1"
            },
            {
              "INBOUND_FEAT_ID": 83,
              "INBOUND_FEAT_DESC": "818-444-2121",
              "INBOUND_FEAT_USAGE_TYPE": "MOBILE",
              "CANDIDATE_FEAT_ID": 162,
              "CANDIDATE_FEAT_DESC": "818-111-2222",
              "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
              "SCORE": 70,
              "ADDITIONAL_SCORES": {
                "FULL_SCORE": 70
              },
              "SCORE_BUCKET": "PLAUSIBLE",
              "SCORE_BEHAVIOR": "FF"
            }
          ]
        },
        "DISCLOSED_RELATIONS": {}
      }
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5
      }
    },
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 8
      }
    }
  ]
}

Remarks

The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyRecordsFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzUnknownDataSourceException

If an unrecognized data source code is specified.

SzNotFoundException

If either of the records for the specified data source code and record ID pairs cannot be found.

SzException

If a failure occurs.

See Also

WhySearch(string, long, string, SzFlag?)

Describes the ways a set of search attributes relate to an entity.

string WhySearch(string attributes, long entityID, string searchProfile = null, SzFlag? flags = SzFlag.SzIncludeFeatureScores | SzFlag.SzSearchIncludeStats | SzFlag.SzSearchIncludeRequestDetails)

Parameters

attributes string

The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.

entityID long

The entity ID identifying the entity to analyze against the search attribute criteria.

searchProfile string

The optional search profile identifier, or null if the default search profile should be used for the search.

flags SzFlag?

The optional bitwise-OR'd SzFlag values belonging to the SzWhySearchFlags group to control how the operation is performed and the content of the response, omitting this parameter will default its value to SzWhySearchDefaultFlags for the default recommended flags. Specifying null is equivalent to specifying SzNoFlags.

Returns

string

The resulting JSON string describing the result of the why analysis against the search criteria.

Examples

Usage:

// How to determine why an entity was excluded from search results
try
{
    // obtain the SzEnvironment (varies by application)
    SzEnvironment env = GetEnvironment();

    // get the engine
    SzEngine engine = env.GetEngine();

    // get the search attributes (varies by application)
    string searchAttributes =
            """
            {
                "NAME_FULL": "Joe Schmoe",
                "PHONE_NUMBER": "702-555-1212",
                "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
            }
            """;

    // get the entities on which to operate (varies by application)
    long entityID = GetWhySearchEntityID();

    // determine how the entities are related                
    string results = engine.WhySearch(searchAttributes,
                                      entityID,
                                      null, // search profile
                                      SzWhySearchDefaultFlags);

    // do something with the response JSON (varies by application)                
    JsonObject? jsonObject = JsonNode.Parse(results)?.AsObject();
    JsonArray? resultsArr = jsonObject?["WHY_RESULTS"]?.AsArray();

    for (int index = 0; resultsArr != null && index < resultsArr.Count; index++)
    {
        JsonObject? result = resultsArr[index]?.AsObject();

        long whyEntityID1 = result?["ENTITY_ID"]?.GetValue<long>() ?? 0L;

        . . .
    }

}
catch (SzNotFoundException e)
{
    // handle the not-found exception
    LogError("Entity not found for entity ID.", e);

}
catch (SzException e)
{
    // handle or rethrow the exception
    LogError("Failed to perform why search.", e);
}

Example Result: (formatted for readability)

{
  "WHY_RESULTS": [
    {
      "ENTITY_ID": 5,
      "MATCH_INFO": {
        "WHY_KEY": "",
        "WHY_ERRULE_CODE": "",
        "MATCH_LEVEL_CODE": "",
        "CANDIDATE_KEYS": {},
        "FEATURE_SCORES": {},
        "DISCLOSED_RELATIONS": {}
      }
    }
  ],
  "SEARCH_REQUEST": {
    "JSON_DATA": "{\n    \u0022NAME_FULL\u0022: \u0022Joe Schmoe\u0022,\n    \u0022PHONE_NUMBER\u0022: \u0022702-555-1212\u0022,\n    \u0022EMAIL_ADDRESS\u0022: \u0022joeschmoe@nowhere.com\u0022\n}",
    "SEARCH_PROFILE": "",
    "FEATURES": {
      "NAME": [
        {
          "LIB_FEAT_ID": 100001,
          "FEAT_DESC": "Joe Schmoe",
          "ATTRIBUTES": {
            "NAME_FULL": "Joe Schmoe"
          },
          "USED_FOR_CAND": "N",
          "USED_FOR_SCORING": "Y",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "PHONE": [
        {
          "LIB_FEAT_ID": 100002,
          "FEAT_DESC": "702-555-1212",
          "ATTRIBUTES": {
            "PHONE_NUMBER": "702-555-1212"
          },
          "USED_FOR_CAND": "N",
          "USED_FOR_SCORING": "Y",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "EMAIL": [
        {
          "LIB_FEAT_ID": 100003,
          "FEAT_DESC": "joeschmoe@nowhere.com",
          "ATTRIBUTES": {
            "EMAIL_ADDRESS": "joeschmoe@nowhere.com"
          },
          "USED_FOR_CAND": "N",
          "USED_FOR_SCORING": "Y",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "NAME_KEY": [
        {
          "LIB_FEAT_ID": 100004,
          "FEAT_DESC": "JOE|XM",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        },
        {
          "LIB_FEAT_ID": 100005,
          "FEAT_DESC": "JSF|XM",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "PHONE_KEY": [
        {
          "LIB_FEAT_ID": 100006,
          "FEAT_DESC": "7025551212",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "EMAIL_KEY": [
        {
          "LIB_FEAT_ID": 100007,
          "FEAT_DESC": "joeschmoe@NOWHERE.COM",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ],
      "NAMEPHONE_KEY": [
        {
          "LIB_FEAT_ID": 100008,
          "FEAT_DESC": "JSF|XM|PHONE.PHONE_LAST_5=51212",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        },
        {
          "LIB_FEAT_ID": 100009,
          "FEAT_DESC": "JOE|XM|PHONE.PHONE_LAST_5=51212",
          "USED_FOR_CAND": "Y",
          "USED_FOR_SCORING": "N",
          "ENTITY_COUNT": 1,
          "CANDIDATE_CAP_REACHED": "N",
          "SCORING_CAP_REACHED": "N"
        }
      ]
    }
  },
  "SEARCH_STATISTICS": [
    {
      "CANDIDATE_KEYS": {
        "FEATURE_TYPES": [
          {
            "FTYPE_CODE": "NAME_KEY",
            "FOUND": 0,
            "NOT_FOUND": 2,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "PHONE_KEY",
            "FOUND": 0,
            "NOT_FOUND": 1,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "EMAIL_KEY",
            "FOUND": 0,
            "NOT_FOUND": 1,
            "GENERIC": 0
          },
          {
            "FTYPE_CODE": "NAMEPHONE_KEY",
            "FOUND": 0,
            "NOT_FOUND": 2,
            "GENERIC": 0
          }
        ],
        "SUMMARY": {
          "FOUND": 0,
          "NOT_FOUND": 6,
          "GENERIC": 0
        }
      }
    }
  ],
  "ENTITIES": [
    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 5
      }
    }
  ]
}

Remarks

The default search profile is "SEARCH". Alternatively, "INGEST" may be used.

If the specified search profile is null then the default will be used.

The specified search attributes are treated as a hypothetical single-record entity and the result of this operation is the "why analysis" of the entity identified by the specified entity ID against that hypothetical entity. The details included in the response are determined by the specified flags.

If the specified search profile is null then the default generic thresholds from the default search profile will be used for the search candidate determination. If your search requires different behavior using alternate generic thresholds, please contact support@senzing.com for details on configuring a custom search profile.

The optionally specified bitwise-OR'd SzFlag values not only control how the search is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhySearchFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).

Exceptions

SzNotFoundException

If no entity could be found with the specified entity ID.

SzException

If a failure occurs.

See Also