Data Quality Management API Use

This chapter describes Data Quality Management Search and Duplicate Identification, Availability, and Transformation APIs. The provided information includes: PL/SQL record structure and procedure, Java inner class and method, and parameter descriptions and validations.

This chapter covers the following topics:

Data Quality Management Search and Duplicate Identification APIs

PL/SQL Package Name: HZ_PARTY_SEARCH

Note: The code for all the Data Quality Management (DQM) APIs, except the transformation and availability APIs, is dynamically generated based on how a match rule is set up. The code for each API is in the appropriate match rule package, and the HZ_PARTY_SEARCH package is a wrapper on top of all match rule packages, to facilitate the use of these APIs with a nomenclature that is not cumbersome for the user.

Java Class Name: HzPartySearch

Find Parties API

Description

Finds parties based on the passed search criteria. The API finds parties that match party level search criteria, and/or have addresses, contacts, and/or contact points that match corresponding address, contact, or contact point criteria. When the matching is based on address and contact point search criteria, the API finds parties of type Organization, looking at the organization end of relationships. The API returns the set of matches to the HZ_MATCHED_PARTIES_GT table, which holds the PARTY_ID and score of all matches. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
find_parties (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_search_rec      IN      party_search_rec_type,
     p_party_site_list       IN      party_site_list,
     p_contact_list          IN      contact_list,
     p_contact_point_list    IN      contact_point_list,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     p_search_merged         IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

findParties(
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    PartySearchRec p_party_search_rec,
    PartySiteSearchRec []p_party_site_list,
    ContactSearchRec []p_contact_list,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    String p_search_merged,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Parties API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_search_rec IN party_search_rec_type No Comments: The PL/SQL record structure that has the party search record information.
p_party_site_list IN party_site_list No Comments: The PL/SQL table of records structure that has the party site search record information.
p_contact_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact search record information.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
p_search_merged IN VARCHAR2 Yes Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTIES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of parties that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Find Persons API

Description

Finds persons based on the passed search criteria. The API finds persons that match party level search criteria, and/or have addresses, contacts, and/or contact points that match corresponding address, contact, or contact point criteria. The API always returns parties of type Person, even if the matching is based on address or contact point search criteria, by looking at the person end of relationships. The API returns the set of matches to the HZ_MATCHED_PARTIES_GT table, which holds the PARTY_ID and score of all matches. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
find_persons (
      p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
      p_rule_id               IN      NUMBER,
      p_party_search_rec      IN      party_search_rec_type,
      p_party_site_list       IN      party_site_list,
      p_contact_list          IN      contact_list,
      p_contact_point_list    IN      contact_point_list,
      p_restrict_sql          IN      VARCHAR2,
      p_match_type            IN      VARCHAR2,
      x_search_ctx_id         OUT     NUMBER,
      x_num_matches           OUT     NUMBER,
      x_return_status         OUT     VARCHAR2,
      x_msg_count             OUT     NUMBER,
      x_msg_data              OUT     VARCHAR2
);

Java Method

findPersons(   
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    PartySearchRec p_party_search_rec,
    PartySiteSearchRec []p_party_site_list,
    ContactSearchRec []p_contact_list,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Persons API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_search_rec IN party_search_rec_type No Comments: The PL/SQL record structure that has the party search record information.
p_party_site_list IN party_site_list No Comments: The PL/SQL table of records structure that has the party site search record information.
p_contact_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact search record information.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
p_search_merged IN VARCHAR2 Yes Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTIES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of parties that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Find Parties and Details API

Description

Identifies duplicates of a specific party. The API finds duplicates within a subset or across the entire TCA Registry, depending on what is passed into the p_restrict_sql parameter. The API inserts duplicates into the HZ_MATCHED_PARTIES_GT table if the p_dup_batch_id parameter is null. If this parameter is not null, then the API creates a duplicate set with the list of duplicates in the HZ_DUP_SET and HZ_DUP_SET_PARTIES tables. Use the x_search_ctx_id value that the API returns to filter results from the HZ_MATCHED_PARTIES_GT table.

PL/SQL Procedure

PROCEDURE
find_party_details (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_search_rec      IN      party_search_rec_type,
     p_party_site_list       IN      party_site_list,
     p_contact_list          IN      contact_list,
     p_contact_point_list    IN      contact_point_list,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     p_search_merged         IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

findPartyDetails(   
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    PartySearchRec p_party_search_rec,
    PartySiteSearchRec []p_party_site_list,
    ContactSearchRec []p_contact_list,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    String p_search_merged,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Parties and Details API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_search_rec IN party_search_rec_type No Comments: The PL/SQL record structure that has the party search record information.
p_party_site_list IN party_site_list No Comments: The PL/SQL table of records structure that has the party site search record information.
p_contact_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact search record information.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
p_search_merged IN VARCHAR2 Yes Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTIES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of parties that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Find Party Sites API

Description

Finds party sites based on the passed search criteria. The API finds all party sites that match the address search criteria passed into the p_party_site_list parameter, and/or have contact points, defined for party sites, that match contact point criteria passed into the p_contact_point_list parameter. The API returns the set of matches to the HZ_MATCHED_PARTY_SITES_GT table, which holds the PARTY_SITE_ID, PARTY_ID, and score of all matches. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
get_matching_party_sites (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_party_site_list       IN      PARTY_SITE_LIST,
     p_contact_point_list    IN      CONTACT_POINT_LIST,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

getMatchingPartySites(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_party_id,
    PartySiteSearchRec []p_party_site_list,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Party Sites API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_id IN NUMBER No Comments: Optional parameter if the search for party sites is only to be performed within one party.
p_party_site_list IN party_site_list No Comments: The PL/SQL table of records structure that has the party site search record information.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTY_SITES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of party sites that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Find Contacts API

Description

Finds contacts based on the passed search criteria. The API finds all contacts that match the contact search criteria passed into the p_contact_list parameter, and/or have contact points,defined for contacts, that match contact point criteria passed into the p_contact_point_list parameter.The API returns the set of matches to the HZ_MATCHED_CONTACTS_GT table, which holds the ORG_CONTACT_ID, PARTY_ID, and score of all matches. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
get_matching_contacts (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_contact_list          IN      CONTACT_LIST,
     p_contact_point_list    IN      CONTACT_POINT_LIST,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

getMatchingContacts(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_party_id,
    ContactSearchRec []p_contact_list,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Contacts API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_id IN NUMBER No Comments: Optional parameter if the search for contacts is only to be performed within one party.
p_contact_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact search record information.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_CONTACTS_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of contacts that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Find Contact Points API

Description

Finds contact points based on the passed search criteria. The API finds all contact points that match the contact point search criteria passed into the p_contact_point_list parameter. The API returns the set of matches to the HZ_MATCHED_CPTS_GT table, which holds the CONTACT_POINT_ID,PARTY_ID, and score of all matches. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
get_matching_contact_points (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_contact_point_list    IN      CONTACT_POINT_LIST,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

getMatchingContactPoints(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_party_id,
    ContactPointSearchRec []p_contact_point_list,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Find Contact Points API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_id IN NUMBER No Comments: Optional parameter if the search for contacts is only to be performed within one party.
p_contact_point_list IN contact_point_list No Comment: The PL/SQL table of records structure that has the contact point search record information.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_CPTS_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of contact points that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Identify Duplicate Parties API

Description

Identifies duplicates of a specific party. The API finds duplicates within a subset or across the entire TCA Registry, depending on what is passed into the p_restrict_sql parameter. The API inserts duplicates into the HZ_MATCHED_PARTIES_GT table if the p_dup_batch_id parameter is null. If this parameter is not null, then the API creates a duplicate set with the list of duplicates in the HZ_DUP_SET and HZ_DUP_SET_PARTIES tables. Use the x_search_ctx_id value that the API returns to filter results from the HZ_MATCHED_PARTIES_GT table.

PL/SQL Procedure

PROCEDURE
find_duplicate_parties (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     p_dup_batch_id          IN      NUMBER,
     p_search_merged         IN      VARCHAR2,
     x_dup_set_id            OUT     NUMBER,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

findDuplicateParties(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_party_id,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal p_dup_batch_id,
    String p_search_merged,
    BigDecimal  [] x_dup_set_id,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Identify Duplicate Parties API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_id IN NUMBER Yes Comments: ID of a party whose duplicates are to be found.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
p_dup_batch_id IN NUMBER No Comment: Specifies a duplicate batch in which a duplicate set is to be created. If this parameter is null, then the duplicates found by the APIS are inserted into HZ_MATCHED_PARTIES_GT. If not, then the duplicates are inserted into HZ_DUP_SETS with the dup_batch_id specified.
p_search_merged IN VARCHAR2 No Comment: Specifies if parties that have been merged should be returned as matches.
x_dup_set_id OUT NUMBER No Comment: The ID of a duplicate set that was created in the HZ_DUP_SETS table.
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTIES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of parties that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Identify Duplicate Party Sites API

Description

Identifies duplicates of a specific party site. The API finds duplicates within a subset defined by what is passed into the p_restrict_sql parameter, within the party passed into the p_party_id parameter, or across the entire TCA Registry. The API inserts duplicates into the HZ_MATCHED_PARTY_SITES_GT table. Use the x_search_ctx_id value that the API returns to filter results from this table.c

PL/SQL Procedure

PROCEDURE
find_duplicate_party_sites (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_site_id         IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

findDuplicatePartySites(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_party_site_id,
    BigDecimal p_party_id,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Identify Duplicate Party Sites API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_site_id IN NUMBER Yes Comment: ID of the party site whose duplicates are to be found.
p_party_id IN NUMBER No Comment: Optional parameter which specifies a particular party_id whose party sites to find the duplicates in.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_PARTY_SITES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of party sites that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Identify Duplicate Contacts API

Description

Identifies duplicates of a specific contact. The API finds duplicates within a subset defined by what is passed into the p_restrict_sql parameter, within the party passed into the p_party_id parameter, or across the entire TCA Registry. The API inserts duplicates into the HZ_MATCHED_CONTACTS_GT table. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
find_duplicate_contacts (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_org_contact_id        IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_restrict_sql          IN      VARCHAR2,
     p_match_type            IN      VARCHAR2,
     x_search_ctx_id         OUT     NUMBER,
     x_num_matches           OUT     NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
);

Java Method

findDuplicateContacts(    
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_org_contact_id,
    BigDecimal p_party_id,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Identify Duplicate Contacts API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_org_contact_id IN NUMBER Yes Comment: ID of the contact whose duplicates are to be found.
p_party_id IN NUMBER No Comment: Optional parameter which specifies a particular party_id whose contacts to find the duplicates in.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_CONTACTS_SITES_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of contacts that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Identify Duplicate Contact Points API

Description

Identifies duplicates of a specific contact point. The API finds duplicates within a subset defined by what is passed into the p_restrict_sql parameter, within the party passed into the p_party_id parameter, or across the entire TCA Registry. The API inserts duplicates into the HZ_MATCHED_CPTS_GT table. Use the x_search_ctx_id value that the API returns to filter results from this table.

PL/SQL Procedure

PROCEDURE
 find_duplicate_contact_points (
        p_init_msg_list       IN      VARCHAR2:= FND_API.G_FALSE,
        p_rule_id             IN      NUMBER,
        p_contact_point_id    IN      NUMBER,
        p_party_id            IN      NUMBER,
        p_restrict_sql        IN      VARCHAR2,
        p_match_type          IN      VARCHAR2,
        x_search_ctx_id       OUT     NUMBER,
        x_num_matches         OUT     NUMBER,
        x_return_status       OUT     VARCHAR2,
        x_msg_count           OUT     NUMBER,
        x_msg_data            OUT     VARCHAR2
)

Java Method

findDuplicateContactPoints(
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_contact_point_id,
    BigDecimal p_party_id,
    String p_restrict_sql,
    String p_match_type,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  )

Parameter Description and Validation

The following table lists information about the parameters in the Identify Duplicate Contact Points API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_contact_point_id IN NUMBER Yes Comment: ID of the contact point whose duplicates are to be found.
p_party_id IN NUMBER No Comment: ID of the party whose contact points to find the duplicates in.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).
p_search_merged IN NUMBER No Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_SPTS_GT to query the results.
x_num_matches OUT NUMBER No Comment: Number of contact points that matched.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Get Score Details API

Description

Gets details about how a party matches the input search criteria. Though not required, the API is usually called after calls to the find_parties API, to display how a match is determined. The API compares the input search criteria against the party passed into the p_party_id paramter, and inserts all matching attributes into the HZ_PARTY_SCORE_DTLS_GT table. The columns in this table include: ATTRIBUTE, the matching attribute; ENTERED_VALUE, the attribute value entered for the search criterion; MATCHED_VALUE, the attribute value for the p_party_id party, and ASSIGNED_SCORE, the score assigned to the match.

The x_search_ctx_id is used as an IN/OUT parameter. If this API is called right after a call to find_parties, then this API can use the same search_context_id and would retain x_search_context_id as is. If the search_context_id is not passed in, then this API generates and populates a search_context_id in the x_search_context_id variable. In either case, use the x_search_context_id value that the API returns to filter results from the HZ_PARTY_SCORE_DTLS_GT table.

PL/SQL Procedure

get_score_details (
     p_init_msg_list         IN      VARCHAR2:= FND_API.G_FALSE,
     p_rule_id               IN      NUMBER,
     p_party_id              IN      NUMBER,
     p_party_search_rec      IN      party_search_rec_type,
     p_party_site_list       IN      party_site_list,
     p_contact_list          IN      contact_list,
     p_contact_point_list    IN      contact_point_list,
     x_search_ctx_id         IN OUT  NUMBER,
     x_return_status         OUT     VARCHAR2,
     x_msg_count             OUT     NUMBER,
     x_msg_data              OUT     VARCHAR2
)

Parameter Description and Validation

The following table lists information about the parameters in the Get Score Details API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list OUT VARCHAR2 No Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_party_id IN NUMBER Yes Comment: ID of the party against which the input search criteria is to be evaluated.
p_party_search_rec IN NUMBER No Comment: The PL/SQL record structure that has the party search record information.
p_party_site_list IN NUMBER No Comment: The PL/SQL table of records structure that has the party site search record information.
p_contact_list IN NUMBER No Comment: The PL/SQL table of records structure that has the contact search record information.
p_contact_point_list IN NUMBER No Comment: The PL/SQL table of records structure that has the contact point search record information
x_search_ctxt_id OUT NUMBER No Comment: An ID used to join back to HZ_PARTY_SCORE_DTLS_GT to query the results. If the ID is passed in, it is used. If not passed, it is generated.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Call API Dynamic API

Description

Calls the appropriate API based on attribute ID values. The API accepts up to 20 attribute ID value pairs as search criteria and dispatches a call to the corresponding search API that is passed into the p_api_name parameter. Use the x_search_ctx_id value that the API returns to filter results from the appropriate table.

PL/SQL Procedure

PROCEDURE call_api_dynamic (
p_init_msg_list   IN  VARCHAR2:= FND_API.G_FALSE,
p_rule_id         IN  NUMBER,
p_attrib_id1      IN  NUMBER,
p_attrib_id2      IN  NUMBER, 
p_attrib_id3      IN  NUMBER, 
p_attrib_id4      IN  NUMBER, 
p_attrib_id5      IN  NUMBER, 
p_attrib_id6      IN  NUMBER, 
p_attrib_id7      IN  NUMBER, 
p_attrib_id8      IN  NUMBER, 
p_attrib_id9      IN  NUMBER, 
p_attrib_id10     IN  NUMBER, 
p_attrib_id11     IN  NUMBER, 
p_attrib_id12     IN  NUMBER, 
p_attrib_id13     IN  NUMBER, 
p_attrib_id14     IN  NUMBER, 
p_attrib_id15     IN  NUMBER, 
p_attrib_id16     IN  NUMBER, 
p_attrib_id17     IN  NUMBER, 
p_attrib_id18     IN  NUMBER, 
p_attrib_id19     IN  NUMBER, 
p_attrib_id20     IN  NUMBER, 
p_attrib_val1     IN  VARCHAR2, 
p_attrib_val2     IN  VARCHAR2, 
p_attrib_val3     IN  VARCHAR2, 
p_attrib_val4     IN  VARCHAR2, 
p_attrib_val5     IN  VARCHAR2, 
p_attrib_val6     IN  VARCHAR2, 
p_attrib_val7     IN  VARCHAR2, 
p_attrib_val8     IN  VARCHAR2, 
p_attrib_val9     IN  VARCHAR2, 
p_attrib_val10    IN  VARCHAR2, 
p_attrib_val11    IN  VARCHAR2 
p_attrib_val12    IN  VARCHAR2 
p_attrib_val13    IN  VARCHAR2 
p_attrib_val14    IN  VARCHAR2 
p_attrib_val15    IN  VARCHAR2 
p_attrib_val16    IN  VARCHAR2 
p_attrib_val17    IN  VARCHAR2 
p_attrib_val18    IN  VARCHAR2 
p_attrib_val19    IN  VARCHAR2 
p_attrib_val20    IN  VARCHAR2 
p_restrict_sql    IN  VARCHAR2 
        p_api_name         IN   VARCHAR2 
        p_match_type       IN   VARCHAR2 
        p_party_id         IN   NUMBER, 
        p_search_merged    IN   VARCHAR2 
        x_search_ctx_id    OUT  NUMBER, 
        x_num_matches      OUT  NUMBER, 
        x_return_status    OUT  VARCHAR2, 
        x_msg_count        OUT  NUMBER, 
        x_msg_data         OUT  VARCHAR2 

)

Java Method

callApiDynamic(
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    BigDecimal p_attrib_id1,
    BigDecimal p_attrib_id2,
    BigDecimal p_attrib_id3,
    BigDecimal p_attrib_id4,
    BigDecimal p_attrib_id5,
    BigDecimal p_attrib_id6,
    BigDecimal p_attrib_id7,
    BigDecimal p_attrib_id8,
    BigDecimal p_attrib_id9,
    BigDecimal p_attrib_id10,
    BigDecimal p_attrib_id11,
    BigDecimal p_attrib_id12,
    BigDecimal p_attrib_id13,
    BigDecimal p_attrib_id14,
    BigDecimal p_attrib_id15,
    BigDecimal p_attrib_id16,
    BigDecimal p_attrib_id17,
    BigDecimal p_attrib_id18,
    BigDecimal p_attrib_id19,
    BigDecimal p_attrib_id20,
    String p_attrib_val1,
    String p_attrib_val2,
    String p_attrib_val3,
    String p_attrib_val4,
    String p_attrib_val5,
    String p_attrib_val6,
    String p_attrib_val7,
    String p_attrib_val8,
    String p_attrib_val9,
    String p_attrib_val10,
    String p_attrib_val11,
    String p_attrib_val12,
    String p_attrib_val13,
    String p_attrib_val14,
    String p_attrib_val15,
    String p_attrib_val16,
    String p_attrib_val17,
    String p_attrib_val18,
    String p_attrib_val19,
    String p_attrib_val20,
    String p_restrict_sql,
    String p_api_name,
    String p_match_type,
    BigDecimal p_party_id,
    String p_search_merged,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  ) throws SQLException

Parameter Description and Validation

The following table lists information about the parameters in the Call API Dynamic API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_attrib_id1 to p_attrib_id20 IN NUMBER No Comment: Attribute IDs in the match rule for which search criteria is passed in.
p_attrib_val1 to p_attrib_val20 IN NUMBER No Comment: Corresponding search criteria for the match rule attributes.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_api_name IN VARCHAR2 No Comment: The name of the API to call.
Validation: Value can be: FIND_PARTIES, FIND_PARTY_DETAILS, FIND_PERSONS, GET_MATCHING_PARTY_SITES, GET_MATCHING_CONTACTS, or GET_MATCHING_CONTACT_POINTS.
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).

Note: Thresholds are still applied to filter results.


If p_match_type is AND, then it matches using the AND rule. If p_match_type is OR, then it matches using the OR rule.
Default: As specified in the match rule.
p_party_id IN NUMBER No Comment: Only used for the get_matching APIs, if you want to restrict the search for details on a particular party.
p_search_merged IN VARCHAR2 No Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctx_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_XXX_GT to query the results, where XXX is PARTIES, PARTY_SITES, CONTACTS, or CPTS.
x_num_matches OUT NUMBER No Comment: Number of matches.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Call API Dynamic Names API

Description

Calls the appropriate API based on attribute name values. The API accepts up to 20 attribute name value pairs as search criteria and dispatches a call to the corresponding search API that is passed into the p_api_name parameter. Use the x_search_ctx_id value that the API returns to filter results from the appropriate table.

PL/SQL Procedure

PROCEDURE  call_api_dynamic_names (
p_init_msg_list   IN  VARCHAR2:= FND_API.G_FALSE,
p_rule_id         IN  NUMBER,
p_attrib_name1      IN  NUMBER,
p_attrib_name2      IN  NUMBER, 
p_attrib_name3      IN  NUMBER, 
p_attrib_name4      IN  NUMBER, 
p_attrib_name5      IN  NUMBER, 
p_attrib_name6      IN  NUMBER, 
p_attrib_name7      IN  NUMBER, 
p_attrib_name8      IN  NUMBER, 
p_attrib_name9      IN  NUMBER, 
p_attrib_name10     IN  NUMBER, 
p_attrib_name11     IN  NUMBER, 
p_attrib_name12     IN  NUMBER, 
p_attrib_name13     IN  NUMBER, 
p_attrib_name14     IN  NUMBER, 
p_attrib_name15     IN  NUMBER, 
p_attrib_name16     IN  NUMBER, 
p_attrib_name17     IN  NUMBER, 
p_attrib_name18     IN  NUMBER, 
p_attrib_name19     IN  NUMBER, 
p_attrib_name20     IN  NUMBER, 
p_attrib_val1     IN  VARCHAR2, 
p_attrib_val2     IN  VARCHAR2, 
p_attrib_val3     IN  VARCHAR2, 
p_attrib_val4     IN  VARCHAR2, 
p_attrib_val5     IN  VARCHAR2, 
p_attrib_val6     IN  VARCHAR2, 
p_attrib_val7     IN  VARCHAR2, 
p_attrib_val8     IN  VARCHAR2, 
p_attrib_val9     IN  VARCHAR2, 
p_attrib_val10    IN  VARCHAR2, 
p_attrib_val11    IN  VARCHAR2 
p_attrib_val12    IN  VARCHAR2 
p_attrib_val13    IN  VARCHAR2 
p_attrib_val14    IN  VARCHAR2 
p_attrib_val15    IN  VARCHAR2 
p_attrib_val16    IN  VARCHAR2 
p_attrib_val17    IN  VARCHAR2 
p_attrib_val18    IN  VARCHAR2 
p_attrib_val19    IN  VARCHAR2 
p_attrib_val20    IN  VARCHAR2 
p_restrict_sql    IN  VARCHAR2 
        p_api_name         IN   VARCHAR2 
        p_match_type       IN   VARCHAR2 
        p_party_id         IN   NUMBER, 
        p_search_merged    IN   VARCHAR2 
        x_search_ctx_id    OUT  NUMBER, 
        x_num_matches      OUT  NUMBER, 
        x_return_status    OUT  VARCHAR2, 
        x_msg_count        OUT  NUMBER, 
        x_msg_data         OUT  VARCHAR2 

)

Java Method

public static void callApiDynamicNames(
    OracleConnection _connection,
    String p_init_msg_list,
    BigDecimal p_rule_id,
    String p_attrib_name1,
    String p_attrib_name2,
    String p_attrib_name3,
    String p_attrib_name4,
    String p_attrib_name5,
    String p_attrib_name6,
    String p_attrib_name7,
    String p_attrib_name8,
    String p_attrib_name9,
    String p_attrib_name10,
    String p_attrib_name11,
    String p_attrib_name12,
    String p_attrib_name13,
    String p_attrib_name14,
    String p_attrib_name15,
    String p_attrib_name16,
    String p_attrib_name17,
    String p_attrib_name18,
    String p_attrib_name19,
    String p_attrib_name20,
    String p_attrib_val1,
    String p_attrib_val2,
    String p_attrib_val3,
    String p_attrib_val4,
    String p_attrib_val5,
    String p_attrib_val6,
    String p_attrib_val7,
    String p_attrib_val8,
    String p_attrib_val9,
    String p_attrib_val10,
    String p_attrib_val11,
    String p_attrib_val12,
    String p_attrib_val13,
    String p_attrib_val14,
    String p_attrib_val15,
    String p_attrib_val16,
    String p_attrib_val17,
    String p_attrib_val18,
    String p_attrib_val19,
    String p_attrib_val20,
    String p_restrict_sql,
    String p_api_name,
    String p_match_type,
    BigDecimal p_party_id,
    String p_search_merged,
    BigDecimal  [] x_search_ctx_id,
    BigDecimal  [] x_num_matches,
    String  [] x_return_status,
    BigDecimal  [] x_msg_count,
    String  [] x_msg_data
  )

Parameter Description and Validation

The following table lists information about the parameters in the Call API Dynamic Names API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_rule_id IN NUMBER Yes Comment: Match rule ID.
p_attrib_name1 to p_attrib_name20 IN NUMBER No Comment: Attribute names in the match rule for which search criteria is passed in.
p_attrib_val1 to p_attrib_val20 IN NUMBER No Comment: Corresponding search criteria for the match rule attributes.
p_restrict_sql IN VARCHAR2 No Comment: Additional SQL clause to specify a subset of parties to search in. The format of this SQL clause should be as follows.
The SQL clause will be substituted into the following SELECT statement:
SELECT party_id FROM
hz_staged_parties stage
WHERE contains
(concat_col,’<intermedia query_string>')
AND <p_restrict_sql>;
p_api_name IN VARCHAR2 No Comment: The name of the API to call.
Validation: Value can be: FIND_PARTIES, FIND_PARTY_DETAILS, FIND_PERSONS, GET_MATCHING_PARTY_SITES, GET_MATCHING_CONTACTS, or GET_MATCHING_CONTACT_POINTS.
p_match_type IN VARCHAR2 No Comment: Indicates if matches are returned only if, for all input attributes, it matches at least one transformation (AND rule), or any one of them for any transformation (OR rule).

Note: Thresholds are still applied to filter results.


If p_match_type is AND, then it matches using the AND rule. If p_match_type is OR, then it matches using the OR rule.
Default: As specified in the match rule.
p_party_id IN NUMBER No Comment: Only used for the get_matching APIs, if you want to restrict the search for details on a particular party.
p_search_merged IN VARCHAR2 No Comment: Specifies if parties that have been merged should be returned as matches.
x_search_ctx_id OUT NUMBER No Comment: An ID used to join back to HZ_MATCHED_XXX_GT to query the results, where XXX is PARTIES, PARTY_SITES, CONTACTS, or CPTS.
x_num_matches OUT NUMBER No Comment: Number of matches.
x_return_status OUT VARCHAR2 No Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NUMBER No Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT VARCHAR2 No Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Other Validations

Data Quality Management Availability APIs

PL/SQL Package Name: HZ_DQM_SEARCH_UTILS

Is DQM Match Rule Available API

Description

Checks if a match rule is available, meaning that the rule is compiled and all its active transformations are staged. The function accordingly returns FND_API.G_TRUE or FND_API.G_FALSE.

PL/SQL Function

FUNCTION is_dqm_available (
  p_match_rule_id NUMBER)
 RETURN VARCHAR2

Parameter Description and Validation

The following table lists information about the parameters in the Is DQM Match Rule Available API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_rule_id IN NUMBER Yes Comment: Match rule ID.

Is DQM Index Available API

Description

Checks if interMedia indexes in all Data Quality Management staging tables are created and valid. The function accordingly returns FND_API.G_TRUE or FND_API.G_FALSE.

PL/SQL Function

FUNCTION is_dqm_available 
RETURN VARCHAR2

Data Quality Management Transformation APIs

PL/SQL Package Name: HZ_TRANS_PKG

Replace Word API

Description

Performs a word replacement in Data Quality Management. The function takes an input string, tokenizes it using spaces, replaces each token based on the passed word replacement list, and returns the concatenated replaced tokens. There are two versions of this API, one with the p_has_spc parameter, the other without.

PL/SQL Function

The p_has_spc parameter is only in one version of this API.

FUNCTION word_replace (
p_input_str IN VARCHAR2,
p_word_list_id IN NUMBER,
p_language IN VARCHAR2,
p_has_spc IN BOOLEAN DEFAULT FALSE) 

RETURN VARCHAR2

Parameter Description and Validation

The following table lists information about the parameters in the Replace Word API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_input_str IN VARCHAR2 Yes Comment: The original string that needs to be replaced.
p_word_list_id IN NUMBER Yes Comment: The word list ID of the word dictionary that forms the basis of the word replacement.
p_language IN VARCHAR2 No Comment: Not currently used.
p_has_spc IN BOOLEAN No Comment: Not currently used. Only in one version of this API.

Find Parties Object API

Description

This new DQM object API is a wrapper on the existing public DQM Find Parties API. New features from the standard DQM API facilitate DQM being called as a service from integration software such as Oracle BPEL.

Search criteria can be passed as a database object, match results are returned as an out parameter, and source system IDs are returned along with the party IDs in the results set. Additionally, this API provides the capability to search for parties within a specific source system.

PL/SQL Function

PROCEDURE
find_parties (
        p_init_msg_list                 IN                                      VARCHAR2: = FND_API.G_FALSE,
        p_within_os                                     IN                                      VARCHAR2,
        p_rule_id                                               IN                                      NUMBER,
        p_search_attr_obj                       IN                                      HZ_SEARCH_ATTR_OBJ_TBL,
        p_party_status                          IN                                      VARCHAR2,
        p_restrict_sql                          IN                                      VARCHAR2,
        p_match_type                                    IN                                      VARCHAR2,
        x_search_results_obj    OUT NOCOPY      HZ_MATCHED_PARTY_OBJ_TBL,
        x_return_status                 OUT NOCOPY      VARCHAR2,
        x_msg_count                                     OUT NOCOPY      NUMBER
        x_msg_data                                      OUT NOCOPY      VARCHAR2,
);

Parameter Description and Validation

The following table lists information about the parameters in the Find Parties Object API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 Yes Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_within_os IN VARCHAR2 Yes Comment: Indicates the name of the source-system to search within.
When the value is null, records from all source systems will be searched.
p_rule_id IN NUMBER Yes Comment: Indicates the match rule numbers.
p_search_attr_obj IN HZ_SEARCH_ATTR_OBJ_TBL Yes Comment: The PL/SQL table of records structure that has the search attributes.
p_party_status IN NUMBER Yes Comment: Indicates the status of parties to be included in the DQM search.
p_restrict_sql IN NUMBER Yes Comment: Indicates the SQL where clause is used to restrict the search results.
p_match_type IN NUMBER Yes Comment: Indicates the match type.
x_search_results_obj OUT NOCOPY HZ_MATCHED_PARTY_OBJ_TBL Yes Comment: The PL/SQL table of records structure that has the search results.
x_return_status OUT NOCOPY VARCHAR2 Yes Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NOCOPY NUMBER Yes Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT NOCOPY VARCHAR2 Yes Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Data Quality Management Merge APIs

PL/SQL Package Name: HZ_DUP_MERGE_PUB (Create Merge Request API) and HZ_EXTRACT_MERGE_EVENT_PKG (Get Party Merge and Get Account Merge APIs).

Create Merge Request API

Description

Creates a merge request in Oracle Data Librarian. A merge request contains the details of a party or parties that are considered similar and potential candidates for merge. To successfully call this API, pass a list of duplicate party IDs or source system management mappings, and optionally some note text. The merge request will create data in the following tables: HZ_PARTIES, HZ_DUP_BATCH, HZ_DUP_SETS, HZ_DUP_SET_PARTIES, HZ_MERGE_BATCH, HZ_MERGE_PARTIES, HZ_MERGE_PARTY_DETAILS, HZ_MERGE_ENTITY_ATTRIBUTES, and JTF_NOTES_B and JTF_NOTES_TL.

PL/SQL Function

PROCEDURE
create_dup_merge_request (
        p_init_msg_list         IN                                      VARCHAR2: = FND_API.G_FALSE,
        p_dup_id_objs                   IN                                      HZ_DUP_ID_OBJ_TBL,
        p_note_text                             IN                                      VARCHAR2,
        x_return_status         OUT NOCOPY      VARCHAR2,
        x_msg_count                             OUT NOCOPY      NUMBER,
        x_msg_data                              OUT NOCOPY      VARCHAR2,
        x_merge_request_id      OUT NOCOPY      NUMBER
);

Parameter Description and Validation

The following table lists information about the parameters in the Create Merge Request API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 Yes Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_dup_id_objs IN HZ_DUP_ID_OBJ_TBL Yes Comment: The PL/SQL table of records structure that has the duplicate party ID information.
p_note_text IN VARCHAR2 Yes Comment: Note text for the merge request.
x_return_status OUT NOCOPY VARCHAR2 Yes Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NOCOPY NUMBER Yes Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT NOCOPY VARCHAR2 Yes Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.
x_merge_request_id OUT NOCOPY NUMBER Yes Comment: Indicates the merge request.

Other Validations

Get Party Merge Details API

Description

Finds the details of a particular party merge by passing in the merge batch ID and the master party ID from the merge event.

The party merge object is then extracted, containing the batch name, merge type, automerge flag value, master party ID and the party numbers, names, and types and source system management mappings for all parties involved in the merge. The merge object is extracted from the following tables: HZ_PARTIES, HZ_DUP_BATCH, HZ_DUP_SETS, HZ_DUP_SET_PARTIES, HZ_MERGE_BATCH, and HZ_MERGE_PARTIES. If a value of Y is passed into the parameter p_get_merge_detail_flag, historical Merge To and Merge From party details from the HZ_Merge_Party_History table and their associated Source System Mapping details will be retrieved as part of the object. Use this API when to synchronize the merge activities within the Customer Data Hub with external source systems.

PL/SQL Function

PROCEDURE
get_party_merge_event_data (
        p_init_msg_list         IN                                      VARCHAR2: = FND_API.G_FALSE,
        p_batch_id                      IN                                      NUMBER,
        p_merge_to_party_id     IN                                      NUMBER,
        x_party_merge_obj               OUT NOCOPY      HZ_PARTY_MERGE_OBJ,
        x_return_status         OUT NOCOPY      VARCHAR2,
        x_msg_count                             OUT NOCOPY      NUMBER
        x_msg_data                              OUT NOCOPY      VARCHAR2,
);

Parameter Description and Validation

The following table lists information about the parameters in the Get Party Merge Details API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 Yes Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_batch_id IN NUMBER Yes Comment: Indicates the party merge batch numbers.
p_merge_to_party_id IN NUMBER Yes Comment: Indicates the master party numbers.
p_get_merge_event_data IN HZ_PARTY_MERGE_DETAIL_OBJECT Yes Comment: Used to control the inclusion of merge history in the result.
Default: Value is N.
x_party_merge_obj OUT NOCOPY HZ_PARTY_MERGE_OBJ Yes Comment: The PL/SQL table of records structure that has the party merge result information.
x_return_status OUT NOCOPY VARCHAR2 Yes Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NOCOPY NUMBER Yes Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT NOCOPY VARCHAR2 Yes Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.

Get Account Merge Details API

Description

Finds the details of a particular account merge by passing in the customer merge header ID, which is raised from the merge event.

The account merge object is then extracted, which contains customer merge ID, request ID and the associated party info, merge-to account ID, account number, account name, and source system management mappings for all accounts involved in the merge. The merge object is extracted from the following tables: HZ_PARTIES, HZ_CUST_ACCOUNTS, and RA_CUSTOMER_MERGE_HEADERS. Use this API when trying to synchronize the merge activities within the Customer Data Hub with external source systems.

PL/SQL Function

PROCEDURE
get_account_merge_event_data (
        p_init_msg_list                                 IN                                      VARCHAR2: = FND_API.G_FALSE,
        p_customer_merge_header_id      IN                                      NUMBER,
   p_get_merge_detail_flag         IN            VARCHAR2: = 'N'
   x_account_merge_obj                          OUT NOCOPY      HZ_ACCOUNT_MERGE_OBJ,
        x_return_status                                 OUT NOCOPY      VARCHAR2,
        x_msg_count                                                     OUT NOCOPY      NUMBER
        x_msg_data                                                      OUT NOCOPY      VARCHAR2,
);

Parameter Description and Validation

The following table lists information about the parameters in the Get Account Merge Details API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 Yes Comment: Indicates if the message stack is initialized.
Default: FND_API.G_FALSE.
p_customer_merge_header_id IN NUMBER Yes Comment: Indicates the customer merge header numbers.
p_get_merge_detail_flag IN VARCHAR2 Yes Comment: Indicates if details of the merged parties must be extracted.
Default: No
x_account_merge_obj OUT NOCOPY HZ_ACCOUNT_MERGE_OBJ Yes Comment: The PL/SQL table of records structure that has the account merge result information.
x_return_status OUT NOCOPY VARCHAR2 Yes Comment: A code indicating whether any errors occurred during processing.
x_msg_count OUT NOCOPY NUMBER Yes Comment: Indicates how many messages exist on the message stack upon completion of processing.
x_msg_data OUT NOCOPY VARCHAR2 Yes Comment: If exactly one message exists on the message stack upon completion of processing, then this parameter contains that message.